Blockchain Consensus Mechanisms

Kunal Dhariwal
DataDrivenInvestor
Published in
8 min readNov 27, 2018

--

Newbie? Read this article to know about blockchain and then you’re welcome back here: https://bit.ly/2SeNJat

The buzz around blockchain remains too high. A blockchain is a decentralized, distributed and public digital ledger that is used to record transactions across many computers so that the record cannot be altered retroactively without altering the subsequent blocks and the collusion of the network. The blockchain needs a functional, efficient and secure consensus algorithm in order to function on global scale with a shared public ledger.

Here, I’ll be discussing about the consensus mechanisms that a blockchain uses. It differs from blockchain to blockchain and the technology they are using, for example: Ethereum uses Proof of stake and Bitcoin uses Proof of work.

Blockchain Consensus Mechanisms:

  1. Proof of Work**

Proof of work is a protocol that has the main goal of deterring cyber-attacks such as a distributed denial-of-service attack (DDoS) which has the purpose of exhausting the resources of a computer system by sending multiple fake requests. This is how it works:

  • Proof of work is a requirement to define an expensive computer calculation popularly called as mining, that needs to be performed in order to create a new group of trustless transactions (Block) on the blockchain.
  • The first block miner who solves the problem gets a reward in return.
  • The network miners compete to be the first to find a solution for the mathematical problem.
  • The transactions that are verified are only stored in the public blockchain.

The party with the most computational power usually mines the block and others just gets their energy wasted because multiple miners compete to create a block at one instance. So, here we introduce the mechanism of Proof of Stake.

2. Proof of Stake**

It is the most common alternative to Proof of Work. It’s an alternative way to create blocks in a blockchain. The block producers are called as a validator instead of miners. Validators must put down a deposit or stake in order to participate in the process of block creation.

Here, the validators are selected on the basis of some selection algorithm that takes their stake into account. Only the selected validator can create a block and others cannot participate, Hence saving the energy of the other validators. It is much better for the environment. If the validator does some wrong stuff then they lose their stake and hence you get reward for your honesty. The miners take their transaction fees because they get no reward unlike PoW.

Ethereum has shifted from PoW to PoS.

3. Proof of Burn

Proof of Burn is an alternative to Proof of Work and Proof of Stake and also a method for distributed consensus. It is also a consensus mechanism implemented by a blockchain network to ensure that all participating nodes come to an agreement about the true and valid state of the blockchain network thereby avoiding any possibility of cryptocoin double spending.

It works on the principle of allowing the miners to “burn” or “destroy” the virtual currency tokens, which grants them the right to write blocks in proportion to the coins burnt. The more coins you burn, the better chance you have of being selected to mine the next block. It tries to address the energy consumption issue of PoW. In order to burn the coins, miners need to send it to the address where it couldn’t be spent in order to verify the block. Slim coin is based on this consensus mechanism algorithm.

4. Proof of Capacity

Well, this is also a consensus mechanism algorithm. This is a bit different from other algorithms. Here, you’ve to pay with the hard drive space. The more hard drive space you have, the better chance you have for mining the next block and earning the block reward. Prior to mining in a PoC system, the algorithm generates large data sets known as ‘plots’ and they are stored on your hard drive.

Proof of capacity involves two parts. There is the plotting of the hard drive and the actual mining of the blocks. Depending on the size of your hard drive, it can take days or even weeks to make your unique plot files. Plotting uses a very slow hash known as Shabal. This also includes variations like Proof of Space and Proof of Storage. This is more like aplay to pay thing. The only cryptocurrency which is based on PoC is Burst coin.

5. Delegated Proof of Stake

This is the extension to PoS. In DPoS blockchain consensus protocols, cryptocoin holders use their coin balances to elect delegates called as witnesses. These witnesses have the opportunity to stake blocks of new transactions and add them to the blockchain. Voting power is actually determined by the amount of coins they have, popularly known as cyberwealth.

Those who have more coins or tokens will have a greater impact on the network than those with few coins. Anybody can take part in the block generator election and the chance to create the blocks will be determined by the amount of votes they get with respect to every single other generator. In the event that they can really pull it off, at that point they will have the DPoS to thank. The cryptocurrency based on this mechanism is CaptainAlt coin.

6. Proof of Activity

This algorithm is much more like Proof of Work with the complexity reduced to a great extent due to which the solution of the problem takes from fractions of a second to several minutes. Proof of Activity is a hybrid approach that combines proof of work and proof of stake. As in PoW, miners race to solve a cryptographic puzzle. Then the system switches to PoS. The difference is that the blocks being mined do not contain transactions. They are simply templates with header information and the mining reward address.

