How the consensus algorithm works

in cryptocurrency •  4 years ago  (edited)

Frame 245.png

The consensus algorithm is the process of performing a number of blockchain functions, in particular, confirming the correctness of a transaction and its compliance with the protocol (validation). And given the fact that most networks are peer-to-peer, validation cannot be carried out by any single regulator. Accordingly, thanks to the consensus algorithm that confirmation can be processed in automatic mode. The key task is to make sure that each member of the network fulfils its obligations. Given that it is technically easy to make changes to the digital currency, the consensus algorithm plays an important role.

Algorithm meaning ​​is often confused with protocol meaning, but there is a significant difference between them. The protocol is considered to be a list of key rules by which the blockchain must operate. And the algorithm is directly the mechanism for executing these rules.

The most famous consensus algorithms are:

PoW (Proof Of Work) is the first successfully applied algorithm since it is the one, which is used in the BTC network, successfully implemented by Satoshi Nakamoto. The principle of its functioning is the use of the computing power of the participating nodes (validators), whose task is to confirm the correctness of calculations when calculating the hash of new blocks. Similarly, transactions are verified and confirmed within the network. And key information is stored simultaneously on multiple nodes.

PoS (Proof Of Stake) is an algorithm that the ETH team should soon switch to. Its main difference is that confirmation occurs by a randomly selected node, but the choice of a validator node is influenced by its age (time since joining the network) and the number of coins on the account. It verifies the correctness of the transaction automatically and does not require its own facilities.

The consensus algorithm ensures the correct functioning of the blockchain network, being in a sense of its foundation. At the same time, it's task is to prevent any inconsistent changes to the network. It is possible to get around this by using the notorious 51% attack, but its competent implementation is a rather difficult task.

Website: https://exbase.io/ru/
Twitter: @exbase_io_
Facebook: https://www.facebook.com/exbase.io/
Telegram customer support: https://t.me/Exbaseofficial

Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE STEEM!