Bitcoin Scalability

What is scalability?

Scalability is a measure of a system’s ability to grow to accommodate increasing demand. If you host a website that’s overrun with requests, you might scale it by adding more servers. If you want to run more intensive applications on your computer, you could upgrade its components.

In the context of cryptocurrencies, we use the term to describe the ease of upgrading a blockchain so it can process a higher number of transactions.

Why does Bitcoin need to scale?

To function in day-to-day payments, Bitcoin must be fast. As it stands, it has a relatively low throughput, meaning that a limited amount of transactions can be processed per block.

As you know from the previous chapter, miners receive transaction fees as part of the block reward. Users attach these to their transactions to incentivize miners to add their transactions to the blockchain.

Miners seek to make a return on their investment into hardware and electricity, so they prioritize transactions with higher fees. If there are a lot of transactions in the network’s “waiting room” (called the mempool), fees can rise significantly as users bid to have theirs included. At its worst, the average fee was upwards of $50.

How many transactions can Bitcoin process?

Based on the average number of transactions per block, Bitcoin can manage approximately five transactions per second at the moment. It’s much lower than that of centralized payment solutions, but this is one of the costs of a decentralized currency.

Because it’s not managed by a data center that a single entity can upgrade at will, Bitcoin must limit the size of its blocks. A new block size that allows 10,000 transactions per second could be integrated, but it would harm the network’s decentralization. Remember that full nodes need to download new information roughly every ten minutes. If it becomes too burdensome for them to do so, they’ll likely go offline.

If the protocol is to be used to payments, Bitcoin enthusiasts believe that effective scaling needs to be achieved in different ways.

What is the Lightning Network?

The Lightning Network is a proposed scalability solution for Bitcoin. We call it a layer two solution because it moves transactions away from the blockchain. Instead of recording all transactions on the base layer, they’re handled by another protocol built on top of it.

The Lightning Network allows users to send funds near-instantly and for free. There are no constraints on throughput (provided users have the capacity to send and receive). To use the Bitcoin Lightning Network, two participants lock up some of their coins in a special address. The address has a unique property – it only releases the bitcoins if both parties agree.

From there, the parties keep a private ledger that can reallocate balances without announcing it to the main chain. They only publish a transaction to the blockchain when they’re done. The protocol then updates their balances accordingly. Note that they don’t need to trust each other, either. If one tries to cheat, the protocol will detect it and punish them.

In total, a payment channel like this one only requires two on-chain transactions from the user – one to fund their address and one to later dispense the coins. This means that thousands of transfers can be made in the meantime. With further development and optimization, the technology could become a critical component for large blockchain systems.

For a more detailed explainer on the scalability issue and its potential solutions, take a look at Blockchain Scalability – Sidechains and Payment Channels.

What are forks?

Since Bitcoin is open-source, anyone can modify the software. You could add new rules or remove old ones to suit different needs. But not all changes are created equal: some updates will make your node incompatible with the network, while others will be backward-compatible.

Soft forks

A soft fork is a change to the rules that allows updated nodes to interact with old ones. Let’s take block size as an example. Suppose that we have a block size of 2MB and that half of the network implements a change – from now on, all blocks must not exceed 1MB. They would reject anything bigger.

Older nodes can still receive these blocks or propagate their own. That means that all nodes remain part of the same network, no matter which version they run.

In the below animation, we can see that the smaller blocks are accepted both by older and updated nodes. However, newer nodes will not recognize 2MB blocks, because they are already following the new rules.

Bitcoin’s Segregated Witness (or SegWit) is an example of a soft fork. Using a clever technique, it introduced a new format for blocks and transactions. Old nodes continue to receive blocks, but they don’t validate the new transaction type.

Hard forks

A hard fork is messier. Suppose now that half of the network wants to increase the block size from 2MB to 3MB. If you try to send a 3MB block to older nodes, the nodes reject it as the rules clearly state that 2MB is the maximum they can accept. Because the two networks are no longer compatible, the blockchain splits into two.

The black chain in the diagram above is the original one. Block 2 is where the hard fork has taken place. Here, nodes that have upgraded have started producing larger blocks (the green ones). The older nodes don’t recognize those, so they continue along a different path. There are now two blockchains, but they share a history until Block 2.

Now there are two different protocols, each with a different currency. All the balances on the old one are cloned, meaning that if you had 20 BTC on the original chain, you have 20 NewBTC on the new one.

In 2017, Bitcoin went through a controversial hard fork in a scenario similar to the above. A minority of participants wanted to increase the block size to ensure more throughput and cheaper transaction fees. Others believed this to be a poor scaling strategy. Eventually, the hard fork gave birth to Bitcoin Cash (BCH), which split from the Bitcoin network and now has an independent community and roadmap.

To learn more about forks, see Hard Forks and Soft Forks.