You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Upstream's _compute_lmd_ghost_head re-tallies votes on every call — a naive walk. Production clients use proto-array / incremental weight-delta structures instead. Today, every client team re-derives the correctness of that optimization informally.
Our proof assets already cover the naive side: FC-1 (update_head_deterministic, computeLmdGhostHead_in_store), FC-2 (head_descends_from_justified), FC-4 (fork_choice_acyclic via properAncestor_slot_lt).
Proposal
Model an incremental weight-cache head computation (proto-array style: per-block weight deltas, best-child/best-descendant propagation) in LeanSpec/Forks/Lstar/Store/.
Publish the theorem as a conformance target: clients implementing proto-array can point at a machine-checked proof that their algorithm agrees with the reference spec.
Why
Highest-value item in the verified-refinement direction: the spec stays naive and readable, while the one optimization every client actually ships gets a mechanized correctness proof shared across teams. Divergent tie-break or delta-propagation bugs in this layer are exactly the cross-client interop failures the reference spec exists to prevent.
Estimated scope
Medium — requires new modeling (weight deltas, propagation invariants), not just re-plumbing existing lemmas. Good milestone after the fuel-removal work (see companion issue), since the walk lemmas get cleaner first.
Context
Upstream's
_compute_lmd_ghost_headre-tallies votes on every call — a naive walk. Production clients use proto-array / incremental weight-delta structures instead. Today, every client team re-derives the correctness of that optimization informally.Our proof assets already cover the naive side: FC-1 (
update_head_deterministic,computeLmdGhostHead_in_store), FC-2 (head_descends_from_justified), FC-4 (fork_choice_acyclicviaproperAncestor_slot_lt).Proposal
LeanSpec/Forks/Lstar/Store/.Store.WellFormedstore, incremental head =computeLmdGhostHeadhead (including tie-break behavior, which is content-derived since fix(fork-choice): make the equal-slot equivocation tie deterministic leanEthereum/leanSpec#1181 — insertion-order independence is what makes this statement well-posed).Why
Highest-value item in the verified-refinement direction: the spec stays naive and readable, while the one optimization every client actually ships gets a mechanized correctness proof shared across teams. Divergent tie-break or delta-propagation bugs in this layer are exactly the cross-client interop failures the reference spec exists to prevent.
Estimated scope
Medium — requires new modeling (weight deltas, propagation invariants), not just re-plumbing existing lemmas. Good milestone after the fuel-removal work (see companion issue), since the walk lemmas get cleaner first.