LMD GHOST

Published by Mario Oettler on

LMD GHOST is a variation of GHOST. LMD means Latest Message Driven. Messages are attestations from validators in a Proof of Stake (PoS) system. Latest means that previous messages (attestations) of validators are ignored and only the most recent attestation is taken into account when deciding upon the head of the chain.

Suppose, we have the following chain (or tree) of blocks. Each block is proposed by a validator given as capital letter inside the block in the following figure. The validator set has the size for five. Figures are taken from Vitalik Buterins website.

Validators A, B, C, D, and E proposed blocks.

We assume that each validator has the same effective balance. Hence we simply set the weight of each block to 1.

Only the latest block of each validator count for the weight of a subtree.

To compute the head, we start at the beginning (root) of the tree. At each fork we follow the higher number. First, we chose the lower branch (4) and then we chose the middle branch (2).

The green chain is the main chain.

In reality, we do not only consider validators proposing blocks. Instead, attestations are considered. Each block carries attestations from other validators. These attestations combined with the effective balance of its validator count for the weight of a block. But the principle is the same like above.

Every time a validator sends an attestation, the function update_latest_messages() is called. It replaces the existing attestations with the new one.


A modification of LMD is to count an attestation only if it is “new” enough. This means, an attestation must not be older than one or two epochs. Considering only these attestations avoids problems that arise if validators can save up their attestations and influence the vote at a later time.
Without modification, the LMD GHOST fork choice rule is susceptible to a balancing attack.

Categories: