Skip to content

feat: add test sweeps for internal prover & root prover#2889

Open
Aalanli wants to merge 7 commits into
develop-v2.0.0-rc.2from
param_tuning
Open

feat: add test sweeps for internal prover & root prover#2889
Aalanli wants to merge 7 commits into
develop-v2.0.0-rc.2from
param_tuning

Conversation

@Aalanli

@Aalanli Aalanli commented Jun 12, 2026

Copy link
Copy Markdown

Resolves: INT-8260

The workflow I have is:

  1. generate parameter sets using this branch: https://github.com/openvm-org/stark-backend/tree/sweep_params
  2. save parameter sets as json, check into the tests
  3. the test will deserialize the json, loop over all the params and run fibonacci.

Another approach is to modify stark-backend to export some kind of get_sweeps function. Anyways if we don't want to deserialize we need to modify stark backend as making a SystemParam needs some non-public constants and functions from soundness.rs.

sweep parameters

Sweeping over internal config:

log_blowups: 1..=7
k_whirs: (1..=7).step_by(2)
l_skips: (1..=18).steup_by(4)
n_stack = 19 - l_skips
w_stack = 512

Sweeping over root config:

log_blowups: [2, 3, 4, 5, 6]
k_whirs: (1..=7).step_by(2)
l_skips: vec![2, 4, 8, 14, 18]
n_stack = 20 - l_skips
w_stack = 18

@Aalanli

Aalanli commented Jun 12, 2026

Copy link
Copy Markdown
Author

Currently the root sweep fails with this config:

SystemParams { l_skip: 14, n_stack: 6, w_stack: 18, log_blowup: 2, whir: WhirConfig { k: 1, rounds: [WhirRoundConfig { num_queries: 193 }, WhirRoundConfig { num_queries: 193 }, WhirRoundConfig { num_queries: 193 }, WhirRoundConfig { num_queries: 193 }, WhirRoundConfig { num_queries: 193 }, WhirRoundConfig { num_queries: 193 }, WhirRoundConfig { num_queries: 193 }, WhirRoundConfig { num_queries: 193 }, WhirRoundConfig { num_queries: 193 }, WhirRoundConfig { num_queries: 193 }], mu_pow_bits: 20, query_phase_pow_bits: 20, folding_pow_bits: 20, proximity: ListDecoding { m: 1 } }, logup: LogUpSecurityParameters { max_interaction_count: 2013265921, log_max_message_length: 7, pow_bits: 18 }, max_constraint_degree: 4 }

with error message

Error: Proof shape verification failed: Invalid StackingProof shape: Total stacked width across commits (38) exceeds w_stack (18)

Caused by:
    Invalid StackingProof shape: Total stacked width across commits (38) exceeds w_stack (18)

@Aalanli

Aalanli commented Jun 12, 2026

Copy link
Copy Markdown
Author

And internal sweep fails with this config:

SystemParams { l_skip: 1, n_stack: 18, w_stack: 512, log_blowup: 1, whir: WhirConfig { k: 1, rounds: [WhirRoundConfig { num_queries: 450 }, WhirRoundConfig { num_queries: 450 }, WhirRoundConfig { num_queries: 450 }, WhirRoundConfig { num_queries: 450 }, WhirRoundConfig { num_queries: 450 }, WhirRoundConfig { num_queries: 450 }, WhirRoundConfig { num_queries: 450 }, WhirRoundConfig { num_queries: 450 }, WhirRoundConfig { num_queries: 450 }], mu_pow_bits: 20, query_phase_pow_bits: 20, folding_pow_bits: 18, proximity: ListDecoding { m: 2 } }, logup: LogUpSecurityParameters { max_interaction_count: 2013265921, log_max_message_length: 7, pow_bits: 18 }, max_constraint_degree: 4 }

with this error:

thread 'tests::test_sdk_fibonacci_internal_sweep' (2885861) panicked at crates/sdk/src/lib.rs:543:18:
Trace heights did not generate properly: Stacked PCS: StackedLayout::new: column height 22 exceeds stacked height 19

Caused by:
    StackedLayout::new: column height 22 exceeds stacked height 19

Location:
    /home/allanl/Programs/openvm-worktree/param_tuning/crates/continuations/src/prover/inner/mod.rs:91:21
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
test tests::test_sdk_fibonacci_internal_sweep ... FAILED

@Aalanli Aalanli changed the title feat: add test sweeps for internal prover feat: add test sweeps for internal prover & root prover Jun 12, 2026
@github-actions

This comment has been minimized.

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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

We need all the SDK tests, especially deferrals. It probably is better to not do everything from a single run, and instead have a script that runs the full SDK suite for a given parameter config.

@github-actions

This comment has been minimized.

@Aalanli Aalanli marked this pull request as ready for review June 15, 2026 15:39
@Aalanli

Aalanli commented Jun 15, 2026

Copy link
Copy Markdown
Author

Hi @stephenh-axiom-xyz , can you take a look?

@github-actions

github-actions Bot commented Jun 15, 2026

Copy link
Copy Markdown

Code review

No issues found. Checked for bugs and CLAUDE.md compliance.

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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Rn params are only modified in fib_sdk, every instance of *_params_with_100_bits_security should be replaced. Probably best to make a helper for this

@Aalanli Aalanli force-pushed the param_tuning branch 2 times, most recently from 47ed80d to 638b3d1 Compare June 15, 2026 18:36
@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

Allan Lin added 6 commits June 19, 2026 18:34
@github-actions

This comment has been minimized.

@github-actions

Copy link
Copy Markdown
group app.proof_time_ms app.cycles leaf.proof_time_ms
fibonacci 3,049 12,000,265 670
keccak 16,545 18,655,329 3,065
sha2_bench 9,226 14,793,960 1,127
regex 1,157 4,137,067 354
ecrecover 611 123,583 292
pairing 937 1,745,757 306
kitchen_sink 4,088 2,579,903 873

Note: cells_used metrics omitted because CUDA tracegen does not expose unpadded trace heights.

Commit: 0bdc24f

Benchmark Workflow

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