Consensus Mechanisms: The Holy Grail Of Blockchains| An Un-Ignorable Read

Have you ever taken a minute to think about how decisions are reached on a blockchain?

I mean it’s all decentralized i.e no one is in charge or calling the shots.

In such ecosystems, sanity is maintained using Consensus Mechanism.

 

Consensus Mechanism is the way agreement is reached over a single data in distributed processes.

Don’t bother so much about the not-so-simple explanation. I explained Consensus Mechanism and all its nitty-gritty in the subheadings below.

Eager to find out how this works? Let’s get on with it at once.


Post Summary

The subheadings under which Consensus Mechanism will be discussed include:

Clicking on any of the subheadings directs you straight to its details.

Now let’s begin the discussion in earnest.


What is Blockchain Consensus Mechanism?

‘Consensus'( Latin word for ‘agreement‘) is a process in which all the parties involved agree to one decision/thing.

So when you say ‘reaching a Consensus’, it’s like you saying reaching a general decision’.

By way of definition, it can be said to be a cooperative process in which all group members develop and agree to support a decision.

Consensus Mechanism is used in various facets but our concern today is on Blockchain Technology.

In Blockchain Technology, Consensus Mechanism is the protocol that is followed by all the network participants to reach an agreement on a shared data.

For a centralized ecosystem, the whole decision-making thing is done by a single central administrator.

The administrator takes care of adding, deleting, and updating information to the database.

But this is not the case in a blockchain because of its decentralized nature.

In the subheading below, I explained why decentralized ecosystems such as blockchains really need a Consensus Mechanism.

Just scroll down.


Why The Blockchain Needs The Consensus Mechanisms

Blockchain Technology is a decentralized way of maintaining a ledger that is practically immutable.

Being decentralized clearly translates that no person/entity is in charge of verifying and updating the ledger.

The onus of maintaining the ecosystem then falls on its managers i.e miners/validators.

They have to decide among themselves(reach a consensus) as to:

  • which transaction is to be added to the block.
  • the particular order of adding the block

This is to ensure that they have a single shared ledger.

Consensus Mechanism is one of the key aspects of blockchain as it helps it maintain its integrity and security.

This is the singular reason why the blockchain needs Consensus Mechanism.

We will see the various types of these Consensus Mechanisms and how they work in the following subheading.

Keep reading.


Types of Consensus Mechanisms and How They Work

With blockchain, Consensus Mechanisms ensure that each participant has a copy of the same ledger.

However, this greatly depends on its type.

The various types include:

Find details below.

1. Proof of Work

This mechanism was first introduced by Cynthia Dwork and Moni Naor in 1993 but later re-introduced in 2008 by Satoshi Nakamoto in Bitcoin’s whitepaper.

In this mechanism, participants are required to show that they have invested a great deal of computational power in validating a block.

The miners compete to add the next block in the chain by racing to solve an extremely difficult mathematical puzzle.

Solving this puzzle is simply by giving random guesses on the computer till the correct one is gotten.

The first miner to solve the puzzle adds the block to the chain and receives a reward.

Miners employ different mining methods like CPU mining, GPU mining, ASIC mining, mining pools, e.t.c to compete for the reward.

Though it requires an enormous amount of computational power, it does not scale easily.

Again, its mining is centralized and limited only to those areas of the world where electricity is cheap.

Examples of blockchains that use this mechanism are BTC, LTC, XMR, BCH, DOGE, DASH, DCR, RVN, ZEC, ETC, DGB, CKB, ZEN, BCD, and many others.

2. Proof of Stake

The Proof of Stake mechanism was first introduced in 2012 by Sunny King and Scott Nadal.

In this mechanism, you don’t need any computational power; only holding a substantial amount of the blockchain’s asset is what is needed.

How this works is that the validators will have to lock up some of their coins as stakes.

After that, they will start validating the blocks.

The validator receives a reward which is strictly gotten from the transaction fees.

Though it scales faster than Proof of Work, it encourages users to strictly hodl and not trade their coins.

Blockchains that use this include EOS, TRX, ADA, STEEM, DOT, NXT, NEO, NOW, XTZ, etc.

