A fork choice rule is the algorithm that each node on a blockchain uses to decide which chain of blocks to treat as the true one when more than one version exists. Competing versions, or forks, arise naturally when two blocks are produced at nearly the same time, when network delays mean some nodes see blocks late, or when attackers try to rewrite history. The rule lets every honest node, working independently, settle on the same chain without asking anyone.
The fork choice rule is one part of a blockchain's consensus design, alongside the rules for who may produce blocks, such as proof of work or proof of stake, and the rules for when a transaction counts as final. It is distinct from a planned software change called a hard fork, although the word "fork" is shared. Bitcoin and Ethereum use different rules, and their designs have been studied closely because the rule determines how safe a payment is once it appears on-chain.
Fork choice rule in plain terms
Imagine a group of writers adding pages to a shared notebook, each working from their own copy. Now and then, two writers add a different page at the same moment, and the notebook briefly has two possible next pages. Everyone needs a simple rule to decide which version to keep writing on, or the group will split.
A fork choice rule is that shared rule. In Bitcoin it says, roughly, "follow the version that took the most work to write". In Ethereum it says, roughly, "follow the version supported by the most recent votes from the network's validators". Once most of the group follows one version, the other is abandoned and its pages are dropped.
Bitcoin: the heaviest chain
Bitcoin nodes follow the valid chain with the most accumulated proof of work, often loosely called the "longest chain". When two miners find blocks at almost the same time, nodes start with whichever they saw first. As soon as one branch gets a further block, it carries more work and every node switches to it. Transactions in the abandoned block return to the mempool and are usually included again later.
Because a longer branch can always appear in theory, Bitcoin offers probabilistic finality: the deeper a transaction is buried, the less likely it is to be reversed. That is why many exchanges, payment processors and merchants wait for several transaction confirmations before treating a payment as settled. An attacker with more than half the network's computing power could, in principle, outpace the honest chain, which is the basis of the 51% attack.
Ethereum: LMD-GHOST and finality
Since moving to proof of stake in 2022, Ethereum has combined two components, together known as Gasper. The fork choice part, LMD-GHOST, picks a chain by counting the most recent attestations, or votes, of validators, weighted by their stake. Starting from the last agreed block, a node chooses at each fork the branch backed by the most stake, and continues to the tip. The name stands for "latest message driven greedy heaviest observed sub-tree", building on GHOST, a rule proposed by researchers in 2013.
The second component, Casper FFG, a finality gadget related to Casper, periodically marks checkpoints as justified and then finalized once two-thirds of staked ether has voted for them. The fork choice rule will never move away from a finalized block, so finalized transactions cannot be reversed unless a large share of stake is willing to be destroyed through slashing.
Reorganizations and attacks
When nodes switch from one branch to another, the result is a chain reorganization, or reorg. Short reorgs of one block are normal on many networks and usually go unnoticed by users, because wallets and exchanges wait for further blocks before treating a payment as settled. Longer waits trade speed for safety. Deeper reorgs are a warning sign: they may result from bugs, network splits or attacks in which an actor deliberately builds a hidden branch and releases it to replace blocks others have accepted. Researchers have found several weaknesses in fork choice rules over the years, including ways to delay or "balance" votes between branches, and Ethereum has adjusted its rule more than once to close them.
Practical importance
- Settlement safety. Exchanges and payment firms set deposit waiting times based on how quickly a chain's fork choice rule makes reversal unlikely, a concern related to settlement finality in traditional finance.
- Resistance to attack. A well-designed rule makes rewriting history expensive and quickly obvious to honest nodes.
- Liveness. The rule must keep the chain moving even when some nodes are offline or messages arrive late.
- Client agreement. Every node must apply the rule identically; a bug in one client can split the network into competing chains.