Proof-of-stake & Byzantine consensus

LMD-GHOST

LMD-GHOST is Ethereum's fork-choice rule — the algorithm every node runs to decide which block is the current head of the chain when competing branches exist. Its name unpacks into two ideas. GHOST (Greedy Heaviest-Observed SubTree) means that instead of following the longest chain, you walk down the block tree from the root and at each fork take the child whose entire subtree carries the most accumulated vote weight. LMD (Latest Message Driven) means the votes counted are validator attestations, and only each validator's single most recent attestation counts.

Weight is measured in staked ETH: each validator's latest attestation contributes its effective balance to every block on the path from the root to the block it voted for. Choosing the heaviest subtree, rather than the longest chain, makes the head robust — votes that landed on now-orphaned blocks still count toward their ancestors, so honest attestations are not wasted and an attacker cannot cheaply out-extend the honest majority by mining a private side chain. Counting only the latest message per validator keeps the rule simple and bounds how much an equivocating validator can distort it.

The fork choice is constrained from below by Casper FFG: it must always start its search from the latest justified checkpoint and may never select a branch that conflicts with a finalized block. Because naive LMD-GHOST proved vulnerable to balancing and ex-ante reorg attacks — where an adversary withholds and releases votes to keep honest validators split — Ethereum added proposer boost, which temporarily lends extra fork-choice weight to a timely block proposal so the honest head is harder to dislodge.

Longest-chain rules count blocks; GHOST counts votes across the whole subtree. That is why an attacker who briefly out-produces blocks on a private branch still loses the fork choice if the honest majority's attestations point elsewhere.

Also called
Latest Message Driven GHOST