Deep-diving Scalability on Algorand
Since the inception of blockchain, the trilemma to be addressed by blockchain has been security, scalability and decentralization. Earlier the issue with blockchain protocols was that all three issues could not be addressed at the same time in a solution due to one or the other limitation. Hence, each protocol developed had an inherent flaw — if the system designed was highly secure and scalable, it had to compromise with decentralization and if the solution was decentralized and secure, the chances of scalability was quite low. With time, development, experimentation and research; a decentralized scalable and secure network has become a reality.
Who all have been addressing the scalability issue?
Algorand, Stellar, Cardano, R3, Tezos, forks of Ethereum are few of the blockchain protocols that have been working on solving the scalability issue. To dig into the scalability feature, first we have to understand a bit about the different consensus protocols of the different blockchains.
Different Consensus protocols
Proof of Work (PoW) protocol requires participants to solve cryptographic puzzles in order to propose or validate blocks which in turn require high computational power directed toward mining, the hardware required for which is very costly. To maintain the desired block generation rate, the difficulty of the underlying puzzles is adjusted accordingly. Byzantine Agreement protocol consensus requires every user to receive a message from all other users, or rely on ad-hoc chains of trust. Proof of Authority (PoA) protocol secures the transactions and the network is scalable but the authority of approving transactions is centralized thereby compromising on decentralization.
In Proof of Stake (PoS) protocol, participants vote in proportion to the number of tokens they stake. The stake of participants is attached to behavioral mannerisms to support the network and could be forfeited in case of misbehaving. In PoS, the lengthy computational process to select the next block producer is avoided rather an algorithm is used that quickly and randomly sorts out one address according to the distribution of stake. There are different variants of the Proof of Stake protocol which follow the game theory mechanisms — those with larger stakes have much more to lose and will work towards maintaining the network, though at the expense of decentralization.
The Algorand consensus protocol is Pure Proof of Stake (PPoS) in which the choice of the block creator is done in accordance to the number of Algorand tokens a participant holds; thus maintaining high speed with decentralization. In line with decentralization, the selection of the block creator or committee is not done by any person but by Algorand Self Selection algorithm thereby negating a point of vulnerability via which the system could be compromised. By running a cryptographic lottery , once per user in each round, in their own respective machines, Algorand users themselves select the block creator. It is a very fast computation, and returns a proof of selection for the user which the user then propagates with its vote in tandem in a single signed message. The core of this process is a cryptographic construct called a Verifiable Random Function (VRF). The VRF arrangement ensures the attacker is powerless to target a specific committee member as the attacker cannot predict who is going to be selected.
Contrasting other protocols with the Algorand Protocol
Unlike PoW, the PPoS Algorand protocol has low computational costs and power since it only involves generating and verifying signatures and simple counting operations. The cost is dependent only on the number of selected users for each block, which is constant and not affected by the size of the whole network. Unlike BA, the PPoS Algorand protocol randomly selects a small set of block proposers and verifiers, users only need to receive a fixed number of messages in order to reach consensus on the next block.
Deep diving into blockchain scalability
Issues with scalability of blockchain
Blockchain systems capture information, such as public keys, balances as well as smart contract data, which the validators rely on to verify transactions and thus are inherently ‘stateful’. In a blockchain network since every transaction propagates across all nodes, managing the state and the blockchain itself in the long run requires large amounts of on-chain storage space (and involves high costs and bandwidth) which cannot be provided by more than a handful of validators leading to scalability issues as well as potential centralization to provide consensus in the network.
Algorand’s approach
Unlike other blockchains, in which Merkle Tree (has very long proofs) is used to commit to a set of data and a similar sized commitment is required for appending any one of the values with the associated cryptographic proofs, Algorand has proposed a stateless blockchain model to replace on-chain storage with cryptographic commitments to make the chain less bulky, easier and cheaper to scale and maintain. This commitment scheme is known as Pointproofs which is a new vector commitment scheme that supports non-interactive aggregation of proofs across multiple commitments. When applied to blockchain smart contracts, Pointproofs are proposed to reduce bandwidth overheads for propagating a block of transactions by at least half compared to prior state-of-art vector commitments. They have been tested to be efficient to generate a proof for values with respect to one or multiple commitments and to verify the aggregate proof. Thus enabling easier transaction management, easing scalability due to the smaller size and maintaining decentralization by not increasing the costs and storage space for validators.
Conclusion & Insights
Algorand’s consensus protocol is able to scale to millions of users and sustain a high transaction rate, without incurring significant cost to participating users. Consensus on a block is reached in parallel while the block is being propagated to the network. If computation ever becomes a bottleneck for a user, then increasing the computational power will directly improve performance.
Right off the bat, Algorand with PPoS was providing scalability features and now with the addition of Pointproofs feature which reduces on-chain storage and minimizes network bandwidth requirements, the Algorand blockchain is providing a highly efficient decentralized scalable network to develop solutions. How the Pointproofs feature will be applied in smart contract data management, will be a thing to look out for!