PoS has about 2 main variations – Delegated Proof of Stake (DPoS) and Leased Proof of Stake (LPoS).

Delegated Proof of Stake (DPoS)

In this, the participants stake their own coins to vote for delegates such that the more they invest, the higher the weight of their vote.

For instance, if participant X stakes 20 coins to vote for a delegate, his vote counts more than that of participant Y that staked 5 coins.

The delegates when elected receive rewards from the transaction fees or certain amount of coins.

Examples of blockchains that use DPoS include EOS, Steem, and BitShares.

Leased Proof of Work (LPoS)

This is an improved version of the Proof of Stake consensus mechanism.

Here, it allows users to lease their assets to full nodes.

The one with the higher amount of the leased token will have a higher probability of adding the next block.

The leasing here is considered safe as the leased token remains in the custody of the leaser.

Moreso, the leaser shares from the reward that is gotten by the full node.

An example of a blockchain that uses LPoS is Waves.

LPos and DPoS are very much the same in that token holders can entrust their power to other users and the weight of the power entrusted depends on the size of their stake.

But the main difference between them is that in DPoS, a certain number of persons (mostly from 20 – about 100) are selected (as voted by stakeholders) as Witnesses or Validators to produce a new block.

Whereas in LPoS, users can borrow tokens from other users to increase their chances of being picked as Validators.

3. Proof of Authority

This was proposed in 2017 as a solution for Ethereum based blockchains by Gavin Wood.

How this works is that it selects a limited number of nodes that are responsible for validating transactions following certain strict rules e.g identity disclosure.

In other words, the block validators here are not staking coins but their reputation.

These nodes become the ONLY ones responsible for keeping the network going.

Because it relies on a limited number of block validators, this mechanism is highly scalable.

A critical look at the Proof of Authority shows that it is not really decentralized since power rests in the hands of few validators.

Seems more like a ploy to make a centralized system more efficient.

Again, the fact that the validators are known to all might bring about third party manipulation.

An example of projects that use Proof of Authority is Microsoft Azure.

4. Proof of Capacity

This is also known as Proof of Space/ Proof of Storage.

It is similar to Proof of Work just that in place of computational powers, you have storage spaces.

How this works is that this mechanism allows nodes on the network to use the empty spaces on its hard drive to mine available cryptos.

Again, instead of doing trial and error when solving the puzzles (as in POW), PoC does something different.

It stores a list of possible solutions on the mining device’s hard drive even before the mining activity commences.

The more space a hard drive has, the more solutions you can store on it.

And consequently, the more chances a miner has to match the required hash value from his list.

This will further result in more chances to win the reward.

Though there’s no need for a dedicated hardware, it is possible that malware can affect the mining activities.

Blockchains that us this mechanism include Burstcoin, Storj, Chia, and SpaceMint.

5. Proof of Identity

Just as in Proof of Authority, identity is the main thing used here.

The ID here is a piece of cryptographic confirmation for a user’s private key that is being attached to each particular transaction.

Each identified user can create and manage a block of data that can be presented to others in the network.

This further ensures the integrity and the authenticity of created data.

It is a great asset for virtual cities to verify its citizens.

6. Proof of Importance

Just like Proof of Stake, Proof of Importance considers the role of the shareholders and validators for its operation.

Validators need to stake their coins to be able to validate transactions.

When they do this, they are assigned consensus addresses and importance scores (more like a trust/reputation score).

This score is calculated considering 3 factors:

  • vesting
  • transaction partner
  • number and size of transactions in the previous 30 days

An example of a blockchain that uses that is NEM.

7. Proof of Elapsed Time

It was introduced by Intel SGX and is based on the idea of fair distribution and expansion of the odds of producing a block.

This will depend on how long the user has been waiting.

Because of this, the mechanism provides a random waiting time for each user.

The user that the waiting time finishes first produces a new block.

It functions perfectly when it is verified that no user can run multiple nodes and that the waiting time is random.

8. Proof of Burn

This works on the principle of letting miners burn coins.

It provides them with the privilege to write blocks in proportion to the coins.

That is, the more coins you burn, the more are your chances of picking the new block.

