Foundations of Blockchain Technology
Back to subtopicsConsensus Mechanisms
PoW vs PoS, longest/highest-weight chain, and finality intuition.
Detailed Notes
- ●Consensus algorithms enable distributed networks to agree on the valid state of the blockchain without a central authority, using either computational work (Proof of Work) or economic stake (Proof of Stake) to select block proposers.
- ●Fork-choice rules determine which chain version nodes should follow when multiple valid chains exist, typically selecting the longest chain (PoW) or heaviest chain based on validator attestations (PoS).
- ●Finality refers to the confidence that a transaction cannot be reversed. In PoW systems, finality is probabilistic and increases with each block added. PoS systems can achieve economic finality where validators stake assets that can be slashed for misbehavior.
Consensus mechanisms solve the fundamental problem of coordinating a distributed network where participants may be malicious, offline, or have network delays. Proof of Work requires miners to solve computationally expensive puzzles, making it economically costly to attack the network—an attacker would need to control more than 50% of the network's computational power. Proof of Stake replaces computation with economic stake, where validators lock assets that can be confiscated if they misbehave. Both systems use fork-choice rules to ensure network convergence—when forks occur (multiple valid blocks at the same height), nodes follow a deterministic rule to select which chain to extend. The longest-chain rule in PoW means that honest miners will naturally extend the chain with the most accumulated work, while PoS systems use more sophisticated rules like LMD-GHOST that consider validator attestations. Finality represents the point at which a transaction is considered irreversible. In PoW, finality is probabilistic—each block added makes reorganization exponentially less likely. PoS systems can achieve stronger finality guarantees through slashing mechanisms that economically penalize validators who attempt to reverse finalized blocks.
- ▸Resource-based security: Attack cost equals mining hardware and electricity
- ▸Probabilistic finality: Confidence grows with block depth
- ▸Energy intensive: Significant electricity consumption for security
- ▸Sybil resistance: Cost to create many identities prevents attacks
- ▸Capital-based security: Attack cost equals staked economic value
- ▸Economic finality: Slashing penalties deter misbehavior
- ▸Energy efficient: Minimal computation required
- ▸Validator requirements: Must lock capital to participate
- ▸Longest chain (PoW): Select chain with most accumulated work
- ▸GHOST (PoS): Select chain with heaviest validator support
- ▸Deterministic: Same rules produce same result across all nodes
- ▸Probabilistic: Confidence increases exponentially with depth
- ▸Economic: Slashing penalties make attacks economically irrational
- ▸Checkpoint finality: Some systems explicitly finalize blocks after epochs
Presenter Notes
- Explain why equal-length tie-breaking matters (fork choice rules).
- Use bias to simulate differing hashrate/stake.
