feat(l1): integrate OpenVM v2.0.0-beta.1 backend with full precompile acceleration#6499
Draft
feat(l1): integrate OpenVM v2.0.0-beta.1 backend with full precompile acceleration#6499
Conversation
Replace the OpenVM v1.4.x proving backend with v2.0.0-beta.1 (SWIRL proof system). The new SDK requires explicit SystemParams and AggregationSystemParams for construction. Proof output type changes from VmStarkProof to NonRootStarkProof. Groth16/EVM proof path removed (only Compressed STARK supported for now). Expand OpenVmCrypto from 2 overrides (ecrecover, recover_signer) to 15 accelerated methods covering keccak256, sha256, BN254 (ecadd, ecmul, pairing), secp256r1 verify, BLS12-381 (G1 add, G1 MSM, G2 add, G2 MSM, pairing), and modexp with BN254 Fr fast path. Add subgroup membership checks for BN254 G2, BLS12-381 G1, and BLS12-381 G2 to prevent invalid-curve attacks. Decouple openvm-kzg (pinned to v1.4.1) and secp256k1 C library from the openvm feature to avoid version conflicts and cross-compilation failures in the guest binary.
Lines of code reportTotal lines added: Detailed view |
Move SubgroupCheck trait and implementations from the separate openvm_subgroup_check.rs module into the bottom of openvm.rs. No functional change.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Replace the OpenVM v1.4.x proving backend with v2.0.0-beta.1 (SWIRL proof system). This is L1 stateless validation only — no L2 prover integration.
SystemParams+AggregationSystemParams, proof type changes fromVmStarkProoftoNonRootStarkProof, Groth16 path removed (Compressed only), per-call SDK construction (Sdkis!Send)OpenVmCryptofrom 2 to 15 accelerated methods — keccak256, sha256, BN254 (ecadd, ecmul, pairing), secp256r1 verify, BLS12-381 (G1 add/MSM, G2 add/MSM, pairing), modexp BN254 Fr fast pathopenvm-continuations, addopenvm-verify-stark-host, decoupleopenvm-kzg(blocked on v2) andsecp256k1C lib fromopenvmfeatureNot in scope
ProverTyperegistrationverify()/to_proof_bytes()implementationTest plan
cargo check -p ethrex-prover --features openvmcompiles cleanlycargo openvm build --no-transpile(v2 CLI)execute()with emptyProgramInput— guest correctly rejects with domain error, no VM crashtest_blobbasefee_before_fork(Cancun block) passes through OpenVM VM in 7.7s