Consensus may be defined professionally as an acceptable resolution, one that can be supported, even if not the “favourite” of each individual. Blockchains and other distributed ledger technologies(DLT) have no centralized authority so there needs to be a method of achieving consensus in the network so that transactions can happen and the network can operate effectively. Before Bitcoin was created, there were several failed attempts at a peer to peer decentralized currency system due to failure to reach consensus in the network. In this How-to Crypto Report, we will take a look at the different types of consensus models for blockchain.
It is a term that is believed to have been coined originally by Vitalik Buterin, founder of Ethereum. Before looking at the different types of consensus methods, it is important to understand that in distributed ledger technologies such as blockchain, the blockchain trilemma is the attempt to offer a scalable, decentralized, and secure network without compromising any of the three. The 3 sides of the trilemma are decentralization, scalability(also called speed by some), and security. It is believed by many that the trilemma is that blockchains can only achieve 2 out of these 3 traits at one time, at least at a solid level.
Decentralization allows networks to run permission less and without censorship, but due to the consensus method needed, verifying transactions are more secure and decentralized, but less likely to be fast.
This is one example of the trilemma, if it is decentralized and secure, there is some sacrifice in speed. Scalability or ability to scale and speed up a network as users and transactions grow is an important aspect for mass payment systems to rival Visa and other centralized credit card providers. The faster a network and more transactions per second it can handle, leads to a less decentralized consensus method, that is, in turn less secure. Another example of the trilemma. Security, the third aspect is usually tied to decentralization. The less that there is a centralized point or points of failure, the more secure a network can be. Even in secure networks that are extremely scalable and secure, the cost of the scalability is the lack of decentralization. As you can see, there is no one size fits all for blockchains and consensus methods. Each variation of each method listed below, and even in newer methods not mentioned, attempt to solve the trilemma problem and not have to relinquish any of the 3 traits of the blockchain trilemma. Each trade-off made in each project’s development is made with a specific use or adoption in mind, although that could evolve over time.
PROOF OF WORK
When Satoshi Nakamoto created Bitcoin, it was designed to use what is called Proof Of Work protocol, or PoW. In Proof of Work, miners use varying powers of computers to mine a block and add it to the blockchain. It is a complex puzzle that miners are rushing to solve and by solving, they then present the block to the network for verification. Using distributed consensus, all the other miners and nodes on the network then “agree” that these transactions are valid. This process is known as proof-of-work, or PoW. The process in many cases uses immense amounts of electricity due to the fact that the design of the puzzle being solved is made in a way to be very taxing on the system. Miners compete against each other to validate transactions and then get rewarded. This may seem like a random selection to create each block, but the probability of being selected is linked to the computational power being spent. Bitcoin is the first proof of work cryptocurrency and the most secure network available. Satoshi Nakamoto explained this in the Bitcoin whitepaper in which he said, “The proof-of-work also solves the problem of determining representation in majority decision making. If the majority were based on one-IP-address-one-vote, it could be subverted by anyone able to allocate many IPs. Proof-of-work is essentially one-CPU-one-vote. The majority decision is represented by the longest chain, which has the greatest proof-of-work effort invested in it. If a majority of CPU power is controlled by honest nodes, the honest chain will grow the fastest and outpace any competing chains.” Miners and node operators make up the proof of work network. While miners compete to solve to produce the next block, node operators run Bitcoin software to automatically validate transactions and blocks to the network.
For a malicious actor to succeed in adding a malicious block, they would have to have enough computational power to equal 51% or more of the total network to be able to even begin to attempt to rewrite blocks and act maliciously.
Proof of work consensus methods vary greatly among Proof of Work coins in terms of block size, algorithm needed to solve, and number of coins released in each block reward. Proof of Work has been criticized by many for the massive amounts of energy required to mine and secure the network. That does add a layer of security as the cost of equipment and energy makes it less appealing to attempt an attack. Proof of work can be very decentralized, but is grossly less energy efficient than the centralized alternatives. Proof of work opponents also point to the network speed of most proof of work projects due to the fact there is delay as consensus is reached, but in more centralized systems, there is near instant transactions with very little latency. This led to some projects looking for a less energy consuming method to achieve consensus in their project’s blockchain. Some attempts to solve the proof of work problems and keep it proof of work have been proposals of either sharding or side chains. Sharding is breaking each block into shards which means each miner only partially mines a block in multiple shards per block. The most popular example of sidechains is the development of the Lightning Network for Bitcoin which takes mass payments in Bitcoin to a sidechain designed where not every transaction is on the Bitcoin network. These different alternatives are still in the build and testing stages as there are dilemmas that need to be resolved with each.
PROOF OF STAKE
Proof of Stake, or PoS, is a consensus method that eliminates the need for costly computer equipment, and instead uses validators to secure blocks.
A validator stakes a certain number of coins, usually determined by the blockchain’s core code, as a sort of financial incentive to act accordingly in securing the network and participating in verifying transactions and confirming blocks. Depending on the protocol, the validator can either be randomly selected to create a block and earn the block reward, or the block reward and transaction fees within a block are distributed to the pool of validators. In terms of the 51% attack as mentioned above, in a proof of stake model, the malicious actor would need to hold more than 51% of the circulating coins. This financial barrier makes it not financially feasible to attack the network as protocols can either cause bad actors to lose coins staked and/or the value of the coin from an attack would drop drastically, impacting the attacker as well. Proof of stake helps to solve the issue of energy consumption with the Proof of Work model since there is no need for high powered computers to constantly run. Instead each validator acts as a node running a much lighter and efficient program that doesn’t drain the computer’s resources.
Proof of Stake also has many varying degrees of consensus, through differing number of coins needed to stake, staking process and timeline, and even how many validators there can be on a network. The more the number of validators, the longer consensus could take even in this model. Critics of proof of stake point to the fact that those with financial means could control a majority stake in the network. Proof of stake networks that are highly centralized with either less validators or high requirements to stake may boast fast, near instant transactions, however, there is less decentralization and in turn less security for the network if one of the validators is corrupt.
If you do not have enough to run your own staking pool, some protocols allow you to lend your coins to a staking pool in which you are then paid a reward over time for staking. To see a list of many of the top coins with staking rewards, visit the Newscrypto.io platform and select Staking Rewards under the Beginners Tab.
DELEGATED PROOF OF STAKE
There have been several variations of Proof of Stake being rolled out with each protocol looking for some variation to either strengthen speed of transactions, security, or decentralization of the network. Delegated Proof of Stake, or DPoS has been used to scale up transactions into the millions per second. EOS is currently using this protocol with a limit set of 21 block producers. Each producer must complete at least one block every 24 hours to stay active and can be automatically removed and replaced if block time exceeds 3 seconds. There is a voting mechanism to choose the block producers for EOS. Due to there only being 21 block producers actively creating blocks, consensus time is relatively fast, even though critics of EOS and this form of Delegated Proof of Stake point to heavy centralization therefore vulnerabilities from attacks could be acted out easier in this consensus method. Each block only needs to have 15 out of 21 producers agree to create a block. As mentioned earlier, faster chains with faster transactions do have a time and place for their use cases.
As you can see, there are many variations of each type of consensus method we detailed here, and there are many more that we have not touched on such as IOTA’s tangle network, Hedera hashgraph, and even Tezos self amending ledger. The method to achieve consensus is important and necessary to be a solid enough protocol that users and network validators or miners trust the network.
Consensus gives us trust in a trustless system. Each method currently has trade offs that must be made. Some are set in their genesis protocol, while others develop over time. Ethereum has been working to roll out Eth 2.0 which proposes to move Ethereum from Proof of Work to Proof of Stake. To be a validator when Ethereum moves to Proof of Stake will take 32 Eth to be staked, which at current value is over $15,000. Other Proof of Stake protocols such as Algorand have no minimum number for staking, and use a more random approach to selecting the block validator. In theory, the more you have the more chances you have of being selected. Proof of Work is called by many as the best standard for consensus, but with the focus on climate change and energy emissions, many new projects are seeking to avoid Proof of Work. Others are increasing block sizes or changing what is transmitted in a way to reduce the computing power needed for Proof of Work.
So many in the cryptocurrency communities brag about one’s speed of transaction and bash slower protocols, even though those slower protocols have use cases more suited for them. No one blockchain is superior to others.
One analogy for this is that it doesn’t matter how fast my sports car is if I need to go through a muddy trail, it is not the best vehicle for my needs. Make sure to bookmark this report so you can return to it in 1, 2, and even 5 years to see what has developed and evolved in the space in terms of consensus methods and blockchain protocols.
Thank you for your attention!
Content written by Coach Blockchain Wayne and NewsCrypto.io