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 in place 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 the 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 the topic of 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 Mining?
Mining is simply defined as the process through which 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 in order to get paid is to calculate transactional data along with some mathematical codes of some sort. This means the risk of anyone just adding up some data together and send it to the network in order to get paid does exist. 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 still leave the core part of the block 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 information of the ledger. This is simply the most important function of the blockchain consensus mechanism.
What Is 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 simply be done by a central administrator. The central administrator has the main authority to add, delete or update the names of qualified individuals 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, as well as 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 participants of the blockchain, 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.
Some Worthy 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 is required to complete some task in order 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 are required to finalize a proof of work which involves proposing a new block. Once the proof of work is done, network participants either accepts or rejects it. One thing which makes this process a bit frustrating apart from the expensive cost of mining equipment is the fact that the chances of coming up with a valid block proposal are low. As a result of this knowledge which computer on the network is going to come up with the next block is near impossible.
The PoW consensus is designed to protect a block from tampering, by making sure in order 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 are required to 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 it is used by blockchain drivers as a less expensive alternative PoW.
The PoS is also one of the most comprehensive blockchain consensus mechanism, this is simply because all the coin holders present on the network have a chance of taking up an interest when it comes to 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 favorite blockchain governing consensus, Delegated Proof of Stake (DPoS).
Delegated Proof of Stake (DPoS) has been labeled 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 backward.
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 a proposed change to the network has been made by the delegates, the stakeholders are allowed a period of two weeks to review the changes and also 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 as well as to 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 as well as 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, as a major advantage of blockchain consensus mechanism is that a group made up of different individuals can use it from anywhere in the world and still create a society which is equal and fair.
A consensus is simply achieved through decision making, and its objectives include, agreement seeking, collaborative, cooperativeness, egalitarian, inclusiveness, and participatory.