What Are The Different Consensus Protocols Used In Blockchain?

Blockchain technology is frequently hailed for being extremely, if not

What Are The Different Consensus Protocols Used In Blockchain?

Blockchain technology is frequently hailed for being extremely, if not entirely, decentralized. What does that mean? It basically indicates that there is no central authority to keep tabs on or control this technology, to maintain this database. Then how does it still get maintained accurately and chronologically? It does, and in a decentralized way too, because of a nifty tech element called the consensus protocol. In crypto journalism, the terms consensus protocol and consensus algorithm are frequently used interchangeably and we will be sticking to that in this explanation of the various consensus protocols. However, it is to be noted that the term protocol refers to a broad framework for executing functions while algorithm refers to the detailed programming and directions for getting a task completed. Having said that, let us try to understand what we commonly mean by “consensus protocol” in blockchain and what are some of the most common and popular consensus mechanisms available to a blockchain developer.

Why do we need a Consensus Protocol?

Cryptocurrencies, powered by blockchain networks, usually work on a peer-to-peer basis. In addition, they are claimed to be very decentralized. However, this decentralization could not have been bypassed without solving the common Byzantine Generals Problem. In history, if a number of generals from the Byzantine Empire wanted to attack a city that will only fall if all generals join their forces to defeat it, they would suffer from the problem of having no centralised authority to coordinate the generals’ decision. Being spread out across a substantial area,the problem these generals would face is the inability to achieve consensus. This is the same problem that many peer-to-peer currency propositions presented before Bitcoin was introduced in 2008, faced. To solve this issue, we need consensus protocols in place. Of the requirements to build a blockchain, having a consensus protocol that fits the bill is one of the most important. There are a wide variety of such consensus protocols available to us which we will shortly discuss.

What is a Consensus Protocol?

A consensus protocol refers to a mechanism by which all the different nodes of a blockchain system across which the digital ledger is distributed, reach unanimity about which transaction is to be updated onto the ledger and what the true version of that transaction is. At any given point, it is not efficient, from the point of view of time, cost or any other resources, to have ALL the nodes work together and simultaneously to validate EVERY transaction that goes into the ledger. A consensus protocol takes care of this impracticality by assigning the task of validation to certain nodes based on certain unanimously agreed upon criteria.

What are the Most Common Consensus Protocols Used in Blockchain Tech Today?

There are a large number of consensus protocols that are used by different blockchain networks. Here is a short list of some of the most popular and common consensus protocols.

1. Proof-of-Work Consensus Protocol

This one is famously used by the Bitcoin blockchain, the first character to have made an appearance on the crypto-blockchain scene and to have achieved enduring popularity. In proof of work, bitcoin miners compete with one another to solve high order mathematical or cryptographic problems in order to create a new block for the blockchain. Once that is done, other miners verify or validate whether the block should be a part of the chain and the miner gets rewarded for solving the cryptographic puzzle. Now, while this is simple enough, it is not entirely fair and can compromise decentralization somewhat. This is because mining power is dependent on heavy hardware resources such as ASIC ( application specific integrated circuit). Those who can spare the most hardware resources can mine the most and earn the highest rewards. A quick look at the distribution of mining power in the bitcoin blockchain reveals that about 60% of mining power is controlled by just 4 mining pools.

This process wastes quite a lot of time, and makes Bitcoin take up about 10 minutes to confirm each transaction, making the blockchain susceptible to double spending attacks as well. Owing to its inefficiency, Ethereum is also gradually moving away from this protocol.

2. Proof of Stake:

In this system, nodes can turn validators based on whether they have a “stake” in the system, or whether they own tokens and the rights that come with it, on the blockchain system. A list of validators is maintained based upon the stakes members have and the consensus protocol takes into account the agreement of only these validators: members who own stakes in the system. The rewards for validation and maintenance are paid in proportion to the bets each user has placed on the block. This system is more decentralized and less expensive than proof of work and is rather efficient as well. Peercoin and Decred already use this mechanism and Ethereum is making a switch too.

3. Delegated Proof of Stake

This mechanism is a variation of the PoS model. Here validators with stakes in the blockchain elect witnesses who will perform the task of blockchain upkeep and updating of transactions in the ledger. This elected list gets continually changed based on how well the witnesses manage to do their job. Any validator can become a witness if elected and can produce blocks and earn a fee in proportion to the votes they have received on the system. Examples of blockchain networks that use this consensus mechanism are EOS and Graphene.

4. Proof of Importance:

This consensus mechanism is also an improved variation of the PoS model. In Proof of Stake, those who have money to buy tokens as stakes get the opportunity to earn even more rewards as mining fees. As a result, the rich keep on getting richer. To address this issue, we have the Proof of Importance or PoI consensus protocol which bases the right to create blocks or validate on two criteria rather than one:

a) stakes in the system
b) frequency of transactions

Therefore to be able to create more blocks and earn fees out of the process, one must do more than just own stakes in the system. They must also transact quite a lot themselves. A trust score is assigned to them based on vested coin balance as well as transaction frequency and thus score determines whether they get to create blocks or not.

5. Delegated Byzantine Fault Tolerance:

Used by NEO, this consensus mechanism. In this, those who hold the coins elect certain members from amongst themselves to serve as consensus nodes. These consensus nodes complete bookkeeping and ledger maintenance tasks on the network. There are further categorizations in this kind of nodes. Those who intimate the information about the new blocks to all other nodes in the system, are known as speaker nodes. The nodes that receive it are called delegate nodes. These nodes perform the final validation by ascertaining the accuracy and admissibility of the conveyed information. After such validation, the consensus nodes receive the completely formed block, all view data preceding it is removed from the system.

There are many more different types of consensus protocols that maybe used but these are often considered to be the best-known and the most popular. In building a blockchain architecture of your own, as a developer, you should be able to choose the consensus protocol that best suits the use case you’re trying to build. If you are wondering how to become a blockchain developer, having a thorough grounding in blockchain consensus protocols is imperative.