Under the Loom
Contents

§ 2.5 · Consensus · 5 min

Fork Choice: Longest Chain vs Heaviest Chain

When nodes see competing blocks, a fork-choice rule decides which history to follow. How Bitcoin's most-work rule and Ethereum's LMD-GHOST work, and why 'longest chain' is a misnomer.

The Loom Desk ·

SHEET 43 · CONSENSUSUNDER THE LOOM
Fig. 2.5 — schematic. Watch the real thing in wevr.ai’s live tables.

Every blockchain occasionally faces a choice. Two valid blocks appear at the same height, or a node receives a competing branch of history, and it must decide which one is the real chain. The rule that makes that decision is the fork-choice rule, and it is one of the quietest but most fundamental parts of any consensus protocol. It determines which transactions count, what a "confirmation" means and how hard history is to rewrite.

This chapter compares the fork-choice rules of the two largest chains and explains why "longest chain" is not quite what either of them uses.

Why forks happen

Forks are not failures; they are a normal consequence of a decentralised network. Blocks take time to propagate. If two block producers create valid blocks at nearly the same moment, parts of the network see one first and parts see the other. Until the tie is broken, the network has two tips.

Nodes need a deterministic rule so that, given the same information, they all converge on the same branch. That rule must also make it costly for an attacker to create a competing branch that nodes would prefer.

Bitcoin: most accumulated work

Bitcoin's rule is often described as "follow the longest chain". More precisely, nodes follow the valid chain with the most accumulated proof of work — the sum of the difficulty of all blocks in it.

The distinction matters. Difficulty changes over time, so a chain with fewer blocks mined at higher difficulty can represent more work than a longer chain mined at lower difficulty. Following "most blocks" would let an attacker build a long chain cheaply at low difficulty; following "most work" does not.

In practice, ties resolve quickly. When two blocks compete at the same height, miners build on whichever they saw first. As soon as one branch gets the next block, it has more work, and the whole network switches to it. The losing block becomes stale.

The security argument follows directly: to replace recent history, an attacker must produce a branch with more work than the honest chain — which, after several blocks, requires controlling a large share of the network's total hashrate for a sustained period.

Ethereum: LMD-GHOST with finality

Ethereum's proof-of-stake consensus uses a different rule, called LMD-GHOST, combined with a finality mechanism. The name describes how it works:

  • GHOST — "Greedy Heaviest Observed Sub-Tree". Rather than counting blocks or work along a single chain, the rule walks the tree of blocks from the last finalized checkpoint and, at each fork, chooses the branch whose subtree has the most support.
  • LMD — "Latest Message Driven". Support is measured by validators' attestations, counting only each validator's most recent vote, weighted by their stake.

So at each fork, the branch backed by the most recent votes of the most stake wins. Because attestations from validators across many slots accumulate, the rule converges quickly on a head that most of the network agrees on.

Finality changes the game

Ethereum adds a second layer that Bitcoin does not have. Once a checkpoint is finalized — supported by two-thirds of staked ETH in two consecutive epochs — the fork-choice rule never revisits anything before it. LMD-GHOST only chooses among branches built on top of the latest finalized checkpoint.

That means Ethereum has two kinds of guarantee:

  • before finality, fork choice can still switch branches, usually by at most a slot or two;
  • after finality, switching would require validators holding at least one-third of stake to violate protocol rules in provable ways, leading to their slashing.

Bitcoin has only the first kind: each additional block makes reversal exponentially more expensive, but never formally impossible.

Refinements: proposer boost

Pure LMD-GHOST had a weakness: a malicious proposer could release a block late, at a moment calculated to split attesters' votes between branches. Ethereum addressed this with proposer boost — the timely block in the current slot temporarily receives extra weight in the fork-choice calculation. That makes it much harder for a late or withheld block to displace an honest, on-time one.

Fork-choice rules keep being refined in this way, as researchers find edge cases where honest nodes could be led astray.

A worked example

Suppose two Bitcoin miners find block 900,001 at nearly the same moment. Half the network builds on block A, half on block B. Ten minutes later, a miner building on A finds block 900,002. Its branch now has more work; every node following B switches to A's branch, and block B's transactions return to the mempool, most to be included again shortly.

On Ethereum, suppose a proposer publishes a block late in its slot. Some attesters have already voted for the previous head; others see the new block. In the next slot, the new proposer builds on whichever branch has more attestation weight, boosted by its own timely proposal, and subsequent votes converge there. Within a slot or two, the fork is resolved — and within about two epochs, finality makes the outcome permanent.

You can see the regularity of Ethereum's slot timing, and the occasional missed slot, in block timestamps on the Wevr.ai live tables.

Why it matters to users

The fork-choice rule defines what "confirmed" means:

  • on Bitcoin, confidence grows with each block of accumulated work on top of your transaction;
  • on Ethereum, confidence jumps at finality, after which reversal requires a large-scale, slashable attack.

That is why confirmation conventions differ between chains — a number of blocks on Bitcoin, finality on Ethereum — and why exchanges and bridges set their deposit rules accordingly. Block and confirmation data for both chains is charted on the Wevr.ai chart explorer.

The takeaway

Fork-choice rules decide which history nodes follow when branches compete. Bitcoin follows the chain with the most accumulated work — not simply the most blocks. Ethereum follows the subtree with the most recent stake-weighted votes, refined by proposer boost and anchored by finality. Both resolve ordinary forks within moments; they differ in how the cost of rewriting history grows, and in whether it ever becomes formally final.

Index terms: fork-choice · consensus · lmd-ghost · proof-of-work · proof-of-stake

Next · § 2.6 Slashing: The Rules That Keep Validators Honest →