Understanding the blockchain consensus protocol

Understanding the blockchain consensus protocol

Consensus protocol, also called consensus algorithm seeks to solve the biggest problem that distributed systems face. It ensures that consensus (general agreement) is achieved through integrity, reliability, consistency and transparency in the decisions it takes.

The blockchain, a distributed decentralized network that provides immutability, privacy, security, and transparency needs the consensus algorithm. The blockchain, with no central authority to authorize and verify the transactions, considers the transactions in the blockchain to be completely secured and easily verifiable. This is only possible because of the consensus algorithm which is a core part of any blockchain network.

A blockchain consensus algorithm is a process where the peers of the blockchain network come to an agreement about the present state of the distributed ledger. To achieve consensus, at least 51% of the nodes on the network must agree on the next global state of the network. The most common application of the algorithm is to determine whether a transaction needs to be implemented or not.

Different types of consensus algorithm

There are different types on consensus algorithms and each blockchain environment has a valid reason/standpoint (reason might be price, computational power or difficulty in its implementation) in adopting a specific consensus algorithm. Let’s get started on the different types of algorithms out there.

  • Proof of stake

Proof of stake rewards validators (who stake an amount of coins to participate in the system) through an incentive mechanism to reach to an agreement. The nodes that have staked their coins will have their say when a consensus needs to be agreed upon. If a staking node fails to vote for the valid transaction, they will lose their stake (coins). If it succeeds, it will hold better chances to stake when a next transaction takes place.

An issue with proof of stake is that, the more a node stakes in verifying transactions, the more the nodes can vote.

  • Proof of burn

Proof of burn follows the principle of “burning” the coins held by the miners to grant them mining rights. To “burn” the coins, miners send them to a verifiably un-spendable address. With the transfer of the coins to the un-spendable address, miners earn a privilege to mine on the system based on a random selection process.

Proof of burn also has an interesting issue similar to proof of stake as mining power simply goes to those who are willing to burn more money.

  • Proof of view

Verasity’s proof of view certify that views gathered by a specific content posted on the platform are real, authentic views that are verified by the community, and recorded as immutable public records. The patent-pending technology ensures that the view metrics on Verasity are accurate, secure, real, and transparent. No more fake views. The consensus algorithm requires no mining activity and is used in verifying content to prevent fraud gathered through views.

  • Proof of authority

Proof of Authority is a branch of the Proof of Stake consensus algorithm where network participants stake their identity and reputation instead of coins. This means that validators in proof of authority systems are known people that put their reputations on the line for the right to validate the blocks.

The proof of authority identity requirement makes it impossible to be implemented by public blockchains (e.g ethereum) as miners don’t need to disclose there identities.

  • Proof of work

By far the most popular consensus algorithm in the blockchain ecosystem as it is implemented by both bitcoin and ethereum (ethereum is switching to proof of stake). In a proof of work system, miners are rewarded for updating the blockchain. This consists of using computing power to solve mathematical equation and results in a monetary reward. This mathematical equations are cryptographic puzzles and requires a lot of computational power. The more computational power a miner has in their possession, the more chance they have in solving the equation and getting rewarded.

The resource-intensive nature of the proof of work system makes it a very inefficient way in achieving consensus.

  • Proof of capacity

Also known as proof of space or proof of storage, proof of capacity is a mechanism which require the use of a substantial resource in form of memory or disk space allocation to create a proof which shows an interest in the network.

Instead of investing in expensive hardware or burning coins, validators are required to invest their hard drive space. The more hard drive space validators possess, the better are their chances of getting selected for mining the next block and earning the block reward.

  • Proof of activity

Proof of activity is a combination of two blockchain consensus algorithms: proof of work and proof of stake. For this combination of algorithms to be possible, proof of activity goes through two phases.

The first phase uses the approach already known from Proof of Work: miners compete against each other with their computing power and try to solve a complex problem to create a new block for the blockchain.

Once that block is generated, the system moves to the second phase. This phase is about choosing validators and the selection process is random. The chances of being selected increase with the number of coins a participant (whom had gone through phase one ) owns in that network, just like in regular proof of stake. Once all the selected validators have signed or confirmed the block, it can be completed and attached to the blockchain.

  • Proof of elapsed time

Proof of elapsed time is similar with the proof of authority algorithm where the identity of the validators is a necessity. This algorithm follows a lottery system that spreads the chances of winning equally across network participants, giving every node the same chance. This makes the proof of elapsed time one of the fairest consensus algorithms as amount of coins or computational power isn’t a determinant in being assigned a node. The algorithm generates a random wait time for each node in the blockchain network and the winner is the validator which has least timer value. The block from the winning validator node gets added to the blockchain network.

  • Proof of weight

With proof of weight, every user on the network has a “weight” assigned to them. This weight varies and can be based on how much money that user holds in their account or the amount of interplanetary file system (IPFS) that a user has stored. The more “weight” validators have, the better are their chances of getting selected for mining the next block.

  • Proof of importance

Proof of importance systems are designed to reward users who actively transact in a cryptocurrency by prioritizing miners based on the amounts and sizes of transactions made from their wallets. A proof of importance system may account for additional factors, such as the wallets to and from which transactions are made. This is uniquely different from the proof of stake algorithm as user who stake more coins (without transacting) are given priority.

Conclusion

There are varying algorithms with different purposes. If you’re creating a blockchain and decide you want to know your validators, you should consider the proof of elapsed time or proof of authority consensus algorithm. Also, don’t use algorithms that require a lot of computational power if you want your blockchain network to be more efficient.

Credits