EthCLLib writes Ethereum's consensus forks in Lean 4 as differences from the parent
A post on Ethereum Research on 23 November describes EthCLLib, the Lean 4 package used to write the Fulu, Gloas and Heze consensus specifications that, according to an earlier update, pass the Python specification's test vectors. The author, posting as leolara, says work started in June 2026; this post is about the framework rather than the specs themselves.
A fork is written as a difference from its parent. One line declares it, for example fork Gloas from Fulu, and inherit pulls in containers, functions and constants unchanged. An inherited function is re-elaborated inside the child, so its calls resolve to the child's own types and overrides: when Gloas redefines the Attestation container with a progressive bitlist, every inherited function that reads an attestation reads the new one. One container declaration produces both the mainnet and the minimal preset with their SSZ encodings.
Spec bodies are generic over the preset, configuration, hash function, BLS and KZG backend, the effect monad, the state's Merkle cache and the fork-choice map. The test runner picks fast choices, such as SHA-256 and the blst library through native calls and a cached Merkle tree; proofs pick a pure-Lean SHA-256 that the Lean kernel can evaluate and a symbolic cryptography backend. The post is explicit about the limit of the latter: with it, every signature check is assumed true, so the theorems say nothing that depends on BLS security.

Why it matters
A specification written as a chain of diffs makes it obvious what each fork actually changes. Running the same text against official test vectors and inside a proof assistant narrows the gap between the spec clients implement and the one researchers prove things about, within the stated assumptions.