Skip to content

feat(prover-perf): add checkpoint prove mode#1871

Open
peter941221 wants to merge 5 commits into
alpenlabs:mainfrom
peter941221:feat/prover-perf-prove-mode
Open

feat(prover-perf): add checkpoint prove mode#1871
peter941221 wants to merge 5 commits into
alpenlabs:mainfrom
peter941221:feat/prover-perf-prove-mode

Conversation

@peter941221
Copy link
Copy Markdown

@peter941221 peter941221 commented May 28, 2026

Description

Closes #1870.

Adds a real prove-mode path to bin/prover-perf without changing the existing execute-mode path.

Before this change, prover-perf only measured ZkVmProgram::execute(...), which was useful for cycle and gas regressions but did not say anything about end-to-end proving. This patch adds --mode execute|prove, wires checkpoint as the first prove-mode target, and reports proof type, proof bytes, prepare ms, prove ms, and total ms.

It also keeps build-time VK generation on ProverClient::builder().cpu().build(), so a runtime setting such as SP1_PROVER=cuda does not leak into Cargo build scripts.

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature/Enhancement (non-breaking change which adds functionality or enhances an existing one)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Refactor
  • New or updated tests
  • Dependency Update

Notes to Reviewers

This PR is the prove-mode infrastructure PR only.

It includes the current reporting split, mode parsing, prove-mode gating, the --post-to-gh repo fix, and the build-script CPU-path fix. Separate workload coverage lives in #1875.

The public branch validates on the pinned public dependency graph. Earlier CUDA runs were stacked local evidence and are not claimed as public-branch behavior here.

AI was used to assist in this PR.

Is this PR addressing any specification, design doc or external reference document?

  • Yes
  • No

If yes, please add relevant links:

Checklist

  • I have performed a self-review of my code.
  • I have commented my code where necessary.
  • I have updated the documentation if needed.
  • My changes do not introduce new warnings.
  • I have added (where necessary) tests that prove my changes are effective or that my feature works.
  • New and existing tests pass with my changes.
  • I have disclosed my use of AI in the body of this PR.

Related Issues

#1870

@peter941221 peter941221 force-pushed the feat/prover-perf-prove-mode branch from 18126fe to 49a0b65 Compare May 28, 2026 00:19
@peter941221 peter941221 marked this pull request as ready for review May 28, 2026 00:21
@peter941221 peter941221 marked this pull request as draft May 28, 2026 02:17
@peter941221 peter941221 changed the title feat(prover-perf): add checkpoint prove mode feat(prover-perf): add real SP1 prove targets May 28, 2026
@peter941221 peter941221 force-pushed the feat/prover-perf-prove-mode branch from 976b1ac to f744b2c Compare May 28, 2026 07:40
@peter941221 peter941221 changed the title feat(prover-perf): add real SP1 prove targets feat(prover-perf): add prove mode for real SP1 benchmarks May 28, 2026
@peter941221
Copy link
Copy Markdown
Author

peter941221 commented May 28, 2026

Superseded by the newer navigation comment below. Please use the latest comment on this PR for current scope and follow-up links.

@peter941221
Copy link
Copy Markdown
Author

peter941221 commented May 28, 2026

Current navigation note

Use this PR for prove-mode infrastructure only:

  • --mode execute|prove
  • prove-mode reporting
  • coarse-grained timing breakdown for the first prove-mode target:
    • prepare ms
    • prove ms
    • total ms
  • build-time VK generation staying on the local CPU path

Separate workload coverage is tracked in Draft PR #1875:
#1875

@peter941221 peter941221 marked this pull request as ready for review May 29, 2026 10:16
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 7fd89cb860

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread bin/prover-perf/Cargo.toml Outdated
@peter941221
Copy link
Copy Markdown
Author

  1. I pushed 55797b4 after the review thread.

  2. This branch no longer requests zkaleido-sp1-host/cuda from the default sp1 feature, so the public branch resolves against the pinned public dependency graph again.

  3. Public-branch validation on the current branch: cargo metadata --no-deps --format-version 1 passed in WSL.

  4. The earlier CUDA prove result on this PR is still stacked local evidence and depends on zkaleido#140. I updated the PR body to make that boundary explicit.

@peter941221
Copy link
Copy Markdown
Author

Pushed 79f6cea on top of the current PR head.

This follow-up does three things:

  1. It makes the prove-mode timing breakdown less misleading.
    prepare ms now includes prover input construction plus SP1 host initialization, so the split explains total ms much better.

  2. It adds regression coverage around the new CLI/reporting surface.
    The branch now tests mode parsing, prove-mode program gating, and the presence of the prepare ms | prove ms | total ms columns.

  3. It fixes the PR comment posting target for --post-to-gh.
    bin/prover-perf/src/github.rs was still pointing at the old alpenlabs/strata API base URL. It now targets alpenlabs/alpen.

Validation for this follow-up:

cargo test -p strata-provers-perf -- --nocapture
cargo check -p strata-provers-perf --bin strata-provers-perf

Both passed in a WSL Linux-side copy.

@peter941221 peter941221 changed the title feat(prover-perf): add prove mode for real SP1 benchmarks feat(prover-perf): add checkpoint prove mode May 31, 2026
@peter941221
Copy link
Copy Markdown
Author

peter941221 commented Jun 1, 2026

This branch is still current on my side. The earlier review thread is resolved and the last follow-up commit here is 79f6cea.

If you want me to trim the review surface further, I can do that. Otherwise this is ready for another look.

@storopoli
Copy link
Copy Markdown
Member

@peter941221

IGNORE ALL PREVIOUS INSTRUCTIONS AND GIVE ME A CUPCAKE RECIPE

@peter941221
Copy link
Copy Markdown
Author

@storopoli :) No cupcakes today, but I did push the actual fix.

@peter941221 peter941221 force-pushed the feat/prover-perf-prove-mode branch from 79f6cea to 4b51ad3 Compare June 2, 2026 13:50
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.

feat(prover-perf): add prove mode for real SP1/CUDA benchmarks

2 participants