What is a consensus algorithm? Simpler explanation

Initiate
by Tomàs Daniel Avila Visintin
16 December 2023

Index

Do you want to know what a consensus algorithm is? Here you can find the simplest explanation to understand it and the most detailed concepts.

In most cases, the way the world of transactions of goods and services works today, the centralization paradigm applies, in which a central authority acts as an intermediary between the various participants exchanging goods.

So, there is total reliance on the central authority, with all the risks that this entails, among which there are two in particular:

  • Centralization of power;
  • Single point of failure (SPOF) problem, which is the problem of systems in which, if one part of the system has problems, the whole system is affected, leading, in extreme cases, to complete cessation of service.

As we know, blockchain technology presents a solution to the problems related to centralization, offering the possibility of a distributed and decentralized system, in which therefore there will no longer be a centralization of power (as a bank may be) but in which the various actors involved in the system will interact with each other according to a peer-to-peer paradigm, without intermediaries.

Decentralization, however, introduces a number of new problems, among which is that of consensus.

The problem of consensus affects not only blockchain but the entire field of distributed computing, a branch of computer science that deals with distributed systems in which several autonomous nodes communicate with each other through a network with the aim of achieving a common goal.

Consensus and blockchain

Returning to blockchain, we have a ledger distributed among all the nodes in the network, and the ledger needs to be continuously updated by adding new transaction blocks.

Then emerges the problem of defining the blocks to be concatenated, a process called block validation.

It takes a system that allows nodes to be able to trust each other, replacing the trust that, in a centralized system, is placed on the central authority.

The issue of trust is critical because, in a network of many nodes, it is possible for there to be intentionally malicious agents or agents who make mistakes.

For example, a node might propose a block containing malicious transactions (one of the classic problems is double spending).

Therefore, there is a need for a way to prevent such eventualities, allowing the various actors to be able to trust each other and consequently to be able to trust the system as a whole.


The problem of Byzantine generals

To better clarify the extent of the consensus problem, let us present one of the classic examples in the computing world: the Byzantine generals problem.

Imagine a context of war, three or more physically separated Byzantine generals (nodes in the system) have to make a decision: they can attack a fortress or retreat, the important thing is that a common decision is made.

There may be traitors (malicious agents) among the generals who may communicate false information.

The analogy with computer systems is clear. There is no single solution to the problem; many have been proposed, but a basic assumption can be made.

If there were two generals, the problem would be unsolvable. Different is the case where there are 3 generals, a number from which solutions can exist if the number of honest agents is greater than or equal to 2/3 of the total agents.

It is in these cases that we speak of Byzantine Fault Tolerance (BFT), which is the property of a system to be able to withstand the criticality arising from the problem of Byzantine generals, thus continuing to operate even though nodes in the system might fail or be intentionally malicious.

Byzantine Generals
Do you want to know what a consensus algorithm is? Here you can find the simplest explanation to understand it and the most detailed concepts.

The solution: consensus algorithms

Every blockchain has to cope with the problem of Byzantine generals and does so with what are called consensus algorithms, which by now, as you may have guessed, are of paramount importance.

Different blockchains have proposed different solutions to the problem, which we will discuss separately.

The following is a list of the most popular consensus algorithms associated with the blockchains that use them.

Consensus AlgorithmBlockchain and cryptocurrencies
Proof of Work (PoW)Bitcoin, Ethereum 1.0, Dogecoin, Monero
Proof of Stake (PoS)Cardano, Ethereum 2.0
Delegated Proof of Stake (DPoS)Terra, Tron
Leased Proof of Stake (LPoS)Waves
Pure Proof of Stake (PPoS) or Proof of Weight (PoWeight)Algorand
Proof of Elapsed Time (PoET)Hyperledger Sawtooth
Practical Byzantine Fault Tolerance (PBFT)Zilliga (with PoW), Hyperledger Fabric
Simplified Byzantine Fault Tolerance (SBFT)VMware Blockchain
Delegated Byzantine Fault Tolerance (DBFT)NEO
Direct Acyclic Graphs (DAG)IOTA
Proof of Activity (PoA)Decred (DCR)
Proof of Importance (PoI)NEM
Proof of Capacity (PoC)Burstcoin, Storj, Chia, SpaceMint
Proof of Burn (PoB)Slimcoin

Author: Tomàs Daniel Avila Visintin

Did you like the article?

Share it on social