Blockchain - Consensus

Blockchain - Consensus

Let's understand Consensus

The general definition - Consensus is a term used to describe a collective decision. It’s more like a general agreement upon which every participating individual agrees.

Blockchain is considered a completely transparent, secure and verifiable decentralized network. It is possible only because of the presence of the consensus protocol which is a core part of any Blockchain network. A consensus algorithm is a procedure through which all the Blockchain network peers reach a common agreement about the present state of the distributed ledger.

BlockchainConsensus-1170x660.jpg

Why Consensus?

For a blockchain network to continue to build and add new blocks, all nodes in the network must agree and come to a consensus. It is the way in which all the nodes in a decentralized network are synced with each other. Without consensus on the decentralized network of nodes in a blockchain, there is no way to ensure that the state one node believes is true will be shared by the other nodes.

Types of Consensus Algorithms -

There are hundreds of consensus algorithms in use designed for specific use cases on each blockchain development. We will look into the most used consensus algorithms below: -

PoW (Proof of Work) -

bitcoin_mining_explained.avif The most popular big daddy of all cryptocurrencies, Bitcoin uses PoW (Proof-of-Work), which requires miners to solve complex cryptographic mathematical puzzles for which they get rewarded with a certain amount of Bitcoins. E.g. Bitcoin’s consensus rules are no double spending, correct format of blocks, a certain amount of reward for miners etc. Blocks that fail to follow these consensus rules will be rejected. A blend of PoW consensus algorithms and the consensus rules offers a strong and reliable network which is secure and ensures that all the nodes in the network agree on a regular global state of the blockchain. The downside is it consumes a lot of electricity around 150 terawatt-hours of electricity annually, which is much greater than the consumption of an entire nation. Since, electronic gadgets mainly ASIC miners, GPUs and sometimes even CPUs are used, this, in turn, leads to the generation of tons of e-waste over time.

PoS (Proof of Stake) -

Learn_Illustration_What_is_Staking.png PoS is a substitute approach for PoW which requires fewer CPU computations for mining. Though this is also an algorithm, and the purpose is the same as PoW, the process is quite different here. As in the case of PoW, a miner is rewarded by resolving mathematical problems and creating new blocks, in Proof-of-Stake, the creator of a new block is chosen in a deterministic way, depending on its wealth, also defined as stake. This means that in the PoS mechanism, there is no block reward. So, the miners take only the transaction fees. The poS mechanism has its own pros and cons, and the actual implementations are quite complex which will be discussed in my upcoming blogs.

Happy Reading!!