Different Consensus Mechanisms in Blockchain Network

Koyela Chakrabarti
6 min readAug 10, 2023

--

At the heart of a blockchain network lies the consensus mechanism. It maintains the security of the blockchain by ensuring only the legitimate transactions be saved in a tamper proof manner. This is extremely important in applications based on blockchain mechanism like crypto trading so that the sellers don’t cheat the buyers. The type of consensus mechanism is based on three major factors, namely the existing security level of the network which is largely based on the participants, the time sensitivity of the application and the computational resources available. Based on these factors there are a number of consensus protocols used in blockchain. This article discusses about the important consensus mechanisms used. Based on the purpose of application and type of resources available, one may choose the kind that fits the purpose.

Proof of work (PoW)

This one of the most computationally extensive mechanism consensus protocol where the participating nodes try to find the next block by solving a cryptographic hash function, most commonly a SHA-256. The solved output contains the previous block’s hash, timestamp, nonce and the transactions. Once a node or miner solves a block, it releases the block so that other miner nodes can verify the block. Whenever a block is invalidated, all the blocks built upon that invalid block is also invalidated. Therefore, several confirmation needs to be done for a set of transactions and the associated block to be accepted into the blockchain. The process is both computationally extensive and time consuming.

Proof of Capacity (PoC)

This mechanism is based upon the hard disk capacity of the mining nodes. The miners need to store large data set or plots for a chance to mine the next block. More the number of plots stored, greater is the chance of the node to mine the next block. The average block creation time is about 4 minutes.

Proof of elapsed time (PoeT)

This method is proposed by Intel based on a random timer where the winning miner is chosen whose wait timer expires first. Here the miners need to solve the hash puzzle as in PoW, but the introduction of the timer makes the process of choosing the next block faster. Here Intel based execution environment is used to verify the timer management. The method is low in latency and has a better throughput, but the execution is dependent on Intel therefore is not a fully distributed approach.

Proof of Stake (PoS)

The consensus mechanism preferred most by blockchain architects after PoW where a similar bock mining operation is to be performed with a difference that here, the miner node selected to compute the next hash is chosen with the help of lottery based on the stake of the node in the network. Digital signature is used instead of the puzzle by the mining block to prove the stake ownership. The method incurs low computational overhead but, this choosing of the miner based on the proportion of stakes makes the blockchain centralized. There are some improvisations to the original PoS mechanism like Delegated PoS, Leased PoS, Proof of Importance and Proof of Activity. Delegated PoS or D-PoS where the stakeholders chooses some of the nodes and assign different responsibilities to it. Based on the responsibilities assigned there are two types of nodes, witness or the nodes responsible for creating new block and delegates for maintaining network and take decisions regarding modification of block size, reward amount, transaction charges. Here each stake holder in each round of election votes for N number of witness nodes where N depends on the number of nodes the concerned stakeholder finds appropriate for maintaining decentralization of the blockchain. D-PoS comes with built in functions to detect a mal functioning witness or delegate. It is observed that Bitshares, based on D-PoS on an average adds a block in 1.5 seconds in the blockchain and the maximum time taken to add a block is 3 seconds. Leased PoS (L-PoS) is where node with higher wealth value can lease their wealth to nodes with low balance which increases their chance to get selected for solving the block. This is an effort to reduce the centralization of the block mining of the original PoS. Proof of Importance (PoI) considers both wealth and reputation measured in terms of number of transactions where the node participated in and a system defined function for choosing a node to solve the next block. Proof of Activity (PoA) where a hybrid mechanism is implemented to solve for the new block. The mining process is based on the PoW mechanism and after a block has been mined, the miner’s address and a header is added to the solved block before adding any transactions to it. Then a group of validators are chosen according to the header value of the solved block using PoS. The transactions are then added which are to be signed by the chosen validators for reaching the consensus and adding the block to the chain. The approach is time consuming and might not be suitable for time sensitive applications.

Byzantine Agreement Method

The consensus mechanism used here is based on Byzantine generals problems and the different variations are listed below.

Practical Byzantine Fault Tolerance (P-BFT) which supposes that up to around one-third of the nodes in the network is compromised and therefore mandates that consent of more two-third of the nodes are required to reach the consensus to add the next block. The method incurs low overhead in terms of computation and latency and also has a high throughput, but is resistant to only around one third of the network being compromised. In case of large public blockchain, the number of malicious nodes might exceed this proportion and also, the time and overhead to reach the consensus increases as the network scales higher.

Delegated Byzantine Fault Tolerance (D-BFT) uses a consensus protocol similar to P-BFT, but all the nodes do not participate for reaching consensus. Instead, some nodes are chosen as delegates according to a set of rules to participate in the consensus mechanism. The average block creation time is noted to be 15 seconds.

Stellar Consensus Protocol (SCP) is a decentralized public blockchain based consensus protocol where nodes that belong to the intersecting group or federates executes a consensus mechanism local to it’s members. The intersecting nodes are called quoram and the local members of the quoram is called a quoram slice. There are a set of quorams who participate in the global consensus mechanism and the decision of each quoram is dependent on the result of the local consensus of the quoram slice. SCP has low computational needs and the latency is comparatively lower.

Ripple is similar to SCP where the miners choose a subset of nodes for reaching the consensus n case of a large network. The nodes in the network are categorized as either server or client. The server nodes carry out the consensus protocol and clients transfer funds. Each server maintains a list of nodes responsible to reach the consensus. When 80% of the nodes in the list agree, the block is added.

Tendermint is a Byzantine Fault Tolerant based consensus mechanism where the voting power of a node is proportional to it’s stake.

Verifiable Random Function (VRF) based methods

Here participants for reaching the consensus is randomly selected. There are two types of VRF based algorithms namely Dfinity and Algorand. But both suffer from time latency.

Sharding based methods

Sharding refers to the process of distributed processing of the transactions among small set of nodes called shards. The method utilizes parallel processing of communication, computation and storage The different types of sharding includes RSCoin which is a centralized framework that makes banking processes more transparent. But the mechanism works on monetary supply which renders it unsuitable for IoT application. Another is Elastico which is built on Byzantine Fault tolerance architecture using PoW for the consensus. It incurs substantial network overhead and can work with only one-fourth of the network nodes being compromised and thus is not a scalable and robust protocol. Another mechanism is the RapidChain which works in case of public blockchain with one-third of the network being compromised. It gives full sharding for storage, communication and computation.

A comparative account of the consensus mechanisms discussed.

--

--