Skip to content

Chore/openvm v21 - #257

Draft
lispc wants to merge 9 commits into
masterfrom
chore/openvm-v21
Draft

Chore/openvm v21#257
lispc wants to merge 9 commits into
masterfrom
chore/openvm-v21

Conversation

@lispc

@lispc lispc commented Jul 14, 2026

Copy link
Copy Markdown
Collaborator

No description provided.

lispc added 2 commits July 14, 2026 09:52
- Retarget all openvm-org/openvm.git deps to branch develop-v2.1.0
  (locked at fd569c7); stark-backend stays on tag v2.0.0 as pinned by
  that branch
- Migrate guest to RV64: riscv64im-unknown-openvm-elf target via the
  openvm-1.94.0 toolchain, openvm-rv32im-* -> openvm-riscv-* renames,
  openvm.toml rv32i/rv32m -> rv64i/rv64m
- SDK API: Sdk::riscv64, compile-then-execute for execute* calls
- Hint stream is now u64-based; user public values are u16 cells
  (2 LE bytes each), pi hash fills the first 16 of 32 cells
- Patch locally generated EVM verifier for 2-bytes-per-PV calldata
  (upstream template bug on this branch); regenerate all guest assets
  (commitments, openVmVk.json, verifier.sol/bin)
- Host toolchain: nightly-2026-01-18 (openvm-sdk tco feature)

GPU e2e: single-chunk, multi-chunk, batch, bundle all pass
@github-actions github-actions Bot added crate-chunk-circuit Updates to the guest program chunk-circuit crate-batch-circuit Updates to the guest program batch-circuit crate-bundle-circuit Updates to the guest grogram bundle-circuit crate-prover Updates to the prover crate crate-integration Updates to the integration crate crate-build-guest Updates to building of guest programs crate-circuits Any update made to the circuits, i.e. commitments reflect a change labels Jul 14, 2026
- Update Cargo.lock openvm entries to d193688d
- Adapt save_stdin_as_json to new Vec<u8> StdIn buffer
- Cache SdkCachedProvingKey instead of AggProvingKey for new SDK builder
- Use circuit-specific app_config in tester_execute
- Regenerate guest assets and commitments
@github-actions github-actions Bot added the crate-verifier Updates to the verifier crate label Jul 16, 2026
lispc added 6 commits July 17, 2026 14:55
- Bump openvm (and stark-backend/sdk) to branch develop-v2.1.0 latest.
- Bump snark-verifier-sdk to branch develop-v2.1.0 to avoid duplicate
  snark-verifier / halo2-base / halo2-ecc versions in Cargo.lock.
- Rebuild guest assets and refresh commitment files.
- Verified: cargo check, test-single-chunk, test-e2e-bundle all pass.
- Rebuild chunk/batch/bundle guest assets against openvm fc1a0001
  (previous assets were stale: 'Executor not found for opcode 544'),
  refreshing exe commitment files.
- Dockerfile: install nightly-2026-01-18 host toolchain and cargo-openvm
  (pinned rev fc1a0001) with the openvm-1.94.1 RV64 guest toolchain;
  symlink cargo into the custom toolchain (rustup >= 1.29 no longer
  falls back to the default toolchain's cargo for linked toolchains).
- Makefile/AGENTS.md: default OPENVM_RUST_TOOLCHAIN openvm-1.94.0 ->
  openvm-1.94.1 (what cargo-openvm currently installs).
Pin openvm/stark-backend to develop-v2.1.0 commit b3c95cd0. The true latest
(a935d8b3d) is not usable yet: its new "sparse initial memory snapshot and GPU
Merkle build" asserts on DEFERRAL_AS being touched with num_cells=0 during the
bundle root/SNARK stage, because the SDK's compute_root_proof_heights builds a
deferral=None root config whose apply_optimizations zeroes DEFERRAL_AS. b3c95cd0
is the newest commit that passes the full GPU suite.

Changes needed for this range of develop-v2.1.0:

- Add patches/openvm-mem override (via [patch] on the openvm git source).
  Upstream openvm-mem copy_forward/copy_backward use 64-byte aggregate copies
  (load::<64>/store::<64>) that LLVM lowers back into memmove calls, making
  memmove recurse until the guest stack wraps ("upper 4 bytes must be zero").
  The override does block copies with 8x u64 loads-then-stores.
- Upstream restored byte-sized user public values (1 byte per cell). Update
  verify_proof, pi_hash_to_public_values, and aggregated_pi_hashes in
  batch/bundle circuits to match, and drop the now-obsolete
  patch_verifier_for_u16_public_values workaround.
- setup.rs: VmExe gained cfg_block_starts; default it in the old-format
  fallback path.
- Rebuild guest assets, commitments, and EVM verifier.

Verified on GPU: test-execute-chunk, test-single-chunk, test-e2e-bundle all pass.
Includes upstream fix 46709d24 (#3118) for the DEFERRAL_AS root-keygen
leaf-count assert that blocked test-e2e-bundle, plus #3112 sparse memory
snapshot and #3109 field-independent instructions (VmExe/Program/
Instruction are now non-generic; app.vmexe format changed).

- adapt host code to non-generic VmExe; drop legacy exe format shim
- rebuild all guest assets and the EVM verifier
- mount host SRS params in build-guest.sh for local verifier generation
- update AGENTS.md (fix landed upstream; openvm-mem patch still needed)

Verified: GPU=1 make test-single-chunk / test-e2e-batch / test-e2e-bundle
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

crate-batch-circuit Updates to the guest program batch-circuit crate-build-guest Updates to building of guest programs crate-bundle-circuit Updates to the guest grogram bundle-circuit crate-chunk-circuit Updates to the guest program chunk-circuit crate-circuits Any update made to the circuits, i.e. commitments reflect a change crate-integration Updates to the integration crate crate-prover Updates to the prover crate crate-verifier Updates to the verifier crate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant