A consensus mechanism is used to reach an agreement on a specific blockchain. Consensus, refers to the common value and ideal that are sought by people of different levels representing different benefits. To put it simply, consensus represents generally accepted opinions or decisions among a group of people, while mechanism means a protocol or rule. For example, Both Jack and Jane recognize that Bitcoin is digital gold. We can say “Bitcoin is digital gold” proves the consensus of Jack and Jane. The affirmation method of “Bitcoin is digital gold” is the mechanism, such as Jack and Jane’s recognition of Bitcoin featuring rareness and store of value. In summary, a specific rule applied to block nodes for accurate record-keeping is called a consensus mechanism.
The consensus mechanism is not a unique concept in the world of blockchain. For instance, the principle of “the minority being subordinate to the majority” is a consensus mechanism in everyday life. This well-known concept is widely used in record-keeping on verified blockchains. In other words, a specific rule applied to block nodes for accurate record-keeping is called consensus mechanism, namely multiple algorithms, and protocols.
The Purposes of a Consensus Mechanism?
The essence of blockchain lies in decentralization, to which the key is consensus mechanism. Thus, the consensus mechanism is known as the soul of a blockchain. Consensus mechanisms adopted by different blockchains are all committed to building trust among individuals when there is no trust without the control of centralized institutions. The consensus mechanism’s essence lies in solving problems of record-keeping for distributed ledgers. The main differences among various blockchain consensus mechanisms center around how the right to add data to the blockchain is distributed among network participants, how this data is validated by the network as an accurate account of transactions, and how the data is kept consistent.
Common Consensus Mechanisms
1. Proof of Work (PoW)
The proof of work (PoW) is a common consensus algorithm used by the most popular cryptocurrency networks like Bitcoin to confirm ownership of record-keeping rights based on the workload. PoW is a process of distribution according to work. All nodes on the blockchain contribute computing power, which can be analogized as solving a math problem. The node that first answers it becomes a block producer to get the record-keeping right and block rewards.
On the one hand, PoW has advantages of a simple algorithm, easy to achieve, free access to nodes and high decentralization. Moreover, it provides robust security as breaking into the blockchain requires high costs. On the other hand, PoW’s block confirmation process is hard to shorten in order to ensure decentralization. Meanwhile, PoW has no stopping feature, which needs a checkpoint mechanism to make it up. PoW also has a considerable energy resource cost and requires expensive hardware equipment.
2. Proof of Stake (PoS)
Instead of hashrate, Proof of Stake (PoS) adopts staking to confirm record-keeping right ownership. The more stakes, the more chances a node has to win the record-keeping right. PoS can be regarded as a process of distribution according to stake. Peercoin, the earliest practitioner of PoS, pegged block record-keeping right to token ages. The older the token is, the easier it to be mint.
PoS has the strength of higher efficiency with less time spent on reaching a consensus and less energy-consuming. Its weakness comes from complex rules to obey, and more dependence on humanity, which leads to the bigger potential of security problems.
3. Delegated Proof of Stake (DPoS)
In this consensus mechanism, cryptocurrency token holders use their balances to elect a list of nodes that will be able to stake blocks to add to the blockchain, which is analogized as voting in the board of directors. EOS is a representative blockchain using DPoS.
DPoS has the advantage of requiring fewer nodes to verify and record data, which advances in consensus-reaching efficiency. However, operating with the dependence of tokens, DPoS has weaknesses in decentralization and security like PoS.
4. Nominated Proof of Stake (NPoS)
Nominated Proof of Stake (NPoS) is another consensus mechanism developed from PoS. In NPoS, cryptocurrencies holders can stake their own tokens, choose validators they trust to operate nodes and produce blocks and finally share in validators’ block rewards. NPoS adopts a hybrid of BABE and GRANDPA algorithms for producing blocks and confirmation. Polkadot is a representative using NPoS.
NPoS improves efficiency in producing blocks and confirmation while maintaining blockchain security. It innovatively separates block producing from confirmation and uses different algorithms for them.
5. Directed Acyclic Graph (DAG)
DAG known as Directed Acyclic Graph is a data structure that uses topological ordering to store blocks instead of chained structures. In DAG, N blocks can be packed in parallel with the block packing time unchanged. Therefore, it is initially used to improve blockchain efficiency. DAG initiates the concept of block-lessness that dramatically improves transaction efficiency.
DAG features fast transactions, free from mining and low transaction fee. However, due to the network’s small scale, DAG doesn’t perform well regarding decentralization and security.
6. Practical Byzantine Fault Tolerance (PBFT)
This consensus mechanism provides a fault tolerance of (n-1)/3 in the premise of blockchain activeness and security. It is a method to reach consensus among well-running nodes on the blockchain networks including broker’s servers, well-performed ones, broken-down ones. To put it simply, the accuracy of record-keeping will be ensured if the number of all nodes exceeds the amount of 3N when there are the amount (N) of nodes.
In terms of merits, PBFT makes the blockchain operation independent of cryptocurrencies, and can support high-frequency trading attributed to its high efficiency. Nevertheless, in PBFT, the blockchain would break down when at least one-third of record-keepers stop working. Moreover, PBFT doesn’t work well in decentralization.
Factors to Evaluate Consensus Mechanism Performance
Ability to avoid attacks including double-spend, selfish mining, etc. and high fault tolerance
Scalability of network nodes and system payloads with the increasing number of nodes and transactions.
The total amount of time spent on block confirmations, or the number of transactions dealt with by the system per second.
All resources are consumed when a consensus is met, such as hardware devices and systems’ computing capacity.