How Does a Consensus Mechanism Work?

What Is a Consensus Mechanism?

What Is a Consensus Mechanism?

When discussed in regards to blockchains, “consensus” refers to the agreement reached among the majority, at least 51% of the network’s nodes, about the next state of the network. As for “consensus mechanisms,” these are fault-tolerant mechanisms used in blockchain systems to assist in reaching the necessary agreement on a network’s single data value or single state. They are helpful for record-keeping and enable distributed systems to cooperate and stay secure.

Key Takeaways

  • Consensus mechanisms are used in blockchains to ensure that the nodes are synchronized with each other and have reached a consensus on transactions.
  • Many newer consensus mechanisms are based on Proof of Stake or Proof of Work mechanisms.
  • The main types discussed are Delegated Proof of Stake, Proof of Capacity, Proof of Identity, Proof of Authority, and Proof of Activity.
  • Each mechanism has its unique characteristic, like using the hard drive space in PoC or the combination of POW and PoS in Proof of Activity.

How Does a Consensus Mechanism Work?

Each type of consensus mechanism has its specific roles and how it works. But most have one thing in common: they all try to reach a consensus on the next block of transactions. For example, in a Proof of Work system, the miners responsible for validating new transactions compete with each other to determine who will validate the next transaction block.

The winner then receives a substantial mining fee paid by the users who send transactions using the network. Aside from ensuring that the miners agree on the next block, the consensus mechanism also distributes the information in the new blocks to the other miners, which anyone can download as a node.

What are The Main Types of Consensus Mechanisms?

We have discussed the most well-known ones like Proof of Work and Proof of Stake, along with some that are more specific to certain blockchains (Polkadot network, Elrond network, etc.) in our other blogs, so this time we will present the ones that we have not presented yet.

What are The Main Types of Consensus Mechanisms?

Delegated Proof of Stake

The DPoS consensus was developed in 2014 by Daniel Larimer. It has a voting system for stakeholders to outsource their work to third parties (referred to as delegates). The delegates then are responsible for securing the network on behalf of their voters and achieving consensus during the creation and validation of new blocks. Your voting power depends on the number of coins staked. Generally, the delegate presents its individual proposal when requesting votes.

Typically, the delegate collects the rewards, which they then share proportionally with their own voters. Blockchains using this system are considered more scalable than those using Proof of Stake and Proof of Work consensus systems, and the system is referred to as “digital democracy.”

Proof of Capacity

Instead of computational power or the user’s stake, PoC enables mining devices to use the available space in their hard drive space to decide mining rights and validate transactions. The space is used to store solutions to complex mathematical puzzles. Its main benefit is considered to be its efficiency.

PoC operates by storing a list of possible solutions on the hard drive of the mining device even before the mining activity begins, rather than continuously changing the numbers in the block header and hashing for the solution value like in a Proof of Work consensus mechanism. The more alternative solution values a miner can store on their hard drive, the more chances they have to match the needed hash value from their list, resulting in a higher possibility of receiving the mining reward.

Proof of Elapsed Time

PoET is usually used in permissioned blockchain networks for determining the mining rights and block winners. This consensus mechanism evenly distributes the odds of winning across the largest possible number of network participants.

The winner is chosen based on the time they have spent waiting. To do it, PoET gives a random wait time to each user, and the one whose time finishes first is chosen to produce a new block. This consensus mechanism only works provided the system can verify that no single user is able to run several nodes at the same time and that the wait time is genuinely random.

Proof of Identity

A user’s private key is compared to an authorized identity in Proof of Identity, which is essentially a piece of cryptographic proof for a user’s private key that is cryptographically connected to a particular transaction. Once identified, anyone from a blockchain network is able to generate a block of data that can be presented to anyone on the network. Plus, it can be used by smart cities for verifying their citizens’ identities. Additionally, it assures the authenticity and integrity of the generated data.

Proof of Authority

It is a modified version of PoS where the validators’ identities are put at stake. In this context, identity refers to the correspondence between the validators’ official documentation and their personal identification to help in verifying their identity. In this consensus mechanism, only the nodes that become validators can produce new blocks.

Since the validators’ reputations are at stake, they are incentivized to preserve and secure the network. Usually, the number of validators is small, about <25. PoA is more targeted toward private organizations or enterprises that wish to build their chains and do not need general users to participate.

Proof of Activity

Proof of Activity combines both Proof of Stake and Proof of Work consensus mechanism into one consensus mechanism. It is used to guarantee that all transactions on the blockchain are legitimate, as well as that all miners reach a consensus. 

The beginning is the same as in a PoW system where various miners compete with each other using computing power and find a new block. Once found, the system changes to PoS, and the new block contains only a header and the reward address to the miner. Then a random group of validators is selected, and they need to sign or validate the new block.

How Does The Proof of Activity Work?

The higher the number of coins owned, the higher the chances the validator has to be chosen as a signer. The block becomes complete once all of the validators have signed the new block, which is then added to the network. The rewards are shared among the miner and the different validators who contributed to signing off on the block.

Is a Consensus Mechanism Safe?

Is a Consensus Mechanism Safe

Security is of utmost importance to a consensus system, as the users are trusting their assets to the blockchain. Each consensus mechanism tries to structure itself in a way that minimizes the risks often associated with the crypto market. Some systems use slashing and other punishments to deter malicious actors from cheating. Others, such as the Delegated Proof of Stake, also put some responsibility on the users and propone good behavior from the delegates, as they can be voted out in case of misbehavior.

Final Thoughts

As you can see, there are different types of consensus mechanisms, and they are usually based on the main Proof of Stake and Proof of Work consensus mechanisms. Each one usually has some unique characteristics that make it different from the other. For example, Proof of Capacity uses the available space in its users’ hard drives for validating transactions and deciding on mining rights. On the other hand, in Proof of Authority, the very reputation of the validators is staked. Which one do you think is the best?

Disclaimer: The opinion expressed here is not investment advice – it is provided for informational purposes only. It does not necessarily reflect the opinion of EGG Finance. Every investment and all trading involves risk, so you should always perform your own research prior to making decisions. We do not recommend investing money you cannot afford to lose.

Dictionary

Permissioned blockchains – blockchains that require a prospective participant are ones that need potential participants to verify their identity before they can join.