Skip to content

feat: v6 upgrade#219

Open
mattstam wants to merge 8 commits intomainfrom
mattstam/v6
Open

feat: v6 upgrade#219
mattstam wants to merge 8 commits intomainfrom
mattstam/v6

Conversation

@mattstam
Copy link
Copy Markdown
Contributor

@mattstam mattstam commented Mar 26, 2026

Summary

Upgrades the VApp and prover node from SP1 V5 to SP1 V6. As the majority of proof requests on the network are now SP1 V6, switching V6 to the primary version means a greater percentage of proofs can have the stronger cryptographic security guarantees of native SP1 proof verification, rather than falling back to signature-based verification.

Dependency & Toolchain Changes

  • All sp1-* workspace deps: 5.2.36.0.2
  • zkVM program sp1-zkvm deps consolidated to { workspace = true } (were hardcoded at 5.1.0)
  • Rust toolchain: 1.881.91 (SP1 V6 minimum)
  • Updated [patch.crates-io] entries (sha2, sha3, tiny-keccak, k256, p256) to sp1-6.0.0 tags; removed crypto-bigint (no longer patched in V6)
  • CI: updated action.yml and pr.yml to install Rust 1.91 and SP1 V6

is_primary Version Change

  • V6 is now the primary version: is_primary_version check changed from starts_with("sp1-v5") to starts_with("sp1-v6")
  • V6 Compressed proofs now use native SP1 recursive verification (strongest guarantee)
  • V5 Compressed proofs fall back to signature-based verification (still supported, just not primary)

SP1 V6 API Migration

  • EnvProver::new(), setup(), execute(), prove() are now async
  • spawn_blocking + catch_unwindtokio::spawn (panics caught via JoinError)
  • include_elf! now returns Elf enum instead of &[u8]
  • report.gas field → report.gas() accessor
  • Calibrator::calibrate() trait made async
  • Aggregation build.rs wrapped in tokio::runtime for async setup()
  • verify_sp1_proof unchanged — V6 preserves the same public API internally

ELF Rebuilds

  • x.sh build tags updated to v6.0.2
  • Target architecture changed from riscv32im to riscv64im-succinct-zkvm-elf

Test Plan

  • cargo check --workspace passes (excluding zkVM programs which need SP1 toolchain)
  • cargo test --release passes (vapp state tests, including V5 backward-compat tests)
  • cargo fmt --check passes
  • ELFs rebuild successfully via ./x.sh
  • Verify V6 proofs clear with native verification on testnet
  • Verify V5 proofs clear with signature verification (backward compat)

@mattstam mattstam marked this pull request as ready for review March 26, 2026 17:55
Copilot AI review requested due to automatic review settings March 26, 2026 17:55
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the repository to SP1 v6 and newer Rust tooling, including changes to prover/client APIs and version routing logic.

Changes:

  • Upgrade SP1 crates/tooling to v6.0.2 and update build scripts to the async sp1-sdk API.
  • Update Rust toolchain/CI to use Rust 1.91 and align “primary version” logic to sp1-v6.
  • Adjust node prover + calibrator to async initialization/execution and update related tests.

Reviewed changes

Copilot reviewed 14 out of 16 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
x.sh Bump cargo prove tool tag to v6.0.2 for program builds
rust-toolchain.toml Update pinned Rust toolchain channel
programs/vapp/stf/Cargo.toml Switch sp1-zkvm to workspace dependency (v6)
programs/vapp/aggregation/build.rs Move build-time key hash generation to async sp1-sdk API
programs/vapp/aggregation/Cargo.toml Update SP1 deps and add tokio for async build script
crates/vapp/tests/common/mod.rs Update test request version strings to v6
crates/vapp/tests/clear.rs Re-target “non-primary compressed” tests from v6 to v5
crates/vapp/src/state.rs Change “primary supported version” routing to v6
crates/node/core/src/serial.rs Update prover initialization + proving flow to async SP1 v6 APIs
crates/node/calibrator/src/lib.rs Make calibrator async and update execution/proving calls for v6
crates/node/calibrator/Cargo.toml Add async-trait and tokio dev-dependency
bin/node/src/main.rs Await async calibrator/prover initialization and update ELF type
Cargo.toml Bump Rust MSRV + SP1 versions; adjust patches for v6
.github/workflows/pr.yml Update CI toolchain version
.github/actions/setup/action.yml Update Rust install version and sp1up version

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread programs/vapp/aggregation/build.rs
Comment thread programs/vapp/aggregation/Cargo.toml
Comment thread crates/node/core/src/serial.rs Outdated
Comment thread crates/node/core/src/serial.rs Outdated
Comment thread crates/node/calibrator/src/lib.rs Outdated
Comment thread crates/node/calibrator/src/lib.rs Outdated
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