Understanding Consensus: From Raft to PoW in Blockchain
This article explains the concept of consensus in blockchain, compares private, consortium and public environments, and introduces key algorithms such as Paxos, Raft, PBFT, Proof‑of‑Work and Proof‑of‑Stake, highlighting their challenges and solutions.
0 What is Consensus?
Consensus means a shared agreement, the process by which participants reach a common decision.
1 From Single Machine to Cluster
Two reasons to move to clusters: performance limits and reliability concerns; the latter leads to the need for consensus among replicas.
2 Multi‑Replica Consensus
In a distributed system, achieving agreement can rely on trust, voting, or more complex protocols.
3 Challenge 1: System Crashes
Crash fault tolerance (CFT) ensures the system continues operating despite network, disk, or server failures.
4 Solution: Paxos and Raft
Paxos (1990) and Raft (2013) are CFT algorithms that tolerate up to half faulty nodes. Paxos uses proposers, acceptors, learners; Raft uses leader, follower, candidate and log replication.
5 Challenge 2: Byzantine Nodes
In consortium environments, malicious nodes can disrupt consensus, requiring Byzantine fault tolerance (BFT).
6 Solution: PBFT
Practical Byzantine Fault Tolerance (PBFT) achieves consensus with three‑phase commits, tolerating up to one‑third malicious nodes.
7 Challenge 3: Massive Public Nodes
Public blockchains need algorithms that scale to thousands of nodes, which PBFT cannot handle.
8 Solution: PoW and PoS
Proof‑of‑Work (PoW) uses computational puzzles (e.g., Bitcoin) while Proof‑of‑Stake (PoS) selects validators based on token holdings; both provide consensus for open networks.
9 Summary
Consensus is a core topic in distributed systems and blockchain. We covered Raft and Paxos for private settings, PBFT for consortium, and PoW/PoS for public chains.
NiuNiu MaTe
Joined Tencent (nicknamed "Goose Factory") through campus recruitment at a second‑tier university. Career path: Tencent → foreign firm → ByteDance → Tencent. Started as an interviewer at the foreign firm and hopes to help others.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
