Learn about the different types of blockchain consensus protocols and how consensus is achieved in each model
Blockchains present the perfect solution to today’s digital security issues. Its decentralized nature and unique and innovative technology make it possible to create a system that is virtually devoid of corruption generated from a central authority. However, the blockchain now is far from perfect. This decentralization also creates a major problem: How are any decisions made when there is no central authority figure to govern them? How are transactions processed and verified when everyone on the network is widely dispersed?
The answer to this is a consensus protocol. For the blockchain to make and recognize decisions, participants on the network need to arrive at a consensus—an agreement whether a transaction is valid or has met certain conditions—and in the process, also rewarding participants who verify the transactions. Consensus on a blockchain is achieved using a specific algorithm or protocol.
What is a consensus protocol?
As a refresher, blockchain is the underlying technology behind cryptocurrencies. The blockchain acts as a digital public ledger whose main purpose is to record all the transactions that have ever occured. The data inscribed on the blockchain are structured in a decentralized way so that it is publicly available and can be shared across a network of nodes all around the world, without needing a central authority.
On a blockchain, however, consensus protocols act as the “central authority”—so to speak. Consensus protocols ensure that no single party tampers with the record, prevent double spending, and keep everyone in the network consistent and true. Consensus protocols enable users on a distributed network to be able to interact with one another in a trustless manner. It is crucial to the security of a blockchain, and has a great impact on the overall operations of the blockchain network.
What are the different types of consensus protocols and how do they work?
As the realm of cryptocurrency and blockchain technology evolve, new consensus protocols are also emerging. Consensus protocols come in a number of forms, and each one offers varying results for every blockchain network they are utilized in. Here are some of the major consensus protocol types and how each of them work to achieve consensus.
1. Proof of Work (PoW)
POW is the first and most well-known consensus protocol, which is invented by Bitcoin’s founder, Satoshi Nakamoto. The most notable cryptocurrency that uses this kind of protocol is Bitcoin itself.
• How consensus is achieved: All miners compete with one another to solve a cryptographic algorithm to validate a transaction. The first miner who finds the hash is allowed to add a new block to the blockchain, which contains the information of the transaction. A block reward is then given in the form of cryptocurrency.
• Pros: Established consensus protocol; considered as a legacy technology.
• Cons: Extremely computation-intensive and requires extensive energy consumption.
2. Proof of Stake (PoS)
PoS attempts to solve the issues of high energy costs and long verification times that are apparent in the PoW protocol by taking out the need for mining. Cardano and QTUM are examples of cryptocurrencies who have adopted this protocol. If you want to know more about the differences between PoW and PoS, read our article here.
• How consensus is achieved: Pre-determined validators participate in a consensus algorithm to vote on the next block to be forged into the blockchain. The weight of the validator’s vote depends on how high his stake is. This means that the higher the stake, the more validating power you have. Validators are given a percentage of the transaction fee instead of a block reward.
• Pros: More energy-efficient and provides faster transaction times compared to PoW.
• Cons: High chance of the 51% attack, where a single entity monopolizes more than half of the stake or circulating supply of cryptocurrencies.
3. Delegated Proof of Stake (DPoS)
DPoS, as the term suggests, is a variation of the PoS protocol and relies upon a group of delegates to validate blocks on behalf of all the nodes on the blockchain network. Examples of blockchains that implement this type of protocol are Steemit, BitShares, and EOS.
• How consensus is achieved: Instead of voting on the validity of transactions, coin holders elect a list of nodes, or delegates, to do the validations on their behalf and add new blocks of transactions to the blockchain. The delegates are periodically shuffled and are provided designated time slots to publish their block.
• Pros: All coin holders are given more influence and ownership in the network, instead of competing with one another as in the case of PoW and PoS. It also enables faster transaction times than most other consensus protocols.
• Cons: The system is partially centralized; thus, it may defeat the whole purpose of the blockchain decentralization.
4. Directed Acyclic Graphs (DAGs)
DAG is an alternative ledger system where the sequence of transactions uses a topological ordering; that is, it only goes from earlier to later. Some examples of applications that use DAG are IOTA, Hashgraph, and Raiblocks. DAG is often termed as a blockchain-free system, as it requires no mining and has no fixed blocks. If you want to know more about the differences between DAG and blockchain, read our article here.
• How consensus is achieved: For transactions to be validated in a DAG network, it needs to be linked with two other existing and relatively recent transactions; these transactions are chosen using an algorithm. Users in the network confirm each other’s transactions, and each transaction carries its own Proof of Work and are linked with one another.
• Pros: Faster processing times, because transactions are paired, validated, and recorded directly into the DAG network.
• Cons: May be vulnerable to being overwhelmed by too many inputted transactions all introduced at the same time. Can be difficult to ensure consistency across all nodes.
5. PBFT (Practical Byzantine Fault Tolerance)
PBFT is a protocol derived from the Byzantine Generals’ Problem. In the context of blockchains, Byzantine Fault Tolerance is the ability of a distributed network to reach a consensus despite malicious nodes propagating incorrect information to the system. Examples of blockchain projects using PBFT are Ripple, Stellar, and Hyperledger.
• How consensus is achieved: In a PBFT protocol, one node acts as the primary node, or the leader, while the other nodes in the network are referred to as the backup nodes. All of the nodes within the system are ordered in a sequence, and each node communicate with one another to validate the “message” from a specific node. Once a majority of the same responses are reached, then a consensus is met to verify the transaction as valid or invalid.
• Pros: Ability to finalize a decision without the need for confirmations such as in PoW models, thus significantly reducing transaction times, as well as energy consumption
• Cons: Scalability problems, as the protocol is designed to work in its classical form; that is, the consensus group is limited to a small size due to the intensive amount of communication required between numerous and multiplying nodes.
6. Other variations of consensus protocols requiring proof:
• Proof of Luck (PoL) – All participants in the network burn some coin and select a random number (luck). The one with the closest number to a decentralized random number wins. The luckiest block is then used as the next block on the blockchain. Example of implementations using the PoL protocol: COTR and Luckychain.
• Proof of Authority (PoA) – A modified form of the PoS protocol where, instead of a stake with monetary value, a validator’s identity acts as the stake. This means users voluntarily disclose who they are in order to gain rights to validate transactions. Example of implementations using the PoA protocol: VechainThor and Ethereum’s Kovan testnet.
• Proof of Capacity (PoC) or Proof of Space – Allows miners to “plot” the available hard drive space in their mining devices to decide the mining rights. The larger the hard drive space, the more possible solution values it can store, resulting in more chances of winning the mining reward. Example of cryptocurrency using the PoC protocol: Burstcoin.
• Proof of Burn (PoB) – Miners are required to “burn” or “destroy” cryptocurrency tokens, granting them the right to validate transactions in proportion to the number of coins burnt. Example of cryptocurrency using the PoB protocol: Counterparty.
In conclusion
We still have yet to discover a single perfect solution to achieve fair and correct consensus on the blockchain. Each consensus protocol has its own set of strengths and weaknesses. Considering how relatively new the technology is, there is still a lot of room for great progress. With the rate of how fast blockchain technology is developing, we can expect to see marked improvements on how consensus is achieved on different blockchain networks.
– Article written by Tinny
Tags: blockchain, consensus algorithm, consensus protocol, dag, delegated proof of stake, directed acyclic graph, dpos, pbft, poa, pob, poc, pol, pos, pow, practical byzantine fault tolerance, proof of authority, proof of burn, proof of capacity, proof of luck, proof of stake, proof of work
Categories: Blockchain