MidTermDev, the developer behind the Lean Client validator, has released Lean Solana Kit, a toolkit for writing Solana
SOL$54.37-13.1% programs with machine-checked proofs. The README sums up the aim: "write Solana programs in Lean, prove what they do, and prove the compiled program does it too." The repository's tags show four versions, v0.1.0 to v0.1.3, all published on 5 December 2026.
The announcement from the Lean Client account also reported that the validator hit a bug on mainnet and stopped itself. Every claim here comes from the developer's own repositories and posts. No one outside the project has checked the proofs yet.
We covered Lean Client when it started voting on mainnet. We covered it again when its developer said it matched Agave on all 47,071 shared conformance test cases, a suite Agave shares with Firedancer. The new kit is aimed at people writing programs rather than running a node.
What Lean Solana Kit proves about a Solana program
Lean Solana Kit checks that a Solana program's compiled bytecode behaves exactly like the Lean 4 source it came from. Lean 4 is a programming language that is also a proof checker. A small trusted core, the kernel, accepts a proof only if every step holds. This matters because validators run the compiled output, and a compiler bug could make it behave differently from the source a developer or auditor reads.
The README states that guarantee for programs the prover can handle. It splits the kit into three parts:
- building blocks that come with proofs, covering account checks, overflow-checked arithmetic, lamport transfers, program-derived addresses, and token and system calls
- the
lskcommand-line tool, which creates a project, compiles it to sBPF (the bytecode format Solana validators execute), tests it in LiteSVM, proves it, and prints deploy and verification steps - an automatic prover that writes the bytecode proof so the developer does not have to
The prover has sped up across the four releases. The kit's proof results log lists a Counter program proving in 5 seconds and a Vault program in 6 seconds. The commit that added Vault support says Counter previously took about 200 seconds and Vault timed out.
The kit's documentation says every theorem rests on Lean's three standard axioms only. The kit is Apache-2.0 licensed and builds on lean-svm, the Lean 4 model of the Solana runtime that Asymmetric Research released as open source.
Where the Lean 4 prover stops: CPI, loops and compute limits
The automatic prover cannot yet handle programs that call other programs, known as cross-program invocations or CPI. That excludes programs that make token transfers or sign with program-derived addresses. The README lists these other limits:
- most loops are not handled
- theorems cover only runs that finish
- the compute meter and memory faults sit outside the model
A program the prover cannot finish is reported as bytecode: NOT PROVEN. The token and system call building blocks are proven against stated hypotheses about how those programs behave, which the kit's documentation calls "assumptions, not theorems about those programs."
The proof log shows the prover working through lending, Dutch auction, bonding curve and AMM programs without completing them. Many DeFi programs move tokens through CPI, so automatic CPI proofs, which the developer lists as the next step, are what would bring that kind of code in range.
Lean Client stopped on a mainnet bank-hash mismatch
After each block, every node validating Solana computes a bank hash, a fingerprint of the resulting account state. A client whose hash differs from the network's has executed something differently. According to the fix commit, a transaction in mainnet block 477507743 used a single loader Write instruction to put 3,400 bytes into a program buffer.
Agave, the validator client maintained by Anza, reads at most 1,232 bytes of an instruction in its system, vote and upgradeable loader programs, and rejects anything longer. Transactions in the newer v1 format can carry more than that. Lean Client accepted the write, its bank hash differed, and the developer says the node stopped instead of moving on.
The commit, dated 5 December, adds the same 1,232-byte limit to all three programs. It says that, replayed from state saved at slot 477507391, all 2,008 blocks to slot 477509400 match.
A second client that kept running after disagreeing with the network would be a risk to consensus. One that halts turns the disagreement into a bug report. The bug also shows the limit of proofs: they check code against a specification, and a rule missing from the specification, here Agave's 1,232-byte limit, only shows up when real blocks are replayed against Agave's hashes.
Lean Client vote guard proofs and account log compaction
Two smaller changes landed in the validator. The vote guard commit rebuilds the guard from the full vote record on disk after a restart; before, some recorded votes were missing from it. Two theorems, restart_refuses and restart_safe, show the rebuilt guard refuses any vote that contradicts one already recorded, so a restarted node cannot vote against its own earlier votes.
A compaction commit keeps only the latest record of each account in the client's live log. The developer reports the log shrinking from 94.8 GB to 9.4 GB in 9 minutes, and a resumed run starting in 52 seconds instead of about 6 minutes.
Lean 4 formal verification for Solana programs
Lean Solana Kit joins other recent Lean 4 work on Solana, including lean-svm and Anatoly Yakovenko's lean-svm-jit compiler with Lean 4 proofs. Harmonic's Aristotle takes a different route: it added formal verification for Rust code, the language most Solana developers already write in. Lean Solana Kit asks developers to write the program in Lean, and in return proves the compiled bytecode as well.
The things to watch are whether anyone outside the project reproduces the proofs, whether automatic CPI proofs arrive, and whether Lean Client keeps matching the network's bank hashes on mainnet.