Skip to content

chore: openvm 1.6#1783

Merged
lispc merged 52 commits into
developfrom
feat/zkvm_prover_143
May 25, 2026
Merged

chore: openvm 1.6#1783
lispc merged 52 commits into
developfrom
feat/zkvm_prover_143

Conversation

@noel2004
Copy link
Copy Markdown
Member

@noel2004 noel2004 commented Jan 16, 2026

This PR purpose a stable version for prover after GalileoV2 forking.
This PR would replace #1774

Current status:

  • depending on zkvm-prover with openvm 1.4.3 and security patches
  • drop the compatibility for guest built from openvm-1.3, performance gain from ~0.2MHz -> 0.7MHz (proving speed)
  • exit process while proving process panic to avoid a not-working prover lingers
  • add dump mode to dump a dep-free format for testing in bare openvm prover
  • 02/03/26: include urgent fixing for bn254 vulnerability and metered execution
  • support validium update (feat: adjustments for launching Cloak with GalileoV2 #1793)
  • upgrading scroll-proving-sdk for better supporting of local storage, retry policy and axiom prover

Summary by CodeRabbit

  • New Features

    • Add a "dump" command to export proving tasks (JSON or binary) and a CLI TaskType selector.
    • Task-dumper tool and local-only dump workflow.
    • Debug mode to prefer local asset files.
  • Bug Fixes

    • Removed legacy witness encoding support.
  • Chores

    • Workspace bumped to 4.7.12 and several dependencies updated.
    • Increased prover segment length.
    • Test/config updates and new/removed network genesis/env files.
    • Broadened .gitignore and default RUST_LOG Makefile setting.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Jan 16, 2026

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

This PR bumps the workspace version and pinned zkvm dependencies, removes legacy witness encoding paths, reorganizes imports to nested scroll:: modules, adds a Dumper component and CLI Dump command, adjusts UniversalHandler/prover config, and updates multiple e2e test environments and configs.

Changes

Cohort / File(s) Summary
Workspace & deps
Cargo.toml, crates/prover-bin/Cargo.toml
Workspace version bumped; scroll-zkvm-* dependencies pinned to specific git revs; scroll-proving-sdk rev updated; reqwest/http versions adjusted; added bincode 2.0.
Legacy witness removal
crates/libzkp/src/lib.rs, crates/libzkp/src/tasks/...
Removed legacy witness mode function and legacy_witness_encoding field; eliminated legacy serialization branches; unified serialization via encode_task_to_witness().
Import & API adjustments
crates/libzkp/src/proofs.rs, crates/libzkp/src/tasks/...
Reworked imports to nested scroll::{...} paths; removed Legacy*Witness imports; replaced pi_hash_euclidv1() calls with pi_hash_by_version(Version::euclid_v1()).
Dumper + CLI
crates/prover-bin/src/dumper.rs, crates/prover-bin/src/main.rs
Added Dumper (dump tasks to JSON/bin), new Dump CLI subcommand and TaskType enum, wired Dumper into prover builder, changed Tokio flavor and version lookup.
Prover / circuits handler
crates/prover-bin/src/prover.rs, crates/prover-bin/src/zk_circuits_handler/universal.rs
Removed is_openvm_v13 param from UniversalHandler::new, increased segment_len, added debug_mode to asset location handling, and adjusted panic/error handling.
E2E test envs & configs
tests/prover-e2e/mainnet-galileo/..., tests/prover-e2e/cloak-galileoV2/..., tests/prover-e2e/...
Added/updated Galileo and GalileoV2 test environments and genesis/configs, updated SCROLL_ZKVM_VERSION variables, removed some feynman/xen env files and migration inserts.
Build / tooling / ignores
.gitignore, zkvm-prover/Makefile, zkvm-prover/.work/.gitignore, tests/prover-e2e/Makefile
Broadened zkvm-prover JSON ignore, added RUST_LOG default in Makefile, ignored *.elf/*.hex, and forwarded SCROLL_ZKVM_VERSION in prover-e2e coordinator setup.
Integration test tweak
rollup/tests/integration_tool/imports.go
Encapsulated computation of l1MsgPoppedBefore into local function and short-circuited when zero; minor control-flow refactor for readability.

Sequence Diagram(s)

sequenceDiagram
  participant CLI
  participant ProverBuilder
  participant Dumper
  participant FS
  CLI->>ProverBuilder: invoke Dump (task_id, task_type, json_mode)
  ProverBuilder->>Dumper: construct Dumper(json_mode, target_path)
  Dumper->>FS: write input_task.json (if json_mode)
  Dumper->>FS: write input_task.bin / agg_proofs.bin (if binary)
  Dumper-->>ProverBuilder: return ProveResponse (failed with message)
  ProverBuilder-->>CLI: exit (dump completed)
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Suggested labels

bump-version

Suggested reviewers

  • Thegaram
  • lispc

Poem

🐰 I hopped a version, light and spry,
Legacy paths waved me bye-bye.
I dump the tasks to files with glee,
Galileo forks now roam free. ✨

🚥 Pre-merge checks | ❌ 3

❌ Failed checks (2 warnings, 1 inconclusive)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 19.05% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Title check ⚠️ Warning The title "chore: openvm 1.6" is vague and does not accurately match the PR content, which involves upgrading to OpenVM 1.4.3 (not 1.6) along with removing legacy witness support, adding dump mode, and other significant changes. Use a more specific and accurate title that reflects the main changes, such as "chore: upgrade to openvm 1.4.3 and remove legacy witness support" or "chore: openvm 1.4.3 with prover improvements and dump mode".
Description check ❓ Inconclusive The PR description comprehensively covers the purpose, rationale, and implementation details across multiple objectives; however, it does not follow the required conventional commits format specified in the template (missing type prefix like 'perf:', 'feat:', etc.) and lacks PR title format validation against the template checklist. Update the PR description to follow conventional commits format by prefixing the title with an appropriate type (e.g., 'perf: Optimization for prover') and complete the template checklist items for deployment tag versioning and breaking change labels.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/zkvm_prover_143

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 5

🤖 Fix all issues with AI agents
In `@Cargo.toml`:
- Around line 17-23: Update the inline comment that currently reads "with openvm
1.4.2" to "with openvm 1.4.3" in the Cargo.toml workspace.dependencies block so
the comment matches the actual OpenVM version recorded in Cargo.lock; locate the
comment near the scroll-zkvm-prover/scroll-zkvm-verifier/scroll-zkvm-types
entries and change only the version number in that comment.

In `@crates/prover-bin/src/dumper.rs`:
- Around line 13-16: The Dumper struct's target_path is currently ignored by
dump(); update the Dumper::dump (and any related methods around lines 24-39) to
use the Dumper.target_path when creating/writing the output file: convert
target_path to a Path/PathBuf, ensure the parent directory exists
(create_dir_all if needed), join the intended filename to that path instead of
using the current working directory, and open/create the file at that joined
path for writing; also preserve existing json_mode logic and error handling when
writing to the computed target path.

In `@crates/prover-bin/src/main.rs`:
- Around line 60-61: Change the clap argument for the json flag to use
flag-style parsing by replacing the current default_value usage with action =
ArgAction::SetTrue for the json_mode field; locate the json_mode field
declaration in main.rs (the #[arg(long = "json", default_value = "false")]
json_mode: bool,) and update it to use #[arg(long = "json", action =
ArgAction::SetTrue)] json_mode: bool, and ensure ArgAction is in scope (same
pattern used by the version flag in this file).
- Around line 95-108: The Dump command currently calls
ProverBuilder::new(...).build().await and then ignores the boolean/result of
Arc::new(prover).one_shot(&[task_id], task_type.into()).await; modify the Dump
command path to check the returned Result/bool from one_shot (same as the Handle
path does), and if it indicates failure return or propagate an error to the CLI
(e.g., map_err/eyre::eyre! or bail). Locate the call site for one_shot in
main.rs and ensure you mirror the Handle flow: inspect the awaited value,
convert it to a useful error on failure, and propagate it up instead of
discarding it.

In `@tests/prover-e2e/mainnet-galileo/genesis.json`:
- Around line 23-25: The fork-time keys use inconsistent casing: change the
object keys "GalileoTime" and "GalileoV2Time" to lowerCamelCase "galileoTime"
and "galileoV2Time" so they match the rest of the fork-time fields (e.g.,
"feynmanTime", "darwinTime") and the JSON unmarshal expectation; update the keys
in the genesis JSON where "GalileoTime" and "GalileoV2Time" appear (replace with
"galileoTime" and "galileoV2Time") to restore correct fork activation parsing.
🧹 Nitpick comments (2)
tests/prover-e2e/mainnet-galileo/config.json (1)

8-11: Make the RPC endpoint configurable to improve E2E stability.

The hardcoded https://mainnet-rpc.scroll.io endpoint lacks override mechanisms (no env vars, no CLI flags, no template substitution). E2E tests become brittle against rate limits and service outages. Consider adding environment variable support or command-line override for fetch_config.endpoint so tests can point to controlled or local RPC nodes during CI and local development.

crates/prover-bin/src/prover.rs (1)

33-35: Debug-mode skip is OK; consider clearer operator signal.

Default false keeps compatibility, but in debug mode stale/corrupt local files may be used. Consider logging the full local path (or a warning) to make this obvious in logs.

Also applies to: 85-91

📜 Review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between efca370 and 6a57a2e.

⛔ Files ignored due to path filters (1)
  • Cargo.lock is excluded by !**/*.lock
📒 Files selected for processing (18)
  • Cargo.toml
  • crates/libzkp/src/lib.rs
  • crates/libzkp/src/proofs.rs
  • crates/libzkp/src/tasks/batch.rs
  • crates/libzkp/src/tasks/bundle.rs
  • crates/libzkp/src/tasks/chunk.rs
  • crates/prover-bin/Cargo.toml
  • crates/prover-bin/src/dumper.rs
  • crates/prover-bin/src/main.rs
  • crates/prover-bin/src/prover.rs
  • crates/prover-bin/src/zk_circuits_handler/universal.rs
  • tests/prover-e2e/mainnet-galileo/.make.env
  • tests/prover-e2e/mainnet-galileo/config.json
  • tests/prover-e2e/mainnet-galileo/config.template.json
  • tests/prover-e2e/mainnet-galileo/genesis.json
  • tests/prover-e2e/sepolia-feynman/.make.env
  • tests/prover-e2e/sepolia-feynman/00100_import_blocks.sql
  • tests/prover-e2e/sepolia-feynman/genesis.json
💤 Files with no reviewable changes (3)
  • tests/prover-e2e/sepolia-feynman/.make.env
  • tests/prover-e2e/sepolia-feynman/00100_import_blocks.sql
  • tests/prover-e2e/sepolia-feynman/genesis.json
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2025-09-16T02:09:51.657Z
Learnt from: noel2004
Repo: scroll-tech/scroll PR: 1736
File: crates/libzkp/src/verifier/universal.rs:35-45
Timestamp: 2025-09-16T02:09:51.657Z
Learning: The verify_stark_proof method in scroll-zkvm-verifier returns Result<(), Error> indicating success/failure, not Result<bool, Error>. When it succeeds, verification passed; when it fails, it returns an error.

Applied to files:

  • crates/libzkp/src/tasks/batch.rs
  • crates/libzkp/src/proofs.rs
  • crates/libzkp/src/tasks/bundle.rs
🧬 Code graph analysis (6)
crates/libzkp/src/tasks/batch.rs (1)
crates/libzkp/src/tasks.rs (1)
  • encode_task_to_witness (19-22)
crates/libzkp/src/tasks/chunk.rs (1)
crates/libzkp/src/tasks.rs (1)
  • encode_task_to_witness (19-22)
crates/prover-bin/src/prover.rs (4)
crates/prover-bin/src/types.rs (2)
  • default (62-64)
  • default (105-107)
crates/libzkp/src/lib.rs (1)
  • new (24-40)
crates/prover-bin/src/zk_circuits_handler/universal.rs (1)
  • new (19-31)
crates/libzkp/src/tasks.rs (1)
  • new (53-58)
crates/prover-bin/src/main.rs (1)
common/types/message/message.go (1)
  • ProofType (14-14)
crates/libzkp/src/proofs.rs (4)
coordinator/internal/types/block.go (1)
  • BatchInfo (4-8)
common/types/message/message.go (1)
  • ChunkInfo (131-148)
common/version/version.go (1)
  • Version (31-31)
coordinator/internal/utils/version.go (1)
  • Version (16-42)
crates/libzkp/src/tasks/bundle.rs (1)
crates/libzkp/src/tasks.rs (1)
  • encode_task_to_witness (19-22)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: tests
🔇 Additional comments (19)
crates/libzkp/src/tasks/chunk.rs (2)

4-8: LGTM: updated chunk import path.

Aligns with the new scroll::chunk module layout and keeps types centralized.


117-126: LGTM: unified witness serialization.

Using encode_task_to_witness here keeps serialization consistent across tasks.

crates/libzkp/src/tasks/batch.rs (2)

4-13: LGTM: batch/chunk imports reorganized.

Keeps batch and chunk types under the unified scroll module structure.


119-133: LGTM: consolidated witness encoding path.

Consistent use of encode_task_to_witness improves maintainability.

crates/libzkp/src/tasks/bundle.rs (2)

3-7: LGTM: bundle imports aligned with new module layout.


27-40: LGTM: standardized witness serialization.

crates/libzkp/src/proofs.rs (3)

6-13: Import reorganization looks good.

The migration from flat paths to nested scroll::{...} module paths aligns with the broader codebase refactoring. The types (BatchInfo, BundleInfo, ChunkInfo) are used consistently throughout the file.


216-216: Test import update is consistent.

The test import aligns with the new scroll::bundle::BundleInfo path used in the main imports.


254-254: Versioned API approach is more flexible.

Using pi_hash_by_version(version::Version::euclid_v1()) instead of a specific pi_hash_euclidv1() method is a cleaner pattern that allows the same API to handle multiple protocol versions. This is consistent with the pi_hash_check method on line 181 that takes version::Version as a parameter, and the pattern is used consistently across the codebase (chunk.rs, bundle.rs, batch.rs).

tests/prover-e2e/mainnet-galileo/config.template.json (1)

13-15: LGTM — template now aligned with Galileo fork settings.

Also applies to: 27-27

tests/prover-e2e/mainnet-galileo/.make.env (1)

1-3: Confirm blocks 26653680–26653686 fall within the Galileo fork activation window.

The block range is consumed inclusively (7 blocks total) from the official Scroll mainnet RPC. Verify that these block numbers correspond to the Galileo fork epoch by checking against Scroll's fork activation documentation or querying actual block timestamps; otherwise, the E2E test coverage may be misleading or flaky if blocks predate the fork activation.

crates/prover-bin/Cargo.toml (1)

12-12: Verify dependency pins for scroll-proving-sdk and bincode 2.0.

Please confirm the git rev 22ad34e is the intended commit and that bincode 2.0 with serde is compatible with the new dumper serialization path.

Also applies to: 37-37

crates/prover-bin/src/zk_circuits_handler/universal.rs (1)

19-27: Confirm the segment_len bump aligns with resource budgets.

segment_len increased to (1 << 22) - 100, which can affect memory and throughput. Please confirm this is the intended target for the OpenVM 1.4.x prover configuration and fits downstream limits.

crates/prover-bin/src/prover.rs (2)

214-227: Panic propagation matches the “fail-fast” requirement.

Resuming unwind on task panic will terminate the worker as intended.


294-296: Verify OpenVM 1.3 tasks are intentionally hard-rejected.

use_openvm_13 now causes an immediate bail, and UniversalHandler::new no longer accepts the flag. Please confirm upstream won’t send OpenVM 1.3 tasks and that the error message is sufficient for operators.

Also applies to: 323-323

crates/prover-bin/src/dumper.rs (1)

54-87: Confirm Failed status is the intended dump-mode signal.

prove() and query_task() always return Failed to force exit. Please verify this matches the coordinator’s expectations (no retries/alerts for dump mode).

crates/libzkp/src/lib.rs (1)

24-37: Deprecation handling looks good.

The explicit warnings for legacy_witness and openvm_13 make misconfiguration visible while keeping behavior deterministic.

crates/prover-bin/src/main.rs (2)

1-6: New dumper module wiring looks fine.


36-51: TaskType → ProofType mapping is clear and complete.

✏️ Tip: You can disable this entire section by setting review_details to false in your review settings.

Comment thread Cargo.toml Outdated
Comment thread crates/prover-bin/src/dumper.rs
Comment thread crates/prover-bin/src/main.rs
Comment thread crates/prover-bin/src/main.rs
Comment thread tests/prover-e2e/mainnet-galileo/genesis.json
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

🧹 Nitpick comments (2)
tests/prover-e2e/cloak-galileoV2/config.json (1)

1-15: Minor: Inconsistent JSON indentation.

The db_config block uses 4-space indentation while other blocks use 2-space indentation. Also, there's an extra blank line at line 14.

🧹 Suggested formatting fix
 {
-    "db_config": {
-    "driver_name": "postgres",
-    "dsn": "postgres://dev:dev@localhost:5432/scroll?sslmode=disable",
-    "maxOpenNum": 5,
-    "maxIdleNum": 1
+  "db_config": {
+    "driver_name": "postgres",
+    "dsn": "postgres://dev:dev@localhost:5432/scroll?sslmode=disable",
+    "maxOpenNum": 5,
+    "maxIdleNum": 1
   },
   "fetch_config": {
     "endpoint": "http://cloak-usx-sequencer.mainnet.scroll.tech:8545",
     "l2_message_queue_address": "0x5300000000000000000000000000000000000000"
   },
   "validium_mode": true,
   "codec_version": 10
-
 }
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@tests/prover-e2e/cloak-galileoV2/config.json` around lines 1 - 15, The JSON
file has inconsistent indentation in the "db_config" block (4 spaces) compared
to other blocks (2 spaces) and an extra blank line before the closing brace;
normalize indentation across the file (e.g., convert "db_config" to 2-space
indentation to match "fetch_config", "validium_mode", and "codec_version") and
remove the trailing blank line so the JSON is consistently formatted and the
object ends immediately with the closing brace.
tests/prover-e2e/sepolia-galileoV2/config.template.json (1)

29-29: Keep the template customizable unless this file is intentionally a pinned fixture.

Line 29 now bakes in a public RPC endpoint, which makes consumers of the template depend on Scroll's shared Sepolia node by default. If this file is still meant to be copied and edited, keep the placeholder here and leave the concrete value in config.json.

Based on learnings: In configuration files like rollup/proposer-tool-config.json, placeholders such as <mainnet read db config> are intentionally left as-is to be replaced by users with their own configuration values when deploying the tool.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@tests/prover-e2e/sepolia-galileoV2/config.template.json` at line 29, The
template currently hardcodes the public RPC URL in the JSON key "endpoint"
(value "http://l2geth-rpc-0.sepolia.scroll.tech:8545/"); replace that concrete
URL with a clear placeholder (e.g. "<sepolia_rpc_endpoint>") so the template
remains customizable and leave the real RPC URL only in the concrete config.json
used by CI/deployment.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@tests/prover-e2e/cloak-galileoV2/config.json`:
- Around line 1-15: The JSON file has inconsistent indentation in the
"db_config" block (4 spaces) compared to other blocks (2 spaces) and an extra
blank line before the closing brace; normalize indentation across the file
(e.g., convert "db_config" to 2-space indentation to match "fetch_config",
"validium_mode", and "codec_version") and remove the trailing blank line so the
JSON is consistently formatted and the object ends immediately with the closing
brace.

In `@tests/prover-e2e/sepolia-galileoV2/config.template.json`:
- Line 29: The template currently hardcodes the public RPC URL in the JSON key
"endpoint" (value "http://l2geth-rpc-0.sepolia.scroll.tech:8545/"); replace that
concrete URL with a clear placeholder (e.g. "<sepolia_rpc_endpoint>") so the
template remains customizable and leave the real RPC URL only in the concrete
config.json used by CI/deployment.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 8473a821-8fd2-4525-b120-102069e7167d

📥 Commits

Reviewing files that changed from the base of the PR and between 649c441 and 09d83e1.

📒 Files selected for processing (8)
  • .gitignore
  • tests/prover-e2e/cloak-galileoV2/.make.env
  • tests/prover-e2e/cloak-galileoV2/config.json
  • tests/prover-e2e/cloak-galileoV2/config.template.json
  • tests/prover-e2e/cloak-galileoV2/genesis.json
  • tests/prover-e2e/sepolia-galileoV2/.make.env
  • tests/prover-e2e/sepolia-galileoV2/config.json
  • tests/prover-e2e/sepolia-galileoV2/config.template.json
🚧 Files skipped from review as they are similar to previous changes (1)
  • tests/prover-e2e/cloak-galileoV2/.make.env

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

♻️ Duplicate comments (1)
crates/prover-bin/src/main.rs (1)

106-108: ⚠️ Potential issue | 🟠 Major

Return a non-zero status when dump fails.

Line 106 awaits one_shot and then falls through to Ok(()). Since the Handle path on Lines 122-141 treats the same awaited value as a success/failure signal, a false result from dump currently exits 0 and looks successful to the caller.

#!/bin/bash
set -euo pipefail

# Show how `main.rs` handles the awaited `one_shot` result in Dump vs Handle.
sed -n '104,141p' crates/prover-bin/src/main.rs
💡 Suggested change
-            std::sync::Arc::new(prover)
-                .one_shot(&[task_id], task_type.into())
-                .await;
+            let prover = std::sync::Arc::new(prover);
+            let ok = prover
+                .one_shot(std::slice::from_ref(&task_id), task_type.into())
+                .await;
+            if !ok {
+                eyre::bail!("dump failed for task_id={task_id}");
+            }
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@crates/prover-bin/src/main.rs` around lines 106 - 108, The Dump branch
currently awaits std::sync::Arc::new(prover).one_shot(&[task_id],
task_type.into()).await and then unconditionally returns Ok(()); modify the Dump
handling in main (the match arm that calls one_shot) to inspect the boolean
result from one_shot and return a non-zero exit on failure — e.g., if result is
false call std::process::exit(1) or return Err(...) from main — so failure
mirrors the Handle path's success/failure semantics; locate the call to one_shot
and the surrounding Dump match arm to implement this check and proper non-zero
exit.
🧹 Nitpick comments (1)
crates/prover-bin/src/main.rs (1)

90-109: Build LocalProver lazily for the new dump path.

The branch starting at Line 90 never uses local_prover, but main still constructs it before the match. Moving that initialization into Handle and None keeps the dump path from doing unrelated startup work.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@crates/prover-bin/src/main.rs` around lines 90 - 109, The main creates
LocalProver eagerly which the Dump branch doesn't need; instead make LocalProver
built lazily only in the branches that require it (the Handle variant and the
None/default startup path). Move the existing ProverBuilder::new(...) /
.build().await block (and any creation of local_prover) out of the pre-match
setup and into the Handle match arm and into the None/startup arm, leaving the
Dump arm to only build the dumper prover as shown (so Dump never constructs
LocalProver).
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Duplicate comments:
In `@crates/prover-bin/src/main.rs`:
- Around line 106-108: The Dump branch currently awaits
std::sync::Arc::new(prover).one_shot(&[task_id], task_type.into()).await and
then unconditionally returns Ok(()); modify the Dump handling in main (the match
arm that calls one_shot) to inspect the boolean result from one_shot and return
a non-zero exit on failure — e.g., if result is false call std::process::exit(1)
or return Err(...) from main — so failure mirrors the Handle path's
success/failure semantics; locate the call to one_shot and the surrounding Dump
match arm to implement this check and proper non-zero exit.

---

Nitpick comments:
In `@crates/prover-bin/src/main.rs`:
- Around line 90-109: The main creates LocalProver eagerly which the Dump branch
doesn't need; instead make LocalProver built lazily only in the branches that
require it (the Handle variant and the None/default startup path). Move the
existing ProverBuilder::new(...) / .build().await block (and any creation of
local_prover) out of the pre-match setup and into the Handle match arm and into
the None/startup arm, leaving the Dump arm to only build the dumper prover as
shown (so Dump never constructs LocalProver).

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 7ff2c80c-23b4-407a-969e-80b38e6ad74c

📥 Commits

Reviewing files that changed from the base of the PR and between 09d83e1 and 766aa25.

⛔ Files ignored due to path filters (1)
  • Cargo.lock is excluded by !**/*.lock
📒 Files selected for processing (5)
  • Cargo.toml
  • crates/prover-bin/Cargo.toml
  • crates/prover-bin/src/main.rs
  • zkvm-prover/.work/.gitignore
  • zkvm-prover/Makefile
✅ Files skipped from review due to trivial changes (3)
  • zkvm-prover/.work/.gitignore
  • Cargo.toml
  • zkvm-prover/Makefile
🚧 Files skipped from review as they are similar to previous changes (1)
  • crates/prover-bin/Cargo.toml

@lispc lispc changed the title Optimization for prover (override #1774) chore: openvm 1.6 May 19, 2026
@lispc lispc self-requested a review May 22, 2026 04:40
@lispc lispc merged commit 1904f82 into develop May 25, 2026
18 checks passed
@lispc lispc deleted the feat/zkvm_prover_143 branch May 25, 2026 04:35
@lispc lispc restored the feat/zkvm_prover_143 branch May 25, 2026 04:35
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.

5 participants