Technology attributes
Blockchain scalability is limited by the speed at which a peer-to-peer network of participants are able to come to a consensus on the state of a digital ledger of transactions called a blockchain. These networks follow a set of rules or consensus protocol which determine exactly what form valid transactions must take as well as who is eligible to process and add them to the blockchain. Decentralized systems provide important advantages over traditional centralized systems, such as removal of the need for a trusted third party and improved security against malicious attackers. However, the validation of transactions by each full node participant in the system represents a duplication of effort and thus reduces the speed of transaction. Limitations to blockchain systems can be thought of as tradeoffs between decentralization, security, and scalability.
In a Bitcoin like blockchain, the maximum transaction rate of a blockchain can be directly calculated using the size of transactions, the max size of a block, and the speed at which blocks are added to the blockchain.
A calculation can be performed as follows:
# of bytes per block * # of transactions per byte * # of blocks per second = # txns / second
For example, Bitcoin could process ~3.3 transactions per second with the following parameters:
1,000,000 bytes (1mb) / 1 block * 1 transaction / 500 bytes * 1 block / 600 seconds
Other blockchains may have different specific parameters that determine transactional capacity per block. For example, in Ethereum the gas limit determines the maximum number of computational steps which can be performed per block.
Increasing the maximum block size is a simple way to increase the number of transactions processed per block, therefore increasing the maximum transactions processed per second. If the average transaction size is assumed to stay constant, a doubling of the maximum block size would result in a doubling of the maximum transactions per second possible.
An important trade-off to consider is the increase in the rate at which the size of the blockchain increases. A doubling of the max block size also doubles the rate at which the size of the blockchain increases. Each full node in the Bitcoin blockchain must download the entire history of transactions to be to fully validate transactions. Larger blockchain size increases the burden of maintaining a full node. A block size limit also protects against denial of service attacks in which large fake transactions are added to the blockchain to congest and slow the network.
In practice, transactions may have different sizes depending a variety of factors including their complexity. Segregated Witness (Segwit) was proposed in Bitcoin Improvement Proposal 141 (BIP) and implemented in August 2017 in order to separate digital signature data into a new from the rest of the transactional data. Along with changes to transaction malleability, Segwit reduces the amount of data that is included in the block and therefore increases the number of transactions that can fit in each block.
In Bitcoin, the difficulty of the proof-of-work computation adjusts every 2016 blocks in order to bring the estimated block creation time to one block produced every 10 minutes. Other blockchains like Litecoin adjust the difficulty such that a block is produced every 2.5 minutes. Shorter block creation time increases the speed and TPS of the blockchain. Decreasing block creation time also comes with tradeoffs primarily to the security of the network.
The ratio between the time it takes to solve a proof-of-work puzzle and create a block and the time it takes to propagate a transaction to the network determines the stale block rate. A stale block is a valid block mined after another node has mined a valid block, but before the existence of that valid block has propagated to the network. A stale block does not exist in the longest chain as mining continues on the other chain. Thus all computation work done on the stale block is lost and no reward is granted.
For example if the Bitcoin propagation time were to be estimated at 12 seconds, and block creation time of 600 seconds then stale block rate is 12/600 = 0.02 stale blocks per valid block. Therefore the percentage of stale blocks is 0.02 stale blocks / 1 valid block + 0.02 stale block =~ 1.96% stale block rate. Litecoin's 150 second block creation time would yield 12/150 = 0.08 stale blocks per valid block, or 0.08/1.08=~7.4% stale block rate. And a 12 second block time would yield 12/12=1 stale block per valid block, and a 1/2=50% stale block rate. This reduces the effective computational hash power proportionally as stale blocks are not included in the blockchain. A 1.96% stale block rate reduces effective hash power of the network to ~98%. This reduction is effective hash rate does not effect miners who generate the previous block as their network propagation time is essentially 0. Thus they gain a greater advantage over the rest of the network as the block creation time reduces. This increases the ease of a 51% attack majority collusion attack on the network.
Increasing the transaction throughput rate or block size of a blockchain also increase the rate at which the size of the blockchain increases. Thus increased size of a blockchain results in an increased burden placed on full nodes. This impacts the ability for widely distributed individuals to run a full node, and therefore the decentralized properties of the blockchain.
Methods utilizing off-chain transactions such as the Lightning network and the Raiden network provide another method for potential scalability. The transactions on these networks take place primarily off of the blockchain, with only a small subset of transactions occurring as settlement on the blockchain.
Sharding is a method where only a subset of nodes to need validate each transaction.
Interoperability networks allow for transaction or sending of messages between separate blockchains.
Plasma and other implementations of child chains which report information to root chains.
Sidechains are a variety of blockchains typically connected to another blockchain using a two-way peg.
Directed acyclic graph based ledgers are a generalization of the single chain blockchain.