Blockchain: Consensus Protocols
Blockchain is the future, and to make this functional at global level, a efficient consensus algorithm is essential.
Consensus algorithm is the first thing that hit in mind when we think about blockchain. Keeping ledger transactions synchronized across the network, updating ledgers when appropriate participants approve transactions and maintaining the order sequence for the transactions are the tasks done by these algorithms.
Here are some of the different consensus algorithms concepts which are currently out there.
Proof of Work
A proof of work is a piece of data which is difficult (costly and time-taking) to produce but easy for others to verify and which satisfies certain requirements. This is one of the most well-known algorithm, used by one of the strongest crypto-currencies, Bitcoin. in this, an individual can provide the conclusions to reach a consensus. A miner, calculates the hash of his block header and checks whether the conclusion is correct or not. If the conclusion is wrong, then the miner modifies the nonce and they try again.
This algorithm allows for Bitcoin miners to independently try to find the next block, and once they do that miner transmits the solution they found throughout the network. Now, the rest of the network is now being told that the solution for the next block is X, but with Bitcoin, they don’t have to do all of the work that the miner did, they just need to perform a single check that proves the miner did in fact do the work, and the block it found is in fact legitimate.
One of the early implication of this type of system was done by bitcoin .
Proof of stake
In Proof of stake, instead of investing in expensive computer equipment in a race to mine blocks, validators invests in the coins of the system.The term validator is used because no coin creation exists in proof of stake, all the coins exist from day one, and validators (who hold a stake in the system) are paid strictly in transaction fees.
In these type of structure , chance of being picked to create the next block depends on the fraction of coins in the system stakeholder own. A validator with 500 coins will be ten times as likely to be chosen as someone with 50 coins.Once a validator creates a block, that block needs to be committed to the blockchain. Different proof-of-stake systems used different mechanisms to solve this problem, like signing or validating.
One of the early implication of this type of system was done by Peercoin .
Proof of activity
To avoid too much of a currency in system, some of the currency suppliers set maximum limit, for example bitcoin will only produce 21 million coins. That means, at some point, the bitcoin block reward subsidy will end and bitcoin miners will only receive transaction fees. this might cause security issues resulting from a tragedy of the commons , where users act in self-interest and spoil the system. So, proof of activity was created as an alternative incentive structure for bitcoin. Proof of activity is a hybrid approach that combines both proof of work and proof of stake.
In this miners race to solve a cryptographic puzzle. The blocks mined not contain any transactions, the winning block will only contain a header and the miner's reward address.Based on information in the header, a random group of validators is chosen to sign the new block. The more coins in the system a validator owns, the more likely he or she is to be chosen. The template becomes a complete block as soon as all of the validators sign it.in case some of the selected validators are not available to complete the block, then the next winning block is selected.
Criticisms of proof of activity are the same as for both proof of work (too much energy is required to mine blocks) and proof of stake (there is nothing to deter a validator from double signing).
One of the early implication of this type of system was done by Decred .
Proof of burn
In these type of structure, 'burn' coins by sending them to an address where they are irretrievable. By committing your coins to never-never land, you earn a lifetime privilege to mine on the system based on a random selection process. Depending on how proof of burn is implemented, miners may burn the native currency or the currency of an alternative chain, like bitcoin. The more coins you burn, the better chance you have of being selected to mine the next block.With time in the system decays, so validator needs to burn more coins to increase the odds of being selected in the lottery.
While proof of burn is an interesting alternative to proof of work, the protocol still wastes resources needlessly. Another criticism is that mining power simply goes to those who are willing to burn more money.
One of the early implication of this type of system was done by slimcoin .
Proof of capacity
Prior to mining in a proof-of-capacity system, the algorithm generates large data sets known as 'plots', which can store on your hard drive. The more plots validator have, the better the chance of finding the next block in the chain.
By investing in terabytes of hard drive space, validator gets a better chance to create duplicate blocks and fork the system. But with proof of capacity, we still have the problem of nothing at stake to deter bad actors.Variations of proof of capacity include proof of storage and proof of space.
One of the early implication of this type of system was done by Burstcoin.
Proof of elapsed time
Chipmaker Intel has come up with its own alternative consensus protocol called proof of elapsed time. This system works similarly to proof of work, but consumes far less electricity.
Further, instead of having participants solve a cryptographic puzzle, the algorithm uses a trusted execution environment (TEE) such as SGX to ensure blocks get produced in a random lottery fashion, but without the required work.Intel’s approach is based on a guaranteed wait time provided through the TEE. According to Intel, the poof-of-elapsed-time algorithm scales to thousands of nodes and will run efficiently on any Intel processor that supports SGX.