What is a consensus algorithm and why do we need it?

 Blockchain can only be considered decentralized when consensus protocols play their role. This article discusses how consensus algorithm works in blockchain and provides examples of the most popular of them.


In order to avoid duplication in this article, we will dive into the most popular blockchain consensus algorithm . Understanding how it works and determining when and how it can be used will help you hopefully break common illusions about blockchain and gain a practical understanding of the technology. Before we define all the mechanisms of consensus, we must first understand why we need them.


Blockchain is just a way to organize data

Let's look at blockchain more closely:

  • A new approach to organizing the database
  • Store history of all changes without exception
  • Arranges data in a blockchain

As you can see, there is no indication of decentralization here. Because the blockchain itself does not regulate unreliable relationships in a decentralized environment , it merely provides a flexible and secure method for arranging data, which, in addition to the consensus mechanism, may allow the successful operation of a decentralized system.


Conclusion: Blockchain technology allows you to build a database based on a block that stores the complete history of changes, but when you need to organize unreliable relationships in a decentralized environment, there is no way but the consensus algorithm in order to ensure that the changes are safe and compatible with previous changes.

So what does the matching mechanism do?

It is very simple. Consensus or consensus is a way to reach an agreement. A decentralized system without common consensus will collapse in a second. It doesn't even matter whether the participants in the system trust each other. Rather, they need to agree on certain common principles for performance. This is the direct role of the consensus mechanism.

At the moment, there are many different coping mechanisms. Before we review the most popular, it is important to understand two things:

  • To date, there is no single universal way to reach consensus.
  •  There is no good or bad algorithm, it is only about the requirements of computer systems

The most popular blockchain consensus algorithm

Proof of Work or PoW

Proof of Work or PoW


The proof of work mechanism is simply a name after its name. In order to participate in transaction validation, you must generally demonstrate that you have taken a specific action. This rule prevents an attack on the system when an opponent creates fake voters. The more work you do - the higher your chances of proposing the next block (and getting the reward). However, it is important to note that this is not a general rule.

Proof of work is the easiest and most sustainable algorithm (in the context of complete decentralization and anonymity).

In order to increase the chances of winning, users aim to increase the amount of work they do, and to provide better mining equipment , which usually leads to a kind of "arms race".

Proof of stake (PoS)

Proof of stake (PoS)


This mechanism is very similar to the voting between the shareholders of a company, who owns the largest slice of the pie gets the highest power. So it's not about the number of votes, it's about their value.

Users who have the largest share, ie a lot of currencies, are responsible for ensuring that consensus among system nodes is properly achieved. They are also responsible for keeping the network safe from all kinds of attacks and failures, and for confirming false transactions.


In PoW, a 51% attack is theoretically possible, but in practice it is unlikely. Whereas, PoS will face serious problems if more than half of the stakeholders agree with each other. The PoS system design is clearly more complex than the PoW system.

So far, there is no proven system based on PoS. It is still in the development stage.

Delegated Proof of Stake (DPoS)

The basic idea of ​​DPoS Proof of Stake is that every user can vote for delegates - those who approve of transactions. The identity of the delegates is known at the beginning. They could be some decent people known for their accomplishments in the industry, and who have accounts in the system that regular people vote for.

It is important to note that the greater the share of the currency that a particular voter owns - the more he can influence the "election".

Due to the limited number of validation tools, the DPoS algorithm provides faster authentication capacity and transaction confirmation. The best example is BitShares. With the implementation of DPoS, it became the only decentralized system able to compete against centralized services like Visa or MasterCard. In this way, DPoS allows a compromise between capacity and decentralization to be reached.

PoI or Proof of Importance

PoI is a kind of extended version of PoS. Regardless of the amount of coins the participants possess, the algorithm distinguishes the behavioral component between them. (For example, where, when, and how to move coins). Among the most popular PoI implementations there is the NEM movement.

Multiple BFT signatures

These algorithms are primarily used to achieve compatibility between a limited group of people (dozens). Usually all parties in the process know each other, and they are subject to change very rarely.

The Unified Byzantine Agreement

The Unified Byzantine Agreement


The consolidated Byzantine agreement was initially applied to Ripple and was developed on Stellar. This mechanism allows for a consensus to be reached among a large number of (the total number of participants is unknown).

Each participant chooses to trust a limited group of other participants, forming a circle of trust. In the end, a number of trusted circles are obtained that overlap to achieve general consensus across the entire network.

conclusion

We examined the most popular coping mechanisms that have been applied in the real world. Nevertheless, it is important to remember that there is no absolutely perfect way, and that there is no universal way to reach consensus in a decentralized environment. Each has its pros and cons. That is why the algorithms are constantly being updated and supplemented with various add-ons.

Comments

Popular posts from this blog

Bitcoin Prospects for 5 Years

Buy and sell bitcoin via telegram, step by step guide

Atomic swaps: what they are, how they work, and exchange services