What is Blockchain
A blockchain is a record of all digital transactions. It is a distributed software network that can function both as a digital record and as a mechanism allowing safe transfer of resources without an intermediary party. This is the technology that allows units of value to be exchanged digitally.
The blockchain records every transaction and each transaction is always secured by a digital signature. Whenever a transaction is completed, it creates a hash for the transaction. The hash of the previous transaction is used to generate a hash for the new transaction. Even a minor change in the transaction can create an entirely new hash. Each transaction is registered in the order in which it is based on the consensus algorithm in use.
Consensus Algorithm in Blockchain
None of the transactions within the blockchain is validated by the central authority but each transaction is absolutely secured and verified. This is possible because of consensus algorithms.
It is through a consensus algorithm that each node verifies the authenticity of the new entry that is to be added to the blockchain records. Using the consensus algorithms each node reaches a general agreement on the authenticity of any transaction and entry for the transaction is added to the blockchain record once the authenticity is verified. There are several consensus algorithms available for any blockchain. Each algorithm has its own principle and can be used as per the nature of the blockchain.
Let us take a look at various blockchain algorithms and try to know how they work –
- PoW – PoW represents Proof of Work. It was first introduced in 1993 by Dwork and Naor and reinstate by Satoshi Nakamoto in the bitcoin record in 2008. PoW selects a miner for producing the next block. The objective behind PoW is to find a solution for a difficult mathematical puzzle. The miner who initially solves the problem gets to mine the next block. This algorithm is used by bitcoin and requires much computational power for finding the solution to the puzzle.
- PoS – PoS represents Proof of Stake. PoS was first introduced in 2011 as a low-cost, low-energy consuming alternative to PoW. In PoS, miners don’t require expensive hardware for solving a tricky puzzle instead the miners lock up their coins as a stake and authenticate the block by placing a bet. Once a new block is added all the validators get rewarded equal to their bets and increase the state accordingly. Ethereum uses this kind of algorithm for mining.
- DPoS – DPoS stands for assigned Proof-of-Stake. It was first introduced by Daniel Larimer. In DPos, delegates vote for their special validator to achieve a consensus for a new block and the selected validator is responsible for maintaining the network and validating the transaction. In return, the validator receives rewarded with transaction fees for the work. This consensus algorithm is used by EOS, Bitshares, Tezos, Steem, etc, for validating transactions in the block.
- PoB – PoB represents Proof of Burn. As the name suggests, in PoB validators ‘burn’ coins by sending them to an address where they are not fixable. It’s on miners to burn the native currency or any of the currency of their choice. More the coins a miner burns, the higher is the chances of his selection to mine the next block. Though PoB wastes resources, PoB is the best alternative for PoW. The only coin which uses Proof-of-Burn is Slimcoin, it uses a mix of PoS, PoW, & PoB.
- PoC – PoC represents Proof of Capacity. In Proof of Capacity algorithms, instead of burning coins or investing in high-cost hardware resources, validators are supposed to fill in their hard drive space. The more hard drive space validators allocate, the better are the validator’s chances of getting selected for mining the next block for earning the block award.
Above are the widely used consensus algorithms used in blockchain. Other than the above ones, there exist other consensus algorithms like Proof of Activity, Proof of Weight, Proof of Importance, Leased Proof of Stake, etc. Thus, Choosing the consensus algorithm appropriately according to the blockchain functionality and requirement is very important because the blockchain network needs to validate every transaction and cannot function properly without the right consensus algorithm.