Humans seem to have a predilection for a pyramidic society with a leader at the top. Or do we? Cryptocurrency culture touts the exact opposite. The essential framework of blockchain technology, the basis for crypto, is based on leaderless decentralization.
Leaderless does not mean anarchy. The stated purpose of Bitcoin, Ethereum, Tazos and many other cryptocurrencies is to create the best system of rules — fair, balanced and incorruptible for all users. The rules, rather than any 1 person or group of people, set the standards of engagement. Blockchain consensus is a concept essential to the execution of this kind of system.
In short, blockchain consensus achieves final agreement on a problem or process without the need for an individual to provide the directive.
How is Consensus Achieved in Blockchain?
In order to achieve consensus in a decentralized environment, the data within that environment should have the following characteristics:
- Immutable: Unable to be changed
- Persistence: Fraudulent entries impossible
- Auditable: Transparent, easily verified records
Basically, the blockchain is made up of fully transparent records that can’t be faked or changed, like 10 people looking at a red balloon and agreeing it’s a red balloon.
However, you always have to worry about the 11th guy putting a crimson red in with the scarlet red and calling it the same red. Because of this, all new entries into the blockchain must be reviewed before acceptance. To create an efficient system, a review must be accomplished as quickly as possible and hold to the following 3 standards:
- Fault tolerance: A consensus protocol must be able to recover from an individual node failure. (If one of your 10 balloon watchers suddenly goes color blind, you still have 9 who can properly assess the situation.)
- Security: All of the nodes within the blockchain must generate the same output. All of the outputs should be valid in accordance with the rules of the blockchain. Another name for this is “consistency of the shared state.” (The rules say that scarlet red is red. All nodes must be in line with this ruling at all times, or it is no longer a node.)
- Real-time value: The consensus protocol must ensure that the value nodes agree upon shows up on the blockchain in real time. (Your 10 balloon watchers put the 11th balloon in place immediately upon agreeing it is scarlet red.)
Why is Consensus in Blockchain Important?
Blockchain consensus is the digital form of the social contract.
Attribution: Flickr. The social contract includes all of the unspoken agreements civilians take to ideally make society most efficient.
When you take our morning commute to work in the morning, you assume that everyone else will follow the rules of the road. This ensures efficiency of movement and keeps people safe. This social contract only works if everyone follows it. One person driving on the wrong side of the road can make dozens of people late to work.
Consensus in blockchain is essential for creating an efficient and secure ledger — just like obeying traffic lights is essential for creating an efficient and secure avenue. The primary goal of any consensus program is to facilitate communication between blockchain nodes, especially when it comes to quickly validating new transactions. Just as important is the ability to keep rulebreakers off the blockchain, adding false blocks of information.
Basically, your 10 red balloon watchers would be able to quickly tell that the 11th balloon was a different shade of red. They would know through common agreement. However, they must still agree on how to come to that agreement.
What are the Types of Consensus Protocols?
There are many ways to come to a consensus, all with their own advantages and disadvantages. Learning the differences between them is more than just an intellectual exercise — it can make you money. You can tell a great deal about a cryptocurrency by the type of consensus protocol it uses. Certain types of consensus may be less transparent or faster than others.
Attribution: GitLab. An image of a hash generation, which codifies the transactions to the left and readies it for the blockchain
Proof of Work
Bitcoin makes use of proof of work, a system that does not require all nodes to identify with their individual consensus. Proof of work allows a single node to announce a conclusion which is then verified by other nodes.
Your 10 red balloon watchers choose a leader who verifies the 11th balloon is a different red. The others agree.
Proof of Stake
In a proof of stake algorithm, a digital signature stands as proof of an ownership stake in the network. The network decides who will announce the consensus based on a lottery. The Peercoin cryptocurrency uses the proof of stake methodology, which tends to provide the most security of the choices on this list.
Your 10 balloon watchers verify their authority by proving they each brought a balloon or voted for a consistent red. The network randomly decides who makes the announcement about the 11th balloon. The others agree.
Delegated Proof of Stake
Individuals choose a delegate to represent their ownership stake in the delegated proof of stake system and reach a consensus. Although this is the most centralized solution, it is also the quickest method. Bitshares is the most high profile blockchain to use delegated proof of stake.
Your balloon watchers who know they have the same opinion form a group and elect a leader to tell the other groups the 11th balloon is a different color.
Proof of Activity
As a combination of proof of stake and proof of work, crypto miners have an advantage on a blockchain that is using the proof of activity standard. Decred is one of the more notable cryptocurrencies that uses proof of activity.
You get to be the balloon leader based on the number of balloons you brought and the leadership you’ve shown with decision making in the past.
Proof of Burn
Proof of burn serves as an alternative to proof of stake and proof of work and uses less energy. A miner must first burn a virtual currency by sending it to a verifiably unspendable address. The miner is then allowed to write blocks based on the amount of value that is burnt. Counterparty uses this method.
Your balloon watchers must pop 1 of their balloons for the opportunity to mine 2 more.
Proof of Elapsed Time
Proof of elapsed time requires each node to wait for some time period. The time period for each node is different and random. The node that “picks the short straw” will write the new block to the blockchain. Hyperledger Sawtooth uses the proof of elapsed time algorithm.
Your balloon watchers must have a coffee with each other until 1 of them is randomly selected.
There is a constant competition to build upon or improve consensus protocols. Other mechanisms that combine or streamline the protocols above include practical Byzantine fault tolerance, SIEVE, unique node lists, proof of importance, leased proof of stake, proof of weight and proof of capacity.
Understand Blockchain Consensus
If you want to take full advantage of decentralized currencies and their associated trading platforms, understanding blockchain consensus is essential. With a number of viable blockchain consensus algorithms to choose from, it seems as though we really can trade assets and keep contracts without Big Brother looking over our shoulders. New generations of consensus protocols are improving upon the last.