Blockchain Consensus Mechanisms
The buzz around blockchain remains too high. A blockchain is a decentralized, distributed, and public digital ledger 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 to function globally with a shared public ledger.
Here, I’ll be discussing 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:
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 mining that needs to be performed 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 get 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 to participate in the process of block-creation.
Here, the validators are selected based on some selection algorithm that takes their stake into account. Only the selected validator can create a block, and others cannot participate, saving the other validators’ energy. It is much better for the environment. If the validator does some wrong stuff, they lose their stake, and hence you get the 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 a distributed consensus method. It is also a consensus mechanism implemented by a blockchain network to ensure that all participating nodes agree to the true and valid state of the blockchain network, thereby avoiding any possibility of crypto coin 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 will be selected to mine the next block. It tries to address the energy consumption issue of PoW. To burn the coins, miners need to send them to the address where they couldn’t be spent to verify the block. The 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. Before mining in a PoC system, the algorithm generates large data sets known as ‘plots’ and stored them 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 a play to pay a thing. The only cryptocurrency which is based on PoC is the Burst coin.
5. Delegated Proof of Stake
This is the extension to PoS. In the DPoS blockchain consensus protocols, crypto coin holders use their coin balances to elect delegates called 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 number of coins they have, popularly known as cyber wealthy.
Those who have more coins or tokens will have a greater impact on the network than those with few coins. Anyone can participate in the block generator election, and the chance to create the blocks will be determined by the number of votes they get concerning every other generator. If they can really pull it off, at that point, they will have the DPoS to thank. The cryptocurrency based on this mechanism is the 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, hence preventing the emergence of flood in the network, which we call spam. The coins that use this mechanism are Decred and Espers.
7. Practical Byzantine fault-tolerant Mechanism **
PBFT is the most popular permissions blockchain platform protocol, and its currently used by Hyperledger Fabric (IBM). So have you heard about the 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, a 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 high energy utilization requirement. 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 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. A node can then 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 a third party yet again?
9. Proof of Importance
NEM first introduced poI for its cryptocurrency named XEM coin. With PoI, it isn’t just the coin balance that values. As per the POI approach, the reward system should be based on the contribution of a user to the network in all capacities. Therefore, the staking of the block 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 several days. 10% of the XEM that has not been set apart for the network is fixed every day. It’s costly to attack the network, and also it generously rewards the user for protecting the network.
10. Leased Proof of Stake
PLoS 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 a certain amount of coins, or else you can’t even participate in creating a block, and not everyone gets the chance to participate in the maintenance of the chain and also get the rewards. PLoS have solved this problem.
The more the number of users or participants, the better becomes the security of the network. The 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 cryptographic evidence (a piece of data), which tells that any user knows a private key compared to an authorized identity and is 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 storage capacity and higher bandwidth (volume increases) to keep up-to-date with the transactions added to the ledger.
Within a DAG, the nodes themselves 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 means that no node in the graph can reference itself; it can’t be its own mother node. IOTA makes use of DAG (Tangle). Besides, Its data structure allows for the network’s easy scalability. Everyone participates 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!