The Wayback Machine - https://web.archive.org/web/20240812000239/https://www.geeksforgeeks.org/consensus-algorithms-in-blockchain/
Open In App

Consensus Algorithms in Blockchain

Last Updated : 22 Dec, 2022
Comments
Improve
Suggest changes
Like Article
Like
Save
Share
Report
News Follow

Prerequisites: Introduction to Blockchain technology | Set 1, Set 2 We know that Blockchain is a distributed decentralized network that provides immutability, privacy, security, and transparency. There is no central authority present to validate and verify the transactions, yet every transaction in the Blockchain is considered to be completely secured and verified. This 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 peers of the Blockchain network reach a common agreement about the present state of the distributed ledger. In this way, consensus algorithms achieve reliability in the Blockchain network and establish trust between unknown peers in a distributed computing environment. Essentially, the consensus protocol makes sure that every new block that is added to the Blockchain is the one and only version of the truth that is agreed upon by all the nodes in the Blockchain. The Blockchain consensus protocol consists of some specific objectives such as coming to an agreement, collaboration, cooperation, equal rights to every node, and mandatory participation of each node in the consensus process. Thus, a consensus algorithm aims at finding a common agreement that is a win for the entire network. Now, we will discuss various consensus algorithms and how they work.

  1. Proof of Work (PoW): This consensus algorithm is used to select a miner for the next block generation. Bitcoin uses this PoW consensus algorithm. The central idea behind this algorithm is to solve a complex mathematical puzzle and easily give out a solution. This mathematical puzzle requires a lot of computational power and thus, the node who solves the puzzle as soon as possible gets to mine the next block. For more details on PoW, please read Proof of Work (PoW) Consensus
  2. Practical Byzantine Fault Tolerance (PBFT): Please refer to the existing article on practical Byzantine Fault Tolerance(pBFT).
  3. Proof of Stake (PoS): This is the most common alternative to PoW. Ethereum has shifted from PoW to PoS consensus. In this type of consensus algorithm, instead of investing in expensive hardware to solve a complex puzzle, validators invest in the coins of the system by locking up some of their coins as stakes. After that, all the validators will start validating the blocks. Validators will validate blocks by placing a bet on them if they discover a block that they think can be added to the chain. Based on the actual blocks added in the Blockchain, all the validators get a reward proportionate to their bets, and their stake increase accordingly. In the end, a validator is chosen to generate a new block based on its economic stake in the network. Thus, PoS encourages validators through an incentive mechanism to reach to an agreement.
  4. Delegated Proof Of Stake (DPoS): This is another type of Proof of Stake consensus algorithm. This type of consensus mechanism depends on the basis of the delegation of votes. The users delegate their votes to other users. Whichever user then mines the block will distribute the rewards to the users who delegated to that particular vote. Refer to the article Delegated Proof of Stake for more.
  5. Proof of Burn (PoB): With PoB, instead of investing in expensive hardware equipment, validators ‘burn’ coins by sending them to an address from where they are irretrievable. By committing the coins to an unreachable address, validators earn the privilege to mine on the system based on a random selection process. Thus, burning coins here means that validators have a long-term commitment in exchange for their short-term loss. Depending on how the PoB is implemented, miners may burn the native currency of the Blockchain application or the currency of an alternative chain, such as bitcoin. The more coins they burn, the better their chances of being selected to mine the next block. While PoB is an interesting alternative to PoW, the protocol still wastes resources needlessly. And it is also questioned that mining power simply goes to those who are willing to burn more money.
  6. Proof of Capacity: In the Proof of Capacity consensus, validators are supposed to invest their hard drive space instead of investing in expensive hardware or burning coins. The more hard drive space validators have, the better their chances of getting selected for mining the next block and earning the block reward.
  7. Proof of Elapsed Time: PoET is one of the fairest consensus algorithms which chooses the next block using fair means only. It is widely used in permissioned Blockchain networks. In this algorithm, every validator on the network gets a fair chance to create their own block. All the nodes do so by waiting for a random amount of time, adding proof of their wait in the block. The created blocks are broadcasted to the network for others’ consideration. The winner is the validator which has the least timer value in the proof part. The block from the winning validator node gets appended to the Blockchain. There are additional checks in the algorithm to stop nodes from always winning the election, and stop nodes from generating the lowest timer value.

