Skip to content

Conversation

@noel2004
Copy link
Member

@noel2004 noel2004 commented Nov 25, 2025

This PR purpose a stable version for prover working along with Galileo forking.

Do not merge until it has been proven to be always stable.

Current status:

  • depending on zkvm-prover v0.7.0-rc.4
  • exit process while proving process panic to avoid a not-working prover lingers

Summary by CodeRabbit

  • Chores

    • Updated workspace dependencies to newer pre-release versions and refreshed the proving SDK revision.
  • Bug Fixes

    • Improved handling of critical failures so worker processes now detect panics and exit cleanly, reducing silent failures.
  • Improvements

    • Increased the default segment length used by the prover to improve throughput and handling of larger tasks.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link

coderabbitai bot commented Nov 25, 2025

Walkthrough

Updated workspace dependency pins to pre-release v0.7.0-rc.4 and one git rev; added panic-detection in the prover query_task error path; increased universal handler default segment length.

Changes

Cohort / File(s) Summary
Workspace dependency updates
Cargo.toml
Bumped scroll-zkvm-prover, scroll-zkvm-verifier, and scroll-zkvm-types from v0.7.0 to v0.7.0-rc.4.
Git dependency revision
crates/prover-bin/Cargo.toml
Updated scroll-proving-sdk git rev from 05648db to 22ad34e.
Panic propagation change
crates/prover-bin/src/prover.rs
In query_task error branch, detect panics via e.is_panic() and re-throw with std::panic::resume_unwind(...); non-panic errors remain returned as TaskStatus::Failed.
Config default change
crates/prover-bin/src/zk_circuits_handler/universal.rs
Increased segment_len from (1 << 21) - 100 to (1 << 22) - 100 in UniversalHandler::new.

Sequence Diagram(s)

sequenceDiagram
    participant Worker as Worker loop
    participant Task as query_task
    participant Handler as Prover handler

    Worker->>Task: receive task
    Task->>Handler: execute query
    alt success
        Handler-->>Task: Ok(result)
        Task-->>Worker: TaskStatus::Completed
    else error
        Handler-->>Task: Err(e)
        alt e.is_panic() == true
            Note right of Task `#ffe4b5`: panic detected\nresume_unwind -> aborts worker
            Task->>Worker: resume_unwind(panic) 
            Worker-->>Worker: worker exits
        else not panic
            Task-->>Worker: TaskStatus::Failed("proving task panicked: {e}")
        end
    end
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

  • Areas needing attention:
    • crates/prover-bin/src/prover.rs: ensure panic propagation semantics and any required cleanup or worker lifecycle expectations.
    • crates/prover-bin/src/zk_circuits_handler/universal.rs: confirm impact of increased segment_len on memory and downstream consumers.
    • Cargo manifest pins: verify compatibility with other workspace crates after bump.

Possibly related PRs

Suggested reviewers

  • Thegaram
  • georgehao
  • lispc

Poem

🐰 I hopped through Cargo, pins set just right,

Rc whispers swapped in soft moonlight,
When a panic stirs, I sound the bell — resume!
Segments grew longer to stretch and bloom,
A tiny rabbit cheers the proving room.

Pre-merge checks and finishing touches

❌ Failed checks (2 warnings, 1 inconclusive)
Check name Status Explanation Resolution
Title check ⚠️ Warning The PR title does not follow conventional commits format and is marked '[DO NOT MERGE]', making it unsuitable for production merging and not descriptive of actual changes. Rewrite the title to follow conventional commits (e.g., 'build: upgrade zkvm dependencies to v0.7.0-rc.4 and add panic handling'). Remove '[DO NOT MERGE]' or clarify intent through labels/drafts.
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
Description check ❓ Inconclusive The PR description is incomplete against the template: PR title section is not filled with a conventional commits type, deployment versioning and breaking change checkboxes are unchecked. Complete the template by selecting a conventional commits type (likely 'build' or 'perf'), checking appropriate deployment and breaking change boxes, and clarifying the 'do not merge' intent.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat/prover_4.7

Tip

📝 Customizable high-level summaries are now available in beta!

You can now customize how CodeRabbit generates the high-level summary in your pull requests — including its content, structure, tone, and formatting.

  • Provide your own instructions using the high_level_summary_instructions setting.
  • Format the summary however you like (bullet lists, tables, multi-section layouts, contributor stats, etc.).
  • Use high_level_summary_in_walkthrough to move the summary from the description to the walkthrough section.

Example instruction:

