2016-03-07

Big blocks, small blocks, side-blocks, off-blocks...

In the recent week Bitcoin has experienced another "stress test" in form of a lot of transaction spam (see below for a chart of the amount of transactions in mempool), although this time the spam was not scheduled and it's not clear who was responsible for it. Along with the continuous debate on whether or not to increase the Bitcoin block size, a lot of people have started looking at what are the potential outcomes of the situation. I have covered a similar topic over a year ago, but it might be a good opportunity to revisit the topic and bring everyone up to speed.

A mockup of "Bitcoin surge pricing", inspired by Uber.

The problem


As some of you know, the Bitcoin blockchain was initially designed to have a limit of 1MB per block. This was done due to prevent the bloat and abuse of the network. However, if this limit is strictly enforced, the Bitcoin network would only be able to support a small number of transactions, about 7 transactions per second (compared to Visa's 2000 tps). Clearly, this won't be enough for a payment network that is supposed to replace the banks and credit cards. Either we will increase this size in some way, or we will see Bitcoin become a much different network.

The outcomes


Depending on whether the block size is increased or not and by how much would dictate how the Bitcoin network is shaped. Lets look over some possibilities.

Block size remains rigid


In this approach, the 1MB block size is rigid and remains unchanged. When we start hitting this limit, the miners will be able to pick and choose which transactions to include in the block. Rational miners will pick the transactions that pay them the most in fees (proportionally to their size), thus there will be a bidding war to get into the next block.

Due to the increased cost, fewer people will opt to send transactions themselves, either leaving Bitcoin entirely, or by performing some off-chain settlement. Wallet services such as Coinbase could become more like banks - offering their customers settlement with other people on their platform and other platforms that accept off-chain settlement.

In this scenario, Bitcoin becomes a settlement method for large bank-like wallets and large corporations.


Block size limit is abolished


A polar opposite of the previous approach. The block size limit is completely abolished and miners can create arbitrarily big blocks. While anyone can create a transaction for cheap, the network would soon be attacked by malicious entities trying to push the limit. Someone could decide to generate a 1GB block for example and cause the network to grind to a halt while synchronizing.

Quite quickly running a full node becomes a luxury or a business. We see more reliance on Stratum-like supernodes. The functionality of the network is dictated by them.

In this scenario, the Bitcoin network turns into something like the modern Internet - only big players can access it directly and everyone else has to rely on something like Bitcoin-Internet Service Providers.

Middle of the road


The most likely scenario would be somewhere in the middle of the road - raising the block limit, but doing so gradually. Dedicated users could run their own nodes, but most of us would rely on third parties for helping our wallets function.

Alternative solutions


Bitcoin is both an independent currency and a settlement network for that currency. Whether the block size increases or not, there are a lot of ways one could try enhancing the settlement aspect of Bitcoin.

Soft forks


There are some proposals on how to improve the scalability without hard forking the network. Some of them include softforks such as Segregated Witness , or Sidechains (allowing value to be moved in and out of the Bitcoin network without a trusted third party).

Segregated Witness, or "SegWit" is a solution focused on slimming down the transactions by moving the signatures off-blockchain. This can slim them down to about a quarter of the size, essentially allowing the Bitcoin network to process 4MB of transactions in 1MB blocks. The idea appears to have a lot of support, but since it's mostly streamlining what Bitcoin can currently do rather than creating a whole new solution, there isn't much left to explain without going into technical details.All in all, SegWit can buy Bitcoin some breathing room with its current block limit.

Sidechains is an idea focused on on being able to move the value in and out of the Bitcoin network without depositing the coins with a third party. While this doesn't sound like much, sidechains can lead to a lot more than just scaling Bitcoin - they have a potential of recreating networks with the features of Ethereum or Ripple without having to bootstrap those networks with new coins. These sidechains could be used to settle BTC transactions outside of the network while still not having to worry about the counterparty risk.

Payment channels


Payment channels in general or Lightning Network specifically are an interesting approach to allowing a large amount of transactions to take place outside of the Bitcoin network while everything would still be settled on-chain. The idea was discussed as early as 2011, and today we have some companies that even start advertising it on their websites:


21.co advertising their payment channels right above telling everyone how many blocks it might take to confirm various transactions during the recent spam attack

A payment channel is a way for two nodes to pass payments back and forth between one another using unbroadcasted Bitcoin transactions. Each payment adjust the balances between the nodes - shifting the balance back and forth accordingly. Only the final transaction gets published to the whole world, thus potentially saving a lot of space in a block. While the use case for this solution might be limited (who sends another person multiple transactions over a short period of time?), it gets more interesting when you add the network effect to it.

A simulation of 6 networked payment channel nodes

Now, when you introduce a few "supernodes", possibly in form of Bitcoin exchanges and big companies, you start mimicking the Gateway model of Ripple:

An illustration of the Gateway model of Ripple

Instead of settling directly on the network, anyone can potentially save a bit of fees by connecting to one of the supernodes and establishing a payment channel with them. This would allow you to transact with anyone in the network fast and cheap, while still being able to settle your balance on the Bitcoin blockchain as needed. If the payment channels are open for a long period of time, a lot of people could begin to operate solely within the network. This might be especially important for cross-exchange settlement, or for shared ewallets like Coinbase or 21.co.

Alternative networks


Last but by no means least, we have the alternative networks. A lot of them stand to benefit when the Bitcoin network falters.

Simplest ones would be the altcoins - Litecoin and the like. They reason that if Bitcoin blocks are full, people will join other networks and use other coins instead. I'd take that with a grain of salt, after all, Bitcoin is a better currency in terms of price and market cap than its alternatives, but the other networks might have a higher throughput.


A much more compelling alternative would the the Crypto 2.0 networks and permissioned blockchains - Ripple, Open Transactions, Liquid. Those networks can use the above mentioned Gateway model and move the settlement completely off the Bitcoin network. The only transactions that would need to be included in the blockchain would be deposits and withdrawals. While certainly more rigid and centralized than the payment channels, there are ways of preventing the gateways from stealing one's coins (such as Voting Pools). Moreover, such networks could also be used to issue fiat-denominated IOUs, which might be very attractive for some applications.

Conclusions


The Bitcoin block size debate is still going on, while the blockchain limit is being hit more and more often. Either the Bitcoin network will scale to larger blocks, or higher fees. There are many solutions out there focused on providing alternative means of settling with BTC without having to further burden the Bitcoin network. Only time will tell how our current problems will be addressed and which solutions will be used.

No comments:

Post a Comment