Consensus Mechanism

What is Consensus? set of steps that are taken by most or all nodes in a blockchain to agree on a proposed state or value.
Properties of Consensus
  1. Fault tolerant: The consensus algorithm should be able to run in the presence of faulty or malicious nodes (Byzantine nodes)
  2. Single vote: No node can make the decision more than once in a single consensus cycle

Categories of consensus mechanisms

1. Leader election / POW based

Leader is elected at random(lottery based) and leader proposes final value.
Bitcoin uses it

2. BFT based

Based on rounds of votes.

Implementations of consensus protocols

1. Paxos

Introduced by Leslie Lamport in 1989
Nodes are assigned various roles such as Proposer, Acceptor, and Learner.

2. RAFT

Node can be a follower, candidate, or leader. The leader commits the proposed changes