Consensus Algorithm
A consensus algorithm is a process used in distributed systems to achieve agreement on a single data value among multiple participating nodes.
Algorithms: 1. Proof of Work (PoW). 2. Proof of Stake (PoS). 3. Delegated PoS (DPoS). 4. Proof of Authority (PoA). 5. Practical Byzantine Fault Tolerance (PBFT). 6. Raft/Paxos. Use Cases: Blockchain, Core databases, Cloud synchronization, Voting systems.
graph LR
Center["Consensus Algorithm"]:::main
Rel_decentralized_identifier_did["decentralized-identifier-did"]:::related -.-> Center
click Rel_decentralized_identifier_did "/terms/decentralized-identifier-did"
Rel_on_chain_identity_management["on-chain-identity-management"]:::related -.-> Center
click Rel_on_chain_identity_management "/terms/on-chain-identity-management"
Rel_decentralized_identity_management["decentralized-identity-management"]:::related -.-> Center
click Rel_decentralized_identity_management "/terms/decentralized-identity-management"
classDef main fill:#7c3aed,stroke:#8b5cf6,stroke-width:2px,color:white,font-weight:bold,rx:5,ry:5;
classDef pre fill:#0f172a,stroke:#3b82f6,color:#94a3b8,rx:5,ry:5;
classDef child fill:#0f172a,stroke:#10b981,color:#94a3b8,rx:5,ry:5;
classDef related fill:#0f172a,stroke:#8b5cf6,stroke-dasharray: 5 5,color:#94a3b8,rx:5,ry:5;
linkStyle default stroke:#4b5563,stroke-width:2px;
🧒 Explain Like I'm 5
Imagine a group of friends trying to decide which movie to watch. If they all shout at once, no one knows the winner. A '[Consensus [Algorithm](/en/terms/algorithm)](/en/terms/consensus-algorithm)' is a fair set of rules they agree on beforehand, like 'the person who can solve a complex puzzle first gets to choose' (PoW) or 'the person who has the most movie tickets in their pocket gets more votes' (PoS). It's the way the group reaches a single, final decision without having a 'leader'.
🤓 Expert Deep Dive
Technically, consensus [algorithms](/en/terms/consensus-algorithms) are evaluated based on 'Safety' (the system never returns an incorrect value) and 'Liveness' (the system eventually returns a value). 'Paxos' and 'Raft' are the industry standards for consensus in traditional distributed databases like Google's Spanner or Kubernetes (etcd). In blockchain, 'Nakamoto Consensus' (PoW) prioritized liveness and decentralization over immediate finality, allowing for 'Probabilistic Finality' where a transaction becomes more secure as more blocks are added. In contrast, BFT-based algorithms like 'Tendermint' provide 'Instant Finality'—a block is 100% permanent once it is committed—but they are generally less scalable in terms of the number of nodes. The choice of consensus [algorithm](/en/terms/consensus-algorithm) is the primary driver of a blockchain's 'Trilemma' position (Security, Scalability, and Decentralization).