Blockchain

What is consensus?

Blockchain technology was created to eliminate intermediaries. For example, banks approve and process financial transactions. They also attempt to prevent fraudulent activity on accounts, report it when it occurs and pay-out the money if anything is compromised. But, if there are no intermediaries and the network is decentralised, no individual or entity can regulate these transactions to ensure safety and security. That’s where consensus is needed.
Consensus is most often defined as a general agreement. For a blockchain network, achieving consensus ensures that all nodes in the network agree upon a consistent global state of the blockchain. According to Dr. Arati Baliga, a consensus protocol has three key properties based upon which its applicability and efficacy can be determined:

  1. Safety – A consensus protocol is determined to be safe if all nodes produce the same output and the outputs produced by the nodes are valid according to the rules of the protocol. This is also referred to as consistency of the shared state.
  2. Liveness – A consensus protocol guarantees liveness if all non-faulty nodes participating in consensus eventually produce a value.
  3. Fault Tolerance – A consensus protocol provides fault tolerance if it can recover from failure of a node-participating in consensus.

Why is consensus necessary?
Because any person or entity can add to the blockchain, the information added to the chain needs to be evaluated to determine that it is in fact valid information being submitted by a valid user. Consensus is recorded by cryptographically signing data to ensure authenticity.
What methods can be used to achieve consensus? 

  1. Proof-of-Work (PoW)
  2. Proof-of-Stake (PoS)
  3. Delegated Proof-of-Stake (DPoS)
  4. Practical Byzantine Fault Tolerance Algorithm (PBFT)

Each cryptocurrency uses one of the above methods to achieve consensus. While no method is considered superior, each consensus algorithm attempts to tackle the issue of scalability while maintaining fairness.