Consensus Algorithms in The Blockchain


From this article you will find that in every cryptocurrency, there is an algorithm of consensus and no such algorithm is perfect, but each has its strengths, and in the world of cryptocurrency, the algorithms of consensus usually solve the problem of double spending and many other issues.

Here’s a classification of the types of cryptocurrency Consensus that are popular at the moment:

Proof-of-Work [(PoW) – OG Consensus]

More popular implementations: Bitcoin, Ethereum, Litecoin, Dogecoin, (most of them)

Advantage: We know it works

Disadvantage: Slow processing, high energy consumption

Proof-of-Work was the first algorithm of consensus blockchain. Designed by Satoshi Nakamoto for use in the Bitcoin block, the PoW implementation we can observe today in massive mining operations and the energy consumption we see around the world.

We know it works (which is much more than we can say for many other consensus algorithms), but at this stage of the game for over 10 years, it already begins to be considered an old technology. Even Ethereum migrate away from the PoW for more energy and economic efficiency.

In PoW, miners solve heavy and unnecessary problems to create blocks. PoW runs on a system with “The longest wins of the chain”. So assuming that most miners work on the same chain, the fastest growing one will be the longest and most trustworthy. Therefore, Bitcoin is safe, as long as more than 50% of the work put into practice by miners is honest.

Proof-of-Stake (PoS)

More popular implementations: Decred, Ethereum, Peercoin

Advantage: Attacks are more expensive, more decentralised, energy efficient

Disadvantage: Nothing at stake

In PoS, the blocks are not created by the miners who work, but by the mines that impose their chips to “bet” on which blocks are valid. In the case of a fork, the cryptocurrency owners put the chips at stake, voting on which fork to support.

Assuming that most people vote on a fair fork, and the validators who voted a wrong fork will “lose their stakes” in the right one. The common argument against the stake is the problem that there’s nothing at stake. The problem lies in the costs of validators, which have almost no computing power to support a fork, unlike the PoW, validators could vote for both sides of each fork that happens. So, the PoS forks could be much more common than in PoW, which some might worry about to harm the credibility of the coin.

Delegated Proof-of-Stake [(DPoS) You choose the validators]

More popular implementations: Steemit, EOS, BitShares

Advantage: cheap, scalable, energy efficiency transactions

Disadvantage: Partially centralised

It’s very different from PoS. In DPoS, chip stake holders do not vote on the validity of blocks, but vote to choose delegates to make validation on their behalf. There are generally between 21-100 delegates elected in a DPoS system. The delegates are regularly shuffled and given an order to deliver their blocks. With few delegates it allows them to organize efficiently and create designated time slots for each delegate to publish their block. If delegations always lose their blocks or publish invalid transactions, stake holders vote and replace them with a better delegate.

In DPoS, the miners can collaborate to make blocks instead of competing like in PoW and PoS. By partial centralization of building blocks, DPoS can execute orders of size faster than most consensus algorithms. EOS is set to be the first blockchain with lock times < 1 Second! And a lock time of 10 minutes lower than in bitcoin.

Proof-of-authority [(PoA) Trust to know everything or you will respect my authority]

More popular implementations: PoA network, Ethereum Kovan testnet

Advantage: Scalable, high performance

Disadvantage: Centralized system

The authorization document is a consensus algorithm in which transactions are validated through approved accounts, such as “Administrators” System. These accounts are the authority that other nodes receive as the truth. The PoA has a large capacity and is optimized for private networks. It is unlikely to see that the PoA is running on a public chain due to its centralised nature.

Popular implementations: Algorand, Filecoin, Chia

Advantage: Customizable, scalable

Downside: Encouraging can be a challenge

PoWeight is a broad classification of consensus algorithms based on the model of the Algorand consense. The general idea is that if, in PoS, the percentage of chips held on the network is the probability of “uncovering” the next block, in a PoWeight system, another relatively weighted value is used. Specific example: Filecoin’s PoSpacetime file is weighted depending on the amount of IPFS data you store. Other systems could include weights for things like PoReputation.

Byzantine Fault Tolerance [(BFT)  Tolerance of Byzantine defects – Associate block!]

