Blockchain Consensus Protocol Algorithms Explained
A blockchain consensus mechanism can be simply defined as a fault-tolerant mechanism which is usually found as a fundamental characteristic of any worthy blockchain technology.
Correct me if I am wrong, at some point in your life, you must have tried reloading a prepaid phone voucher you have previously used up?. You probably thought, well maybe they do redistribute these voucher numbers, and this particular one might have gone back to the system and can in-turn be reused right?.
From experience this trick never works, [yes I do reload old recharge cards: bite me :)]. Although a centralized system, mobile network providers have a system to prevent this type of occurrence. Personally, I still believe they reenter these vouchers into the system. Anyways that was then, sadly I have outgrown that, but getting to reload an old voucher is on my bucket list, weird right?
To cut a long story short, I believe we all know what bitcoin is and its various use? Good!. The focus of this topic is not on bitcoin alone. However, the role the king of all blockchain technology, bitcoin plays in Blockchain consensus, will serve as the root we will be expanding from. To fully understand this topic, we need to start by defining what mining is.
What is Cryptocurrency Mining?
Mining is defined as how blocks containing transactional data are being verified and added to the chain. Those in charge of mining are referred to as miners.
Miners are the driving forces behind the success of any blockchain technology. As a result, they are entitled to a reward for their efforts.
So here is the fun part, all a miner needs to do to get paid is to calculate transactional data and some mathematical codes. This means the risk of anyone just adding up some data together and sending it to the network to get paid exists. Now the question is, how will the data compiled by the miner get checked for validity?
Also since the data present in a block are transactional ones, upon adding them to the network, one can easily go back, pick a block, change some things but make sure to leave the core part of the block still and read it to the network and still get paid again, I mean you want me to add a block, and I did just that right? (Genius).
So this brings us to the topic of blockchain consensus.
The affirmations of cryptocurrency transactions depend on what is implied to as "consensus mechanisms". It empowers the system to continue working regardless of whether some of its members are coming up short or just being plain shady. An important aspect of blockchain technology is making sure the whole network collectively agrees with the ledger's information. This is simply the most important function of the blockchain consensus mechanism.
What Is the Blockchain Consensus Mechanism?
A blockchain consensus is simply the mechanism used on a blockchain network to determine the efficacy of a change or adjustment to the network parameters. The main importance of the blockchain consensus mechanism is ensuring validated record-keeping, aside from other use.
In any centralized system, the updating and maintenance of the database can be done by a central administrator. The central administrator has the main authority to add, delete, or update qualified individuals' names for certain licenses.
In contrast to the centralized system, the decentralized blockchains operate as a self-regulating system, without a single authority, working on a global scale. It involves the contributions from thousands to millions of participants working on authentication and verification of transactions on the blockchain and the block mining activities.
A publicly shared ledger like the decentralized blockchain is a dynamically changing one, which requires a mechanism which is secure, efficient, functional, and reliable, to ensure the genuineness of all the transactions carried out on the network, as well as making sure all participants reach an agreement on a consensus in terms of the status of the ledger. A blockchain consensus mechanism makes performing all these important tasks easy and democratic.
Without the blockchain consensus mechanism; a set of rules making decisions on the contributions through the different blockchain participants, the whole cryptocurrency setup will not be functional.
The blockchain consensus mechanisms are of different types, each type unique based on its own sets of principles. Examples of these consensus algorithms include Proof Of Work, Proof Of Stake, Delegated Proof Of Stake, Proof Of Burn and Proof Of Identity.
The Proof of Work and Proof of Stake are the most popular blockchain consensus mechanisms.
Proof Of Work (PoW)
The PoW is a common consensus algorithm used by most cryptocurrency project since it is the pioneering consensus for a live blockchain project(bitcoin). In a PoW model, a miner must complete some task to qualify them for the rewards associated with adding new transactions to the blockchain. The nature of the work to be done is expected to be moderately difficult (for the miner) but relatively easy to check for the network validators. It should be noted that the central part of most cryptocurrencies and prominent blockchain applications is mining.
Bitcoin makes use of the "Hashcash proof of work system". In this case, miners must finalize a proof of work that involves proposing a new block. Once the proof of work is done, network participants either accepts or rejects it. One thing that makes this process a bit frustrating apart from the expensive cost of mining equipment is that the chances of coming up with a valid block proposal are low. As a result of this knowledge, which computer on the network will come up with the next block is nearly impossible.
The PoW consensus is designed to protect a block from tampering, by making sure to make changes to a block already accepted, all the block's successors get regenerated. Meaning the work involved with creating that block has to be redone. This is almost impossible for a blockchain as big as Bitcoin's. As a result, the blockchain is fully protected from tampering.
Proof Of Stake (PoS)
The PoS is a consensus algorithm with low energy consumption and low-cost alternative to the proof of work algorithm. In this model, miners must show proof that they have some units of the cryptocurrency stored securely in their wallets.
To maintain the public ledger, PoS allocates responsibility to a participant node. The responsibility allocated is in proportion to the number of token or coins such node holds. The PoS model operates like a business entity, where shareholders of the company have the privilege of being part of the consensus mechanism.
PoS offers a lower cost of mining, and blockchain drivers use it as a less expensive alternative PoW.
The PoS is also one of the most comprehensive blockchain consensus mechanisms; this is simply because all the coin holders present on the network have a chance of taking up an interest in the mining procedure. Ethereum makes use of this governing consensus for transaction confirmation.
Delegated Proof of Stake (DPoS)
For fans of the EOS blockchain network, say hello to your favourite blockchain governing consensus, Delegated Proof of Stake (DPoS).
Delegated Proof of Stake (DPoS) has been labelled by enthusiast as the most: (flexible, efficient, decentralized) and finally the fasted consensus model to hit the crypto industry.
The consensus model utilizes a democratic way of voting toward resolving issues on the network. So in case, there is a need for any network parameters, to get changed or adjusted, stakeholder elected delegates to vote on whether to go forward or backwards.
On the DPoS network, elected delegates are given co-access to a special account. This special account is characterized by the ability to make changes to network parameters, such as block intervals, witness pay, block sizes, and transaction fees.
The special account is also referred to as the Genesis account. Once the delegates have made a proposed change to the network, the stakeholders are allowed two weeks to review the changes and vote out delegates. During the two weeks period, the changes made can also be nullified.
As a result of this, the delegates do not get to make the ultimate decision. They could be likened to an employee who still has to report to the boss (stakeholders). The vetting protocol is said to be put in place, to ensure a democratic system of governance and protect delegates for sanctions applicable to administrators or managers of cryptocurrencies.
In a DPOS setting, the true power lies in the hand of the Stakeholders.
Proof of Authority (POA)
Proof of PoA consensus is another optimized version of the well-known Proof of Stake consensus mechanism. The PoA model uses identity to represent a stake (token). The identity is inturned checked by a group of validators, which were previously chosen for the sole purpose of approving and vetting transactions and blocks on the network. This group of network identifies validators are usually limited in number. This is to enforce adequate security measures as well as to encourage efficiency.
Some other types of not so popular blockchain consensus mechanism include:
- Proof of Elapsed Time
- Proof of Importance
- Practical Byzantine fault-tolerant Mechanism
- Proof of Burn
The location of blockchain consensus users is not a problem. A major advantage of the blockchain consensus mechanism is that a group made up of different individuals can use it from anywhere globally and still create a society that is equal and fair.
A consensus is achieved through decision making, and its objectives include agreement seeking, collaborative, cooperativeness, egalitarian, inclusiveness, and participatory.