There also exist other consensus algorithms like Proof of Activity, Proof of Weight, Proof of Importance, Leased Proof of Stake, etc. It is therefore important to wisely choose one as per the business network requirement because Blockchain networks cannot function properly without the consensus algorithms to verify each and every transaction that is being committed.


Previous Article
Next Article

Similar Reads

Proof of Burn Consensus Algorithm in Blockchain
Blockchain is the backbone technology of digital cryptocurrency Bitcoin that allows digital information to be decentralized and distributed. It provides immutability, privacy, security, and transparency. In Blockchain no central authority is present to validate and verify the transactions, yet every transaction in the Blockchain is completely secur
6 min read
Proof of Weight (PoW) Consensus Mechanism in Blockchain
A blockchain is a distributed ledger in which a record of transactions made in Bitcoin, or another cryptocurrency is maintained across several computers that are linked in a peer-to-peer network. The Blockchain ledger is immutable, decentralized, digitized, secure, traceable, and scalable and generates a great sense of trust by incorporating a cons
5 min read
Cryptographic Consensus Mechanisms in Blockchain
A consensus mechanism is an algorithm that is used to achieve agreement, trust, and security across a decentralized computer network. These protocols help to make sure that all the nodes are synchronized with each other and agree on transactions, which are legitimate and are added to the blockchain. What is Consensus? Blockchain is a distributed le
11 min read
How does Ripple Protocol Consensus Algorithm work ?
Ripple Transaction protocol (RTXTP) is a blockchain protocol that possesses most of the characteristics of the more popular protocols like Bitcoin and Ethereum. But what makes it unique is its streamlining in accordance with the aim of affordable and efficient transfer of funds, globally. The protocol achieves this efficiency, especially in terms o
4 min read
Proof of Authority consensus
In blockchain platforms, consensus mechanisms can be divided into permissionless (eg., Ethereum, Bitcoin) and permissioned (eg Hyperledger, Ethereum Private). Unlike permissionless blockchain where anyone can become node, in permissioned blockchain all nodes are pre-selected. This allows to use consensus types with high scalability and bandwidth. O
4 min read
Consensus in Hyperledger Fabric
Hyperledger Fabric is a Distributed Ledger technology developed by Linux, it is open-source and enterprise-grade. It was primarily developed to help in the development of Decentralized Applications that use Blockchain Technology. Consensus plays a vital role in Hyperledger Fabric because it confirms the agreement of all the participants (blocks) in
13 min read
PAXOS Consensus Algorithm
The PAXOS consensus algorithm is a foundational algorithm in distributed computing. It was introduced by Leslie Lamport in 1989. It was designed to solve the consensus problem in the network of asynchronous processes. This article focuses on discussing the PAXOS algorithm in detail. Table of Content What is the PAXOS Consensus Algorithm?History of
14 min read
Create simple Blockchain using Python
Blockchain is a time-stamped decentralized series of fixed records that contains data of any size is controlled by a large network of computers that are scattered around the globe and not owned by a single organization. Every block is secured and connected with each other using hashing technology which protects it from being tampered by an unauthor
8 min read
Flutter and Blockchain - Hello World Dapp
This tutorial will take you through the process of building your first mobile dapp - Hello World Dapp! This tutorial is meant for those with a basic knowledge of Ethereum and smart contracts, who have some knowledge of the Flutter framework but are new to mobile dapps. In this tutorial we will be covering: Setting up the development environmentCrea
9 min read
Integration of Artificial Intelligence and BlockChain
Artificial Intelligence and Blockchain are proving to be quite a powerful combination, improving virtually every industry in which they're implemented. These technologies can be combined to upgrade everything from food supply chain logistics and healthcare record sharing to media royalties and financial security. The integration of AI and Blockchai
8 min read
Article Tags :
three90RightbarBannerImg