Skip to content

fix(v2-beta): get cargo-openvm compiling#2588

Merged
shuklaayush merged 1 commit intodevelop-v2.0.0-betafrom
fix/get-cli-compiling
Mar 19, 2026
Merged

fix(v2-beta): get cargo-openvm compiling#2588
shuklaayush merged 1 commit intodevelop-v2.0.0-betafrom
fix/get-cli-compiling

Conversation

@shuklaayush
Copy link
Collaborator

@shuklaayush shuklaayush commented Mar 19, 2026

- we need cargo-openvm from develop-v2.0.0-rc.1 to run the reth benchmark for this branch since it adds new opcodes

resolves int-6949

@github-actions

This comment was marked as outdated.

@shuklaayush shuklaayush force-pushed the fix/get-cli-compiling branch from dcd79e1 to bf1f975 Compare March 19, 2026 10:50
@github-actions

This comment was marked as outdated.

@github-actions

This comment was marked as outdated.

@github-actions

This comment was marked as outdated.

@shuklaayush shuklaayush force-pushed the fix/get-cli-compiling branch from d721a88 to 4900aee Compare March 19, 2026 13:24
@github-actions

This comment was marked as outdated.

@shuklaayush shuklaayush marked this pull request as ready for review March 19, 2026 13:43
@github-actions

This comment was marked as outdated.

@shuklaayush shuklaayush changed the title fix(v2-rc1): get cargo-openvm compiling fix(v2-rc1): get cargo-openvm compiling Mar 19, 2026
Copy link
Contributor

@jonathanpwang jonathanpwang left a comment

Choose a reason for hiding this comment

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

the CLI changes might be relevant to -beta.0 as well; can you make those changes directly to -beta.0 to avoid future rebase pain?

@shuklaayush shuklaayush force-pushed the fix/get-cli-compiling branch from 4900aee to a101d6b Compare March 19, 2026 16:36
@github-actions

This comment was marked as outdated.

@shuklaayush shuklaayush force-pushed the fix/get-cli-compiling branch from a101d6b to 2d8d54f Compare March 19, 2026 16:48
@shuklaayush shuklaayush changed the base branch from develop-v2.0.0-rc.1 to develop-v2.0.0-beta March 19, 2026 16:49
@shuklaayush shuklaayush changed the title fix(v2-rc1): get cargo-openvm compiling fix(v2-beta): get cargo-openvm compiling Mar 19, 2026
@shuklaayush shuklaayush force-pushed the fix/get-cli-compiling branch from 2d8d54f to 05d85c1 Compare March 19, 2026 17:05
@github-actions
Copy link

github-actions bot commented Mar 19, 2026

Claude finished @shuklaayush's task in 2m 9s —— View job


Code Review: fix(v2-beta): get cargo-openvm compiling

  • Gather context and read changed files
  • Review changes against base branch
  • Post review feedback

Overall this PR correctly updates cargo-openvm to compile against the new SDK v2 APIs. The AppConfig simplification, Sdk::new signature updates, type renames (VersionedVmStarkProofVersionedNonRootStarkProof), serialization function renames, and import relocations are all consistent.


Issues

1. default_system_params passes MAX_APP_LOG_STACKED_HEIGHT as l_skip — acknowledged slop

crates/sdk/src/config.rs:23 and crates/cli/src/default.rs:44 both call:

app_params_with_100_bits_security(MAX_APP_LOG_STACKED_HEIGHT)

As @jonathanpwang flagged, the argument to app_params_with_100_bits_security is l_skip, not log_stacked_height. The SDK tests use DEFAULT_APP_L_SKIP + n_stack which is semantically correct. This was acknowledged as slop — should be fixed before merge or tracked with a ticket.

Fix this →

2. Dead code in prove.rs Stark path — _agg_pk_path, default_agg_stark_pk_path import

prove.rs:198-200 computes _agg_pk_path which is immediately discarded. The default_agg_stark_pk_path import at line 25 only serves this dead path. The agg_pk field on ProveSubCommand::Stark (line 88) is destructured but the value is only used for this dead computation. These will produce compiler warnings.

Suggestion: either remove agg_pk from the struct entirely, or at minimum remove the _agg_pk_path computation and the default_agg_stark_pk_path import. If keeping the CLI flag for backward compat, use _agg_pk in the destructure at line 188.

Fix this →

3. EVM prove path reads keys then discards them (prove.rs:242-244)

let (_agg_pk, _halo2_pk) = read_default_agg_and_halo2_pk().map_err(|e| { ... })?;

The keys are loaded from disk but never used — they were previously passed to with_agg_pk() / with_halo2_pk(). This forces users to have run setup even though the keys aren't actually needed. If this is intentional as a pre-flight check (fail early with a clear message), the TODO comment covers it. If not, remove it to also eliminate the read_default_agg_and_halo2_pk import (lines 21-22).

4. setup.rs not updated — gated behind evm-verify (not a current blocker)

setup.rs calls Sdk::standard() (no args), sdk.agg_keygen(), sdk.set_agg_pk(), sdk.generate_root_verifier_asm() — all of which have changed or been removed in the SDK. Since setup.rs is gated behind #[cfg(feature = "evm-verify")] (see commands/mod.rs:19-22) and that feature is disabled in defaults with a clear TODO at Cargo.toml:45, this won't block default compilation. But it will block restoring evm-verify later. Worth tracking with an issue.


Nits

5. commit.rs:95 — serialized format changed

Previously app_commit() returned a struct with app_exe_commit and app_vm_commit. Now only app_exe_commit is serialized. If downstream tooling (e.g., verify stark --app-commit) reads this JSON and expects the old two-field format, it will break. The verify.rs:201 line reads expected_app_commit from JSON — verify the types are compatible end-to-end.

6. Hardcoded AggregationSystemParams::default() in every Sdk::new call

Every call site passes AggregationSystemParams::default(). Fine for now, but a helper or reading from the config TOML would reduce repetition and make customization easier.

7. verify.rs:170 — discarded _exe_commit

The verify_app_proof return value is silently dropped. Printing the exe commit (similar to how the prove command does) could be a useful UX improvement.


What looks good

  • AppConfig simplification — replacing app_fri_params + leaf_fri_params + compiler_options with system_params: SystemParams is clean
  • #[serde(default = "default_system_params")] in config.rs:29 — good backward-compat for existing TOML configs that don't have system_params
  • Verify command — correctly destructures AppVerifyingKey to pass vk and memory_dimensions separately, adds the engine type parameter
  • Type/function renames applied consistently throughout
  • SdkVmConfig and TranspilerConfig correctly sourced from openvm_sdk_config
  • Commit commandapp_exe_commit() with good TODO about restoring vm_commit
  • Pinned AWS SDK versions with MSRV TODO — pragmatic


aws-sdk-s3 = "1.119.0"
aws-config = "1.8.12"
# TODO: update requires MSRV update (currently pinned for rustc 1.90.0 compat)
Copy link
Contributor

Choose a reason for hiding this comment

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

hm we should probably update MSRV

Copy link
Contributor

@stephenh-axiom-xyz stephenh-axiom-xyz left a comment

Choose a reason for hiding this comment

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

LGTM, but please create tickets for the TODOs. You can assign SDK-related ones to me

@shuklaayush shuklaayush merged commit 717654b into develop-v2.0.0-beta Mar 19, 2026
13 of 14 checks passed
@shuklaayush shuklaayush deleted the fix/get-cli-compiling branch March 19, 2026 17:57
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.

3 participants