How does Blockchain Consensus work?

Rajan Kashyap
UCL CBT
Published in
3 min readNov 27, 2019
Image by Gerd Altmann from Pixabay

The Blockchain Consensus is the process of the agreement by all/set-of parties on the validity of a block ( set of transactions ) and the inclusion of that block on the chain.

There could be thousands of nodes in the network and everyone cannot be allowed to propose valid transaction-set at the same time, hence there is a need to randomly select a node for proposing the new block. The random selection of proposer node ensures that there is no centralized control.

Random selection of the node is done in many ways and that’s what are the different algorithms in the blockchain consensus. This article looks at some of the popular algorithms and process of random node selection within that.

The very first proposed algorithm is Proof-of-work (PoW). This algorithm requires nodes to solve a cryptographic puzzle and whichever node solves it first get the right to propose the next block. The randomness in this algorithm is created by the fact that the cryptographic puzzle can only be solved by brute force, so it almost impossible for the same node to be selected to propose two blocks in a row. Once randomly picked node proposes the block, the rest of the nodes validates the puzzle solution and accepts the new block.

This algorithm has maximum randomness and hence the reliability. However, there is a lot of power wastage as all nodes are racing to solve the puzzle.

Hence the second algorithm getting popular is Proof-of-Stake (PoS). In this mechanism, the nodes that want to be a block proposer has to block some cryptocurrency which will ensure that reliability and honesty of the node. Here the randomness is provided by the fact that there could be many nodes willing to stake money. The highest bidder gets to propose the next block. The randomness reduces to only a certain set of nodes having a lot of cryptocurrencies, but still provide the reliability, because if these nodes behave maliciously the value of cryptocurrency will go down. And they can be penalized as well.

A variation of Proof-of-Stake is Delegated-Proof-of-Stake ( DPoS). In this case, the nodes putting the stake does not themselves propose the block, but they further nominate the nodes who proposes the next block. The randomness is fairly similar to what we have in PoS algorithm.

Proof-of-Authority ( PoA ) is another algorithm where the proposer nodes are pre-defined. This algorithm has the least randomness as nodes are pre-authorized and known. This brings in a lot of centralization characteristics into the blockchain, which is not always desirable, however, there are use cases for such consensus as well.

Intel implemented another way to get randomness is Blockchain Consensus, based on the wait time on the CPU of the node. This algorithm is known as Proof-of-Elapsed-Time ( PoET). This, however, is only available on Intel machines.

Another popular algorithm is Practical Byzantine Fault Tolerance (pBFT). This algorithm does not use a single proposer node of a block, rather every node validates the transact at the same time and majority vote required for the block to be included on the chain.

Although there are many algorithms in various stages of development/proposal, the only proven algorithm is Proof-of-work and is used in the majority of cryptocurrencies.

It will be an interesting space to watch out for the next few years.

--

--

Rajan Kashyap
UCL CBT

Expert in Blockchain, Cloud, Artificial Intelligence and Robotic Process Automation.