Pin snarkVM 4.7.1 from crates.io and finish v4.7 integration polish#1335
Merged
Conversation
…ignature.rs test code, lowercase record-ciphertext fixtures)
…dd(1) guarantees bad_message != original across u16/i16/i32/i64/i128)
…d ConsensusVersion::V15)
iamalwaysuncomfortable
approved these changes
Jun 1, 2026
7 tasks
marshacb
added a commit
that referenced
this pull request
Jun 1, 2026
…1335) * Bump snarkVM to 4.7.1 from crates.io (finish rand 0.10 migration in signature.rs test code, lowercase record-ciphertext fixtures) * Fix collision flake in signature.rs sign-and-verify tests (wrapping_add(1) guarantees bad_message != original across u16/i16/i32/i64/i128) * Bump consensus version test heights from 14 to 15 (snarkVM 4.7.1 added ConsensusVersion::V15)
marshacb
added a commit
that referenced
this pull request
Jun 1, 2026
* WIP: update snarkVM rev * Update SDK for testnet-v4.7.0 * Pin snarkVM 4.7.1 from crates.io and finish v4.7 integration polish (#1335) * Bump snarkVM to 4.7.1 from crates.io (finish rand 0.10 migration in signature.rs test code, lowercase record-ciphertext fixtures) * Fix collision flake in signature.rs sign-and-verify tests (wrapping_add(1) guarantees bad_message != original across u16/i16/i32/i64/i128) * Bump consensus version test heights from 14 to 15 (snarkVM 4.7.1 added ConsensusVersion::V15) * Apply wrapping_add(1) to u32/u64/u128 sign-and-verify too --------- Co-authored-by: Victor Sint Nicolaas <vicsn@users.noreply.github.com>
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.
Motivation
testnet-v4.7.0was sitting in a WIP state because the snarkVM deps pinned to a local sibling checkout viapath = "../../snarkVM/…", so it wasn't buildable outside that environment. Now thatv4.7.0andv4.7.1are tagged stable on crates.io, the path pins can flip toversion = "4.7.1"and the branch becomes shippable.This PR finishes what's needed to land it:
wasm/Cargo.toml: flip everysnarkvm-*block frompathtoversion = "4.7.1".randstays at0.10(transitively required bysnarkvm-utilities@4.7.1).wasm/Cargo.lock: regenerated for the new resolutions.wasm/src/account/signature.rs: complete therand 0.9 → 0.10migration. Production was already migrated; this updates the test module's remainingfrom_entropycallers torand::random::<T>()and tidies up the now unused imports.sdk/tests/data/records.tsandwasm/src/utilities/encrypt.rs: lowercase twoRECORD1…ciphertext fixtures so snarkVM's Bech32 parser, which canonicalizes on lowercase, accepts them. This is the upstream of Add test showcasing external signing for multiple requests for a single transaction #1330's case normalization handling, which can come out on rebase once this lands.cargo fmt --all: 6 files picked up formatting along the way.Test Plan
cargo check --features testnet/mainnet: cleancargo fmt --all --check: cleanyarn build:all: cleanyarn test:wasm/yarn test:sdk: pass apart from the preexisting local env failures (missing CI secrets, same set mainnet CI passes)Related PRs
testnet-v4.7.0integration branch.Note
Medium Risk
Bumps the entire WASM/snarkVM stack (crypto, execution verification, record parsing), which affects proof execution and devnode flows even though most edits are lockfile, docs, and test fixtures.
Overview
Makes the WASM crate buildable against published snarkVM 4.7.1 instead of a local checkout, and aligns SDK/WASM tests and docs with v4.7 consensus and record encoding behavior.
snarkVM dependency wiring:
wasm/Cargo.tomlswitches allsnarkvm-*crates from path dependencies toversion = "4.7.1";wasm/Cargo.lockis regenerated (includingrand0.10 and related crypto stack updates from the new snarkVM tree).Devnode / consensus v14: Examples and tests that call
getOrInitConsensusVersionTestHeightsnow include height 14 in the CSV (SDKprogram-managerJSDoc,wasmutilities JSDoc,sdk/tests/wasm.test.ts).Tests & fixtures: WASM signature tests finish the
rand0.10 migration (rand::random()instead ofStdRng::from_entropy()). Record ciphertext fixtures insdk/tests/data/records.tsandwasmencrypt tests use lowercaserecord1…strings so Bech32 parsing matches snarkVM’s canonical form.Minor formatting-only tweaks in a few WASM program manager / execution call sites.
Reviewed by Cursor Bugbot for commit 28d2c91. Bugbot is set up for automated code reviews on this repo. Configure here.