Scalability For Dummies!By Apr 15, 2019 3 Min Read
Scalability refers to a blockchain’s ability to handle large quantities of transactions. It is essential for the mainstream adoption of a blockchain, as (for example) a highly scalable smart contract platform enables dApps with large quantities of users and bulk trading volumes. The key metric commonly used to measure scalability is transactions per second (TPS), which is the maximum rate at which a blockchain can confirm transactions. The TPS processed by a blockchain is fundamentally determined by two key “dials” that can be turned one way or another: block size and block time.
Block size is the first dial, and it determines the maximum quantity of transactions that can be contained per block. While a larger block size makes it possible to contain more transactions in each block, it will also result in higher latency as it will take longer to propagate the larger block to the network. For example, once a block on the Bitcoin blockchain reaches a size of 20kb, it is estimated that each additional kb results in an additional 80ms required to propagate the block to the network. Pruning the size of each individual transaction (transaction size) is one way to include more transactions in a block without increasing the block size.
Block time is the second dial, and it refers to the average block creation time. In other words, how long does it take for a miner or block producer to create a block. The pace of block creation (block time) is non-fixed on Proof-of-Work blockchains, but adjusted via the mining difficulty. The pace of block creation is fixed on Delegated Proof-of-Stake blockchains.
Comparing block size and block time to a train station, the block size can be thought of as the size of departing trains, and the block time can be thought of as the frequency of departures from said station. Increasing either one will result in an increase to the total number of passengers able to depart from the station per unit time (TPS). The station platform can further represent the transaction pool (mempool), where passengers (transactions) wait to be included in the next train (block).
A shorter block time enhances the scalability of a blockchain as the frequency of transaction processing is higher. However, a shorter block time also means there are more blocks to propagate (synchronize) across the network. This in turn leads to higher bandwidth requirements, and possibly slower network communications. A shorter block time typically also leads to a higher rate of uncle blocks.
A commonly touted solution for increased scalability are sidechains. A sidechain is a blockchain running in parallel with the main blockchain. The sidechain can extend functionality through interoperable blockchain networks and allow for the transfer and synchronization of tokens between the two chains. Returning to the train station metaphor, where block size is represented by the size of trains and block time is represented by the frequency of departures, adding sidechains can be thought of as the addition of parallel train tracks with separate platforms to the train station. These separate tracks can be different from the main track, and can each carry a different type of train. Introducing sidechains can reduce congestion on the main track, and reduce the waiting time for passengers (transactions) on station platforms.