3 min read

Consensus algorithm in blockchain - Explained

Consensus is not a new concept, it has been around for as long as we human beings have lived. In simple terms, consensus is a way for diverse group to make decision without conflict.
Consensus algorithm in blockchain - Explained
Photo by fabio / Unsplash

We know that Blockchain is a distributed decentralized network that provides immutability, privacy, security, and transparency. The innovation with a blockchain is that it guarantees the fidelity and security of a record of data and generates trust without the need for a trusted centralised party.

Wait, it is decentralised and yet there is a trust? How is this possible? In a traditional transaction, there will be a governed central authority who will maintain and update the database (put a tappa/signature on the record). But in blockchain, there is no such authority as it is completely distributed and decentralised. Then how the transactions in this are verified? and how can this be trusted? That is where the consensus mechanism comes into play.


Consensus Mechanism

Consensus is not a new concept, it has been around for as long as we human beings have lived. In simple terms, consensus is a way for diverse group to make decision without conflict.

According to Edward Shils ‘The concept of consensus’ three things are needed for consensus

👉🏼 The common acceptance of laws, rules and norms

👉🏼 The common acceptance of institutions that apply these rules

👉🏼 A sense of identity or unity, so group members accept that they’re equal in respect to the consensus

💡
All blockchain networks are distributed ledgers and all distributed ledgers are not blockchains

In a distributed systems or process, connected computers (work together as a group even if some of its members fail) uses a consensus algorithm to reach a common  agreement point about the current state of the distributed ledger and be able to trust unknown peers in a distributed computing environment.

Why do we need a consensus mechanism in blockchain?

In the distributed systems like Blockchain, there were two problems to be solved

⚠️ Double Spending

⚠️ Byzantine Generals Problem

Double spending is reusing the currency in two transactions at the same time. The traditional currency is the entity, so we will not face the problem of double spending while using traditional currency. We can also solve the double spending problem in the Internet transactions with the centralised trusted institutions. Blockchain solves this problem with the method of verifying the transactions by many distributed nodes together.

Byzantine Generals Problem is the problem in the distributed system. The data can be delivered between different nodes through peer-to-peer communications. However, some nodes may be maliciously attacked, which will lead to the changes of communication contents. Normal nodes need to distinguish the information that has been tampered and obtain the consistent results with other normal nodes. This also needs the design of the corresponding consensus algorithm.

What are the major parameters of a consensus algorithm in blockchain?

Decentralised Governance: Every participant in the network has same value in the voting and a single authority can not provide finality for a transaction

Quorum Structure: Each node in the network exchange information in the predefined ways

Authentication: Provide a means to verify identity of the participants in the network

Integrity: Through cryptography, enforce validation of transaction integrity

Nonrepudiation: Verify if the transaction is really initiated

Privacy: Only a intended recipient can view the message

Fault Tolerance: Network should operate efficiently and quickly even if some of the participant nodes fail

What are the different consensus available?

Now we know what a consensus mechanism is and why we need it in a blockchain network. What are the parameters a consensus mechanism should consist of?

Is there a specific or single consensus mechanism all blockchain networks use? No. There are many consensus algorithms which are used by different blockchain networks. Following are few consensus mechanisms

  • Proof-of-Work
  • Proof-of-Stake
  • Delegated Proof-of-Stake
  • Leased Proof-Of-Stake
  • Proof of Elapsed Time
  • Practical Byzantine Fault Tolerance
  • Simplified Byzantine Fault Tolerance
  • Delegated Byzantine Fault Tolerance
  • Directed Acyclic Graphs
  • Proof-of-Activity
  • Proof-of-Importance
  • Proof-of-Capacity
  • Proof-of-Burn
  • Proof-of-Weight

Consensus mechanism is a core technology of the blockchain. Even though we have these many consensus mechanisms, none of them claim to be perfect and each of these have their own pros and cons. These mechanisms make their respective blockchain network so versatile.


Hope you got to know the consensus mechanism. Let me know your thoughts and share your comments below. I will try to explain a few major consensus mechanisms in the coming posts.

For further reading on the blockchain space, you use following resource

  1. Bitcoin: A peer-to-peer electronic cash system white-paper
  2. Blockchain Revolution - A useful primer on the concept of a decentralised currency based in the digital world If you’re interested in Investing / Trading in Crptocurrencies, you can use Vauld. Very easy and convenient app to buy cryptocurrencies from India.

Source:

https://blockhack.osive.com/_downloads/33a65d87de38eaf5b8d817681a3e4674/7.pdf

https://assets.kpmg/content/dam/kpmg/pdf/2016/07/kpmg-blockchain-consensus-mechanism.pdf