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.

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. If the validator does something wrong with producing blocks, they lose their stake and hence other validators get rewarded for their honesty. 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 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. This isn't being used very often as it only address public blockchain systems.

4. Proof of Capacity

This is a bit different from other algorithms. 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. Again, this just creates a lot of wastage, hence it isn't used very often.

5. Delegated Proof of Stake

This is the extension to PoS. In DPoS blockchain consensus protocols, Blockchain token holders use their token 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 Tokens that users have. This is the consensus mechanism used in the EOSIO public Blockchain.

EOSIO-based blockchains use delegated proof of stake (DPoS) to elect the active producers who will be authorized to sign valid blocks in the network. However, this is only one half of the EOSIO consensus process. The other half is involved in the actual process of confirming each block until it becomes final (irreversible), which is performed in an asynchronous byzantine fault tolerant (aBFT) way. Therefore, there are two layers involved in the EOSIO consensus model:

  • Layer 1 - The Native Consensus Model (aBFT).

  • Layer 2 - Delegated Proof of Stake (DPoS).

The actual native consensus model used in EOSIO has no concept of delegations/voting, stake, or even tokens. These are used by the DPoS layer to generate the first schedule of block producers and, if applicable, update the set at most every schedule round after each producer has cycled through.

6. Proof of Activity

This algorithm is much more like Proof of Work with greatly reduced complexity. Like in PoW, miners race to solve a cryptographic puzzle after which 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 spam in the network

7. Practical Byzantine fault tolerant Mechanism **

PBFT is a permissioned blockchain platform protocol and its currently used by Hyperledger Fabric (IBM). To understand pBFT, let's take an example - 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.

The consensus in Hyperledger Fabric network is a process where the nodes in the network provide a guaranteed ordering of the transaction and validating those block of transactions that need to be committed to the ledger. Consensus must ensure the following in the network:

  • Confirms the correctness of all transactions in a proposed block, according to endorsement and consensus policies.

  • Agrees on order and correctness and hence on results of execution (implies agreement on global state).

  • Interfaces and depends on smart-contract layer to verify correctness of an ordered set of transactions in a block.

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.

9. Proof of Importance

PoI was first introduced by the NEM foundation. With PoI, it isn’t just the Token balance that has value like PoS. 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 Tokens that have been on the account for a number of days.

10. Proof of Authority

Proof of Authority (PoA) is a reputation-based consensus algorithm that introduces a practical and efficient solution for blockchain networks (especially the private ones). Proof-of-Authority is a replacement for Proof-of-Work, which can be used for private chain setups.

It does not depend on nodes solving arbitrarily difficult mathematical problems, but instead uses a set of “authorities” - nodes that are explicitly allowed to create new blocks and secure the blockchain. The chain has to be signed off by the majority of authorities, in which case it becomes a part of the permanent record. This makes it easier to maintain a private chain and keep the block issuers accountable.

Advantages of PoA

For consortium setting, PoA is much better than PoW. It is more secure (since an attacker with unwanted connection or hacked authority can not overwhelm a network potentially reverting all transactions), less computationally intensive (mining with difficulty which provides security requires lots of computation), more performant (PoA consensus provides lower transaction acceptance latency) and more predictable (blocks are issued at steady time intervals). PoA deployments are used by the enterprise and by the public (e.g. popular Kovan test network).

Compared to other consensus types that require a proof of spent computational resources (Proof-of-Work) or an existing “share” (Proof-of-Stake), PoA consensus has several notable advantages:

  • High-performance hardware is not required. Compared to PoW consensus, PoA consensus does not require nodes to spend computational resources for solving complex mathematical tasks.

  • The interval of time at which new blocks are generated is predictable. For PoW and PoS consensuses, this time varies.

  • High transaction rate. Blocks are generated in a sequence at appointed time interval by authorized network nodes. This increases the speed at which transactions are validated.

  • Tolerance to compromised and malicious nodes, as long as 51% of nodes are not compromised. Apla implements a ban mechanism for nodes and means of revoking block generation rights.

Last updated

Was this helpful?