Skip to content

feat(ffi)!: own the EIP-8288 native backend on pinned upstream leanVM (ABI 12) - #5

Open
manusw7 wants to merge 8 commits into
mainfrom
feature/eip8288-abi12-native
Open

manusw7 wants to merge 8 commits into
mainfrom
feature/eip8288-abi12-native

Conversation

@manusw7

@manusw7 manusw7 commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

src/ffi was a hand copy of Nethermind's tools/lean-ffi on the Marchhill leanVM fork, tested by checking out Nethermind, so the native EIP-8288 backend had two sources and a circular build.

Own it here on unmodified leanEthereum/leanVM e4dcb8d5, with ABI 12 and a separate Nethermind.Crypto.Lean.Testing package, tested without Nethermind. Experimental: the guest patches in src/ffi/crates (crates/upstream.sh diff) are temporary; once EIP-8288 and leanVM stabilize, we use leanVM directly, unpatched.

manusw7 and others added 4 commits November 12, 2026 18:36
… the guest in src/ffi (ABI 12)

src/ffi becomes the source of the native EIP-8288 backend instead of a copy of
Nethermind's tools/lean-ffi. It depends on unmodified leanEthereum/leanVM at
e4dcb8d5436c9bf76398d890c57c59613af12956 and carries the EIP-8288 aggregation guest in
crates/: rec_aggregation and signatures vendored from upstream with NiceTry v2
signatures (0x10), generic leanSTARK claims (0x11) keyed by upstream's program digest,
mixed recursive merge and discard, and Keccak-256 dependency commitments split by
scheme. ABI 12 adds nlean_verify_leanstark and seven limits; AGGREGATED_VK is
f7cf74585d02043051f0575c23c6b441b0b08ac9e273f5e989c5984b8a4ac0e5. The crate version
0.12.0 carries the ABI. fixtures can also prove a leanSTARK dependency on a message.

Each vendored crate keeps upstream's MIT and Apache-2.0 texts; about.toml clarifies the
leanVM crates and the notices are regenerated. Validated in NethermindEth/nethermind#15829.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…e it

crates/upstream.sh diff prints the EIP-8288 changes against upstream at the pinned
revision; crates/upstream.sh update <rev> three-way merges the crates to a newer
upstream revision and repins Cargo.toml and Cargo.lock.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…hermind checkout

Nethermind.Crypto.Lean.Testing ships the vectors, the fixtures tool and the startup
stub, built with the library, for consumers' native suites; its buildTransitive
target copies the host RID's assets to lean-vectors/. The .NET tests check the ABI,
key and limits and verify the packaged NiceTry v2 and leanSTARK vectors and witnesses
from the packaged tool. Build Lean builds and stages the test assets; Test / Publish
runs the whole Rust workspace, packs both packages and no longer checks out
Nethermind to replace its source.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
manusw7 and others added 3 commits November 12, 2026 18:49
CodeQL read the bench's fixed key seeds as hard-coded salts. The bench measures a
workload's shape, so random keys lose nothing.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
CodeQL followed the per-run constant into the signed message.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…Crypto.Lean

One package instead of two: the vectors, fixtures tool and startup stub move to
testing/ in Nethermind.Crypto.Lean, outside runtimes/, and its buildTransitive target
copies them to lean-vectors/ only with NethermindCryptoLeanTestAssets=true. A consumer
publish without it gets the library alone, which Verify package assets now checks. The
assets are the Build Lean outputs of 73c3644, moved unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A distro-built SDK reports a distro RID such as ubuntu.24.04-x64, under which the
package has no test assets; the portable RID comes first now.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants