Cointegrity

Fork-Choice Algorithm

Web3 / blockchain technology

A fork-choice algorithm is the set of deterministic rules that blockchain clients use to select which chain to follow when multiple competing valid blocks or chain branches exist, determining the current canonical "head" of the chain. These rules are essential in proof-of-stake systems like Ethereum 2.0, where the algorithm (such as LMD-GHOST) weighs factors like validator attestations, block finality, and time to resolve ambiguity and reach consensus on a single authoritative chain. Different algorithms can significantly impact network security, finality guarantees, and resistance to attacks like long-range reorgs. Example: Ethereum 2.0's fork-choice rule prioritizes the chain with the most validator attestations (weighted by stake), and after the Merge upgrade, blocks are considered "finalized" after two consecutive epochs pass, preventing reorgs beyond this point and providing cryptographic certainty. Why it matters for blockchain technology: Fork-choice algorithms are critical to consensus security—they determine whether nodes agree on transaction history and prevent malicious actors from manipulating chain history, making them foundational to a network's resistance against reorganization attacks and finality guarantees.

Category: blockchain technology

Explore the full Web3 Glossary — 2,062+ expert-curated definitions. Need guidance? Talk to our consultants.