The correctness of the created blocks is verified by limiting the minimum possible time for the block creation. This allows you to limit the maximum speed of adding blocks to the chain and hence preventing the emergence of flood in the network, which we also call as spam. The coins that use this mechanism are Decred and Espers.

7. Practical Byzantine fault tolerant Mechanism **

PBFT is the most popular permissioned blockchain platform protocol and its currently used by Hyperledger Fabric (IBM). So have you heard about Byzantine general’s problem? No? Let me explain that problem first and then you’ll be able to understand PBFT better. Imagine a group of Byzantine generals and their armies have surrounded a castle and preparing to attack. To win, they must attack simultaneously. But they know that there is at least one traitor among them. So, how do they launch a successful attack with at least one, unknown, bad actor in their group?

The analogy is clear: In any distributed computing environment there is a risk that rogue actors could wreak havoc. So, its reliance on community consensus makes Byzantine faults an especially thorny problem for blockchain. To overcome that problem PBFT is used. A consensus decision is determined based on the total decisions submitted by all the generals. PBFT consensus mechanism does not require any hashing energy to approve exchanges in a blockchain, which implies there is no requirement for high energy utilization and the danger of centralization is lower. It also yields high rewards and also there’s transaction finality.

8. Proof of Elapsed Time

Intel has come up with its own alternative consensus protocol called proof of elapsed time. PoET is now the consensus model of choice for Hyperledger Sawtooth’s modular framework. The PoET algorithm is often used to give permissions to determine the rights a miner has. The networks using this identify the participants before they can participate. Each node has exactly the same chance to be the winner of the block. The PoET mechanism is based on spreading and fairly distributing the odds for the largest possible number of participants.

Each participating node in the network must wait for a certain amount of time. In this, every member asks for a hold-up time from its local reliable enclave. The member with the briefest hold-up time is next to offer a block after it holds-up for the allotted waiting time. Each node generates its own waiting time each time, after which it goes into a kind of sleep mode. As soon as the node wakes up and a block is available, that node is the lucky winner. Then a node can spread the information over the entire network, keeping it decentralized and receiving the reward.

BTW, we have to rely on intel for this and trust me, this is just against the concept of decentralization. I mean, why do we have to rely on third party, yet again?

9. Proof of Importance

PoI was first introduced by NEM for its cryptocurrency named as XEM coin. With PoI, it isn’t just the coin balance that values. The reward system, as per POI approach, should be based on the contribution of a user to the network in all capacities. The staking of the block, therefore, is based on multiple factors including reputation, overall balance, and the number of transactions done through or from a particular address.

Here, participants who frequently send and receive transactions are more likely to find blocks. The Proof of Importance only counts the coins that have been on the account for a number of days. 10% of the XEM that has not been set apart for the network is fixed every day. It’s very expensive to attack the network and also it generously rewards the user for protecting the network.

10. Leased Proof of Stake

LPoS was developed by WAVES, a decentralized blockchain platform that allows for the creation of custom tokens. In PoS, You can only add a block if you have certain amount coins or else you can’t even participate in the process of creating a block and not everyone gets the chance to participate in the maintenance of the chain and also get the rewards. This problem has been solved by LPoS.

More the number of users or participants, better becomes the security of the network. Greater the number of coins on the account, increases the likelihood that it will add the next block to the chain and the reward.

11. Proof of Identity

The concept of PoI is to compare the private key to an authorized identity. Proof of Identity (PoI) is basically a cryptographic evidence (piece of data) which tells that any user knows a private key that compares to an authorized identity and cryptographically attached to a specific transaction. Every individual from an existing group can create a block of data and present it to anyone for instance to the processing node.

Congrats, Now you know about all the blockchain consensus mechanisms.

Apart from this, I also wanted to mention this important consensus mechanism that you need to know about.

Directed Acyclic Graph

As a blockchain grows over time, nodes will need more and more storage capacity and a higher bandwidth (volume increases) to keep up-to-date with the transactions added to the ledger.

Within a DAG, the nodes itself become the ‘miners’. This process is also much more lightweight because you only have to verify transactions for the two closest nodes. As miners are eliminated and we validate transactions ourselves, transaction fees are reduced to zero. The word acyclic just means that no node in the graph can reference back to itself, it can’t be its own mother node. IOTA make use of DAG (Tangle). Besides, It’s data structure allows for the network’s easy scalability. Everyone is participating in reaching a consensus and, therefore, the more people are using IOTA, the faster the network becomes. More people, faster network and secure network!

That’s it, you’re all set to tell others that you know how things get done in a blockchain!

Thanks for your read!

Do support and show some love (Claps xD)

--

--

25. CS Undergrad | Product & Business Analyst | Blockchain | Loves the process of unlearning & relearning. Helping people learn better stuff in a better way! ;)