This burn process requires that the coins be sent to an address where they cannot be accessed.

An example of a project that uses this mechanism is Slim coin.

9. Direct Acyclic Graph

In this type of consensus mechanism, each node prepares itself to become a miner.

When nodes confirm transactions themselves, it makes the whole process faster and more secure.

Again, transaction fees are reduced to zero.

Examples of the projects using DAG is IOTA, Hedera Hash graph, etc.

10. Proof of Activity

The Proof of Activity consensus mechanism combines the Proof of Work and Proof of Stake mechanisms.

At first, miners compete to solve a cryptographic puzzle with dedicated hardware and electric energy to find a block.

But the blocks found contain just the header and the miner’s reward.

It is at this point that Proof of Stake comes in. The validators now step in to test the accuracy of the block.

They do this by signing newly found blocks which then earns the status of a complete block.

When confirmed, the block reward is shared so that validators gain from it too.

A good example is Decred (DCR).

11. Proof of Staked Authority

This is a combination of Proof of Authority and Proof of Stake.

The blocks are produced by a set of validators who are chosen based on a staking-based governance. These validators take turns to produce blocks in a Proof of Authority manner.

An example of a blockchain that uses this is Binance Smart Chain.

12. Byzantine Fault Tolerance

This was a consensus mechanism that was used to solve the Byzantine Fault.

It refers to a situation where the system’s participants have to agree on an effective strategy.

This is in order to avoid destructive failure of the system.

But the problem is that some of the participants are dubious.

There are 2 variations of Byzantine Fault Tolerance(BFT) – Practical BFT and Delegated BFT.

Practical Byzantine Fault Tolerance (PBFT)

This solves the Byzantine Genaral’s by allowing the users to confirm the messages that have been delivered to them.

They do this by performing a computation to evaluate the decision about the message’s validity.

It will then announce its decision to other nodes who in turn processes their own decision over it.

So the final decision relies on the decision of the other nodes.

Blockchains that use this include XLM, XRP, Hyper Ledger Fabric.

Delegated Byzantine Fault Tolerance (DBFT)

This works just like DPos where the asset holders elect the validators.

But qualifying as a a validator has nothing to do with the number of assets one owns.

Rather, other factors like having a verified identity and the right equipment also play a role.

The blockchain that uses this include NEO, etc.

Here you have the list of the popular consensus mechanisms.

In the next subheading, I listed the qualities a good consensus mechanism should possess.

Check it out below.


Qualities Of A Good Consensus Mechanism

For any Consensus Mechanism to be considered good, it must possess these qualities:

Fair and Equitable

It should be one that allows any one to participate.

All the nodes can partake in voting and all votes are accorded the same value and weight.

This way, the open source and the decentralized nature is justified.

Safe

The nodes within the network should be ones that are trusted to generate valid results.

This keeps the blockchain safe and trusted.

Wards Off Double Spending

It should be one that ensures that only valid and verified transactions are added to the chain.

Thus, there is no chance of a coin being spent twice.

Participatory

A good consensus mechanism allows all the nodes to contribute in updating the database of the blockchain.

Here are the qualities every good Consensus Mechanism should possess.

A Consensus Mechanism that is devoid of these qualities will result in blockchain forks, the low performance of the blockchain, etc.

Don’t worry, we are rounding up already.

Follow me to the concluding section so you can let me know what you think of Consensus Mechanisms.


Conclusion

Here is the part where we draw the curtains on Consensus Mechanisms.

So far, we have have looked at what they and why they are of paramount importance to the blockchain.

I also listed the various types we have and pointed out the qualities they need to possess to be termed ‘good’.

Now, let me hear what you have to say, dear reader.

If you will be creating a blockchain tomorrow, which of the mechanisms will you adopt? Why?

Maybe you work with one of the mechanisms already. What has been the experience so far?

Considering the speed at which distributed systems are evolving, do you think we will be seeing more variations of these mechanisms?

Do you find any of the points confusing?

Not to worry, just leave me your questions and contributions in the comment box below.

Will attend to them ASAP.

Don’t forget to click the share buttons below to give this post a share.

Adios!


Chiamaka Atueyi
Follow me

Leave a Reply

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