Skip to content

Pin snarkVM 4.7.1 from crates.io and finish v4.7 integration polish#1335

Merged
marshacb merged 3 commits into
testnet-v4.7.0from
chore/bump-snarkvm-4.7.1
Jun 1, 2026
Merged

Pin snarkVM 4.7.1 from crates.io and finish v4.7 integration polish#1335
marshacb merged 3 commits into
testnet-v4.7.0from
chore/bump-snarkvm-4.7.1

Conversation

@marshacb

@marshacb marshacb commented Jun 1, 2026

Copy link
Copy Markdown
Contributor

Motivation

testnet-v4.7.0 was sitting in a WIP state because the snarkVM deps pinned to a local sibling checkout via path = "../../snarkVM/…", so it wasn't buildable outside that environment. Now that v4.7.0 and v4.7.1 are tagged stable on crates.io, the path pins can flip to version = "4.7.1" and the branch becomes shippable.

This PR finishes what's needed to land it:

  • wasm/Cargo.toml: flip every snarkvm-* block from path to version = "4.7.1". rand stays at 0.10 (transitively required by snarkvm-utilities@4.7.1).
  • wasm/Cargo.lock: regenerated for the new resolutions.
  • wasm/src/account/signature.rs: complete the rand 0.9 → 0.10 migration. Production was already migrated; this updates the test module's remaining from_entropy callers to rand::random::<T>() and tidies up the now unused imports.
  • sdk/tests/data/records.ts and wasm/src/utilities/encrypt.rs: lowercase two RECORD1… 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: clean
  • cargo fmt --all --check: clean
  • yarn build:all: clean
  • yarn test:wasm / yarn test:sdk: pass apart from the preexisting local env failures (missing CI secrets, same set mainnet CI passes)
  • CI to confirm against the runner with secrets set

Related PRs


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.toml switches all snarkvm-* crates from path dependencies to version = "4.7.1"; wasm/Cargo.lock is regenerated (including rand 0.10 and related crypto stack updates from the new snarkVM tree).

Devnode / consensus v14: Examples and tests that call getOrInitConsensusVersionTestHeights now include height 14 in the CSV (SDK program-manager JSDoc, wasm utilities JSDoc, sdk/tests/wasm.test.ts).

Tests & fixtures: WASM signature tests finish the rand 0.10 migration (rand::random() instead of StdRng::from_entropy()). Record ciphertext fixtures in sdk/tests/data/records.ts and wasm encrypt tests use lowercase record1… 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.

marshacb added 2 commits June 1, 2026 11:20
…ignature.rs test code, lowercase record-ciphertext fixtures)
…dd(1) guarantees bad_message != original across u16/i16/i32/i64/i128)
@marshacb marshacb changed the title Bump snarkVM to 4.7.1 Pin snarkVM 4.7.1 from crates.io and finish v4.7 integration polish Jun 1, 2026
@marshacb marshacb marked this pull request as ready for review June 1, 2026 18:38
@marshacb marshacb merged commit db42f20 into testnet-v4.7.0 Jun 1, 2026
27 of 29 checks passed
@marshacb marshacb deleted the chore/bump-snarkvm-4.7.1 branch June 1, 2026 20:24
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>
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