More popular implementations: Hyperledger, Stellar, Dispatch, Ripple

Advantage: High performance, low cost, scalable

Downside: Semi-confidence

It is a classic problem that is based on the distribution of computing, which is usually explained with an example of an attack on a city by Byzantine generals. The problem is that several Byzantine generals and the respective portions of the Byzantine army have surrounded a city. They must unisonly decide whether to attack or not. If some generals attack without the others, their siege will end in tragedy. Generals are usually separated by a certain distance and must send messages to communicate. Several cryptocurrency protocols use a version of BFT to reach a consensus, each having their own arguments and against them:

  • Practical Byzantine Fault Tolerance (PBFT – the threshold of sudden Byzantine tolerance): one of the first solutions to this problem was that of sudden gross practical tolerance. Pro: High Transaction transmission and Con: centralised/permitted.
  • Federated Byzantine Agreement (FBA-Byzantine federal Agreement): FBA is another class of solutions to the generalised Byzantine problem, used by coins such as Stellar and Ripple. The general idea, would be that every Byzantine general, responsible for his own chain, orders that messages which come will determine the truth. In Ripple, Generals (Validators) are preselected by the Ripple Foundation.

For its incredible ability, low transaction cost and network scaling, I think the FBA class of consensus algorithms is the best I’ve discovered for the distributed consensus.

Directed Acyclic Graphs [(DAG) targeted acyclic diagrams – i.e. block lock chains]

More popular implementations: Iota, Hashgraph, Raiblocks/Nano

Advantages: Network scaling, low cost

Disadvantages: Depends on implementation

DAGs represent a form of consensus that does not use the building’s data structure and manages asynchronous transactions, delay meaning that theoretical transactions can reach an infinite number per second, but the DAGs have strengths and weaknesses Like any other consensus.

Tangle: Is the DAG consensus algorithm used by IOTA. To send an IOTA transaction, you must confirm two previous transactions that you receive. Consensus “Two-for-one, Pays-before” strengthens the validity of transactions, the more transactions are added to the tangle

Because the consensus is established by transactions, theoretically, if someone can generate 1/3 of transactions, they could convince the rest of the network that invalid transactions are validated. Until the transaction volume is not enough, creating 1/3 of the volume becomes impossible, then IOTA generates a “double” control of all network transactions in a centralized node called “The Coordinator”. IOTA says “The Coordinator” works as a training wheel for the system and will be eliminated once the Tangle is large enough.

Hashgraph: It is a consensus of gossip-protocol developed by Leemon Baird. Nodes share known transactions with other vertices at random, so that eventually all transactions are gossiped around all nodes. Hashgraph is very fast (250,000 transactions per second), but is not resistant to the Sybil attacks. Therefore, Hashgraph is an excellent option for private networks, but you will not be able to see it implemented on a public network like Ethereum, in any case not recently.

Block-Lattice: Nano (formerly Raiblocks) runs with a twist on the chain of blocks called “Block-lattice“. The block chain is a structure in which each user (address) has their own chain that only they can write, and everyone has a copy of all the chains.

Each transaction is broken down to both the shipping block in the sender’s chain and the receiving chain. The chain of blocks seems almost too simple to work, but it’s already there in the wilderness. The unique structure does not allow the chain to open to unique attack vectors, such as the Penny-spend attack, where the attackers inflate the number of chains and the node must follow, sending negligible amounts to a wide range of empty wallets.

SPECTRE: Serialization of Proof-of-work Events: Confirming Transactions via Recursive Elections – better known as SPECTRE, is a proposed solution for scaling Bitcoin that uses a combination of PoW and DAG to reach a scalable consensus. In SPECTRE, the blocks are mined that indicate more parents, not just one, so the network could potentially manipulate several blocks per second. Extending a block that indicates certain parent blocks supports the validity of these blocks. Compared with the “longest wins of PoW’s chain”, SPECTRE uses something like “blocks with the greatest victory for children”. SPECTRE has not yet been tested in the wild, and new attack vectors may appear, but it resembles a lot of a potentially intelligent way to repair Bitcoin.

That's all folks!


Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.