zkdefi · notes

#lean

Optimistic by construction — what the log promises, and where the rollup analogy honestly stops

The Lean Transparency Log looks a lot like an optimistic rollup for verification claims — cheap to assert, expensive to get away with. The resemblance is real and worth having, but the precise version is better than the slogan. Three layers of guarantee, two very different kinds of fault, three honest disanalogies, and one loop that needs no metaphor at all.

The log notarizes itself — entry 13

The Lean Transparency Log has always notarized proofs about other people's software. As of today it notarizes the proofs about its own machinery — entry 13 is a kernel-checked mechanization of the log's own accumulator, appended into the log itself, verifiable end to end from the live service by anyone with a stock toolchain.

An append-only witness for "the proof still checks" — the Lean Transparency Log

A verification proof is a claim about a specific commit. Claims rot — the repo moves, the axioms drift, "it verified once" becomes folklore. The Lean Transparency Log is an append-only, Merkle-anchored ledger of signed attestations that named proofs re-check with exactly their documented assumptions, plus the agent tooling that asks the only question a downstream consumer cares about.

The deferred half, done four times — point-level ed25519 verification lands on every fork

The four ed25519 verification pyramids each ended their first post with an honest asterisk — the signature apex was proven at the byte level, and lifting it to the point level was deferred. That deferral is now closed, on all four forks: decompress is extracted and proven, the modular square root is proven, compress is canonical, and the acceptance criterion now reads as a real curve-point equation.

From 1+1=2 to machine-checked curve arithmetic — the book

A 106-page LaTeX/TikZ book plus compiling exercise files - a curriculum that takes an undergraduate with zero formal-methods background to the point of reading, and extending, the real Lean 4 proofs in the ed25519/Pallas verification family.

Verifying Solana's ed25519 — same theorems, different codebase

The proof pyramid rebuilt against Solana's solana-ed25519 crate — its own Charon/Aeneas extraction, its own compiled certificates. Forks drift; theorems about the upstream prove nothing about the fork.

The signature check in your pocket — verifying Betrusted's ed25519

The fourth ed25519 target - the curve25519-dalek fork used by Betrusted/Precursor, the security-first open hardware device whose entire boot chain and update trust reduce to this code accepting the right signatures.

A proof pyramid over the real curve25519-dalek

Machine-checked correctness for the ed25519 implementation everyone actually ships — field, group law, scalar arithmetic, and the EdDSA acceptance criterion itself — proven in Lean 4 about the Aeneas-transpiled Rust, not about a flattering re-model.

No bridge axioms this time — Pallas field arithmetic, proven properly

Verification of the Pallas field layer in zcash/pasta_curves — Montgomery-form 4×64-limb arithmetic, with the 255-bit modulus's primality machine-checked via a Lucas/Pratt certificate. A do-over of an earlier attempt that axiomatized exactly the statements that needed proving.

Proofs about the code inside the prover — RISC Zero's dalek fork, verified

The third target of the ed25519 verification family - RISC Zero's curve25519-dalek fork (v4.1.3), the one that runs inside zkVM guests. A ZK proof attests that code ran; it does not attest that the code is correct. These certificates cover the half the SNARK can't.