Consensus in Blockchain

Eugene Cofie
FAB CHAIN
Published in
4 min readAug 3, 2018

A beginner look at consensus mechanisms in blockchain

A common question I get from beginners who are trying to understand Bitcoin and blockchain in general is “how is sending money over the internet decentralized?”. The answer is that the network runs an algorithm that allows participants to come to a consensus on the truth of a ledger of the history of the network without anyone having the authority to declare the truth alone.

Usually past this point it becomes a difficult process of trying to explain different consensus mechanisms and how they operate. To alleviate this common conversation pain, here is a quick explainer for different consensus methods in the blockchain space currently in use, and how they work.

Below is a quick video on this topic as well as some simple explanations.

POW (Proof of Work)

Proof of Work was created by the inventor of Bitcoin, Satoshi Nakamoto, and is the most used algorithm for blockchains like Bitcoin or Ethereum. In POW, special nodes in the network called “miners” compete to be the first to find a “hash” number of a block of data (data=transactions) that is pending to be added to the blockchain. The miner that finds out the hash number gets to broadcast it to the network and, when confirmed by the network, add it to the blockchain.

For their efforts, they get a transaction fee paid to them as well as a special reward, incentivizing users to become miners and process transactions for the network. The key to this process is that the hash number is found at random through brute force guessing, so no specific machine can have any advantage besides pure processing power.

This algorithm works well but is slow in processing transactions and energy inefficient.

Byzantine Fault Tolerance

Popular projects such as Stellar and Ripple use Byzantine Fault Tolerance. Each node in the network has an internal state and must decide whether they accept information sent to them individually is true by running a computation. The result of the computation informs the nodes decision, which they broadcast to the network. The decision of whether to accept the block of data as “true” in the network is based on how many nodes accept it as true through their computation. Once past a certain number, the block is accepted.

In practical byzantine fault tolerance, used by networks like Hyperledger, “generals”are chosen to run this process. In Federated Byzantine Agreement, each pre-chosen “general” runs their own chain of truth, instead of just the network blockchain and nodes choose their “generals” to follow.

This solution is low-cost and very scalable, but the network is partially centralized in both setups.

POS (Proof of Stake)

Proof of Stake emerged because of the incredible amounts of energy it takes to run Proof of Work mining and the cost of buying GPU chips to run POW mining.

In POS mining, participants in the network stake coins of value as a “bet” to see which blocks are valid; those who choose the winning block keep their stakes while the ones who bet on the forked chain lose their stakes. Stakers who add the block only receive transaction fees, no rewards.

POS is good because it would be expensive for someone to try to deceive the network but also has the issue of stakers voting for multiple forks since there is no computational power lost through doing this.

DPOS (Delegated Proof of Stake)

Delegated Proof of Stake is just a variation of Proof of Stake; it has all of the same properties except coin holders in DPOS can use their coins to elect the nodes that would add blocks to the chain.

This type of algorithm is cheap to run and very scalable, but it is partly centralized.

This list does not include Directed Acrylic Graph consensus algorithms because they are essentially not true blockchains. In my next write-up I’ll get into the different DAG approaches.

--

--

Eugene Cofie
FAB CHAIN

Product Manager, Tech and Blockchain Enthusiast, Avid Reader, Sports Fanatic. @eugcofie.