"Divide the high-level summary into five sections:

  1. 📝 Description — Summarize the main change in 50–60 words, explaining what was done.
  2. 📓 References — List relevant issues, discussions, documentation, or related PRs.
  3. 📦 Dependencies & Requirements — Mention any new/updated dependencies, environment variable changes, or configuration updates.
  4. 📊 Contributor Summary — Include a Markdown table showing contributions:
    | Contributor | Lines Added | Lines Removed | Files Changed |
  5. ✔️ Additional Notes — Add any extra reviewer context.
    Keep each section concise (under 200 words) and use bullet or numbered lists for clarity."

Note: This feature is currently in beta for Pro-tier users, and pricing will be announced later.


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

@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: 1

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 9dceae1 and 9839bf7.

⛔ Files ignored due to path filters (1)
  • Cargo.lock is excluded by !**/*.lock
📒 Files selected for processing (3)
  • Cargo.toml (1 hunks)
  • crates/prover-bin/Cargo.toml (1 hunks)
  • crates/prover-bin/src/prover.rs (1 hunks)
⏰ 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 (2)
Cargo.toml (1)

20-22: Dependency updates to pre-release v0.7.0-rc.4 are consistent and valid.

The three zkvm workspace dependencies are updated consistently to the same tag, which has been verified to exist in the scroll-tech/zkvm-prover repository. All references are syntactically correct and properly formatted.

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

12-12: Commit hash verified and properly pinned.

The commit 22ad34e exists and is correctly referenced. Since no tag exists for this commit, using the commit hash is the appropriate approach for deterministic builds.

Comment on lines +205 to +218
Err(e) => {
if e.is_panic() {
// simply re-throw panic for any panicking in proving prrocess,
// cause worker loop and the whole prover exit
std::panic::resume_unwind(e.into_panic());
}

QueryTaskResponse {
task_id: req.task_id,
status: TaskStatus::Failed,
error: Some(format!("proving task panicked: {}", e)),
..Default::default()
}
}
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Incorrect error message for non-panic JoinError.

The else branch (lines 212-217) handles non-panic JoinErrors (e.g., task cancellation), but the error message incorrectly states "proving task panicked". This branch is only reached when e.is_panic() is false.

Also, minor typo on line 207: "prrocess" → "process".

                     Err(e) => {
                         if e.is_panic() {
-                            // simply re-throw panic for any panicking in proving prrocess,
+                            // simply re-throw panic for any panicking in proving process,
                             // cause worker loop and the whole prover exit
                             std::panic::resume_unwind(e.into_panic());
                         }

                         QueryTaskResponse {
                             task_id: req.task_id,
                             status: TaskStatus::Failed,
-                            error: Some(format!("proving task panicked: {}", e)),
+                            error: Some(format!("proving task failed: {}", e)),
                             ..Default::default()
                         }
                     }
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
Err(e) => {
if e.is_panic() {
// simply re-throw panic for any panicking in proving prrocess,
// cause worker loop and the whole prover exit
std::panic::resume_unwind(e.into_panic());
}
QueryTaskResponse {
task_id: req.task_id,
status: TaskStatus::Failed,
error: Some(format!("proving task panicked: {}", e)),
..Default::default()
}
}
Err(e) => {
if e.is_panic() {
// simply re-throw panic for any panicking in proving process,
// cause worker loop and the whole prover exit
std::panic::resume_unwind(e.into_panic());
}
QueryTaskResponse {
task_id: req.task_id,
status: TaskStatus::Failed,
error: Some(format!("proving task failed: {}", e)),
..Default::default()
}
}
🤖 Prompt for AI Agents
In crates/prover-bin/src/prover.rs around lines 205 to 218, the non-panic
JoinError branch logs "proving task panicked" which is incorrect and there is a
typo "prrocess". Change the error message to reflect non-panic JoinError cases
(e.g., cancelled or join error) and include the JoinError details (e.g., via
e.to_string() or debug formatting) in the error field, and correct the comment
typo to "process". Keep the existing resume_unwind call for the is_panic() case
unchanged.

Copy link

@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: 0

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

20-28: Segment length doubled; please validate memory/perf impact and consider documenting the magic constant

segment_len going from (1 << 21) - 100 to (1 << 22) - 100 roughly doubles the segment size. Type and shape stay the same (Some(<int>)), so this should be API‑compatible, but it can materially change:

  • Peak memory usage per prover instance.
  • Per‑segment proving latency, and thus how well this runs on existing Galileo worker hardware.
  • Any implicit limits/expectations inside scroll_zkvm_prover::ProverConfig or the universal circuits.

I’d recommend:

  1. Running this value through your usual Galileo scenarios (max concurrency, largest expected proofs) to ensure no OOM or unacceptable latency regressions.
  2. Adding a short comment or central constant explaining why (1 << 22) - 100 is the right value for this fork, so future tuning is less guesswork.
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 9839bf7 and af63bc0.

📒 Files selected for processing (1)
  • crates/prover-bin/src/zk_circuits_handler/universal.rs (1 hunks)
⏰ 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

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