Skip to content

feat: upgrade zkvm-prover to feynman fork #1686

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 13 commits into from
Jul 3, 2025
Merged

feat: upgrade zkvm-prover to feynman fork #1686

merged 13 commits into from
Jul 3, 2025

Conversation

noel2004
Copy link
Member

@noel2004 noel2004 commented Jul 1, 2025

For updates in deployment please refer this doc:
https://www.notion.so/scrollzkp/Deployment-of-coordinator-prover-for-feynman-upgrade-2237792d22af807583c6cd3920bda3d2?showMoveTo=true&saveParent=true

Summary by CodeRabbit

  • New Features

    • Added tracing initialization for improved logging in both Rust and Go components.
    • Introduced a method to export verifier assets, including keys and binaries, to a specified directory.
  • Bug Fixes

    • Corrected verification logic for proof key matching in the verification tool.
    • Improved error logging for prover task assignment failures.
  • Refactor

    • Updated dependency versions and configurations for enhanced compatibility and performance.
    • Improved serialization methods and witness construction in proof-related tasks.
    • Changed verification key retrieval to asynchronous operations for better efficiency.
  • Documentation

    • Clarified comments and updated configuration files for accuracy and clarity.
  • Chores

    • Removed unused code and streamlined imports for maintainability.

Copy link

coderabbitai bot commented Jul 1, 2025

Walkthrough

This update introduces dependency upgrades, branch and revision changes in Rust workspace manifests, and configuration adjustments for supported cryptographic parameters. It also enhances error logging in Go coordinator modules, revises proof verification logic, updates serialization and witness construction in Rust prover code, and adds tracing initialization for C and Go FFI integration.

Changes

Files / Areas Change Summary
Cargo.toml, crates/libzkp/Cargo.toml, crates/libzkp_c/Cargo.toml Upgraded and replaced dependencies, changed git branches/revisions, removed/added features and crates, updated patch sections.
crates/libzkp/src/proofs.rs, crates/libzkp/src/tasks/batch.rs, ... (utils.rs) Refactored test imports, updated method calls for envelope and KZG settings, improved witness construction and serialization methods.
crates/libzkp/src/tasks/bundle.rs, crates/libzkp/src/tasks/chunk.rs Changed witness serialization from utility function to method call, added/updated fork name handling, refactored witness construction.
crates/libzkp_c/src/lib.rs, coordinator/internal/logic/libzkp/lib.go, ... Added tracing initialization for FFI, exposed new C function, called it from Go init, updated header declaration.
crates/prover-bin/src/main.rs, prover.rs, zk_circuits_handler.rs, euclidV2.rs Removed legacy dump_vk, added asset dumping, made get_vk async, updated handler logic, improved verifier asset management.
crates/l2geth/src/rpc_client.rs Updated provider initialization and block fetching method calls, removed unused imports.
zkvm-prover/.work/batch/openvm.toml, .../chunk/openvm.toml Renamed config keys (singular to plural), changed value formats, added struct_name for curves, adjusted formatting.
coordinator/internal/logic/provertask/*.go Enhanced error logging in Assign methods to include error details.
coordinator/cmd/tool/verify.go Changed proof VK comparison logic: inverted conditions for chunk/batch, removed check for bundle, always overwrites VK.
coordinator/internal/orm/prover_task.go Fixed method comment to accurately describe assigned_at update.
coordinator/internal/logic/verifier/verifier.go Removed commented-out legacy method.

Sequence Diagram(s)

sequenceDiagram
    participant GoApp as Go Coordinator
    participant LibZKP_C as C FFI Layer
    participant RustZKP as Rust Prover

    GoApp->>LibZKP_C: Package init (calls init_tracing)
    LibZKP_C->>LibZKP_C: Initialize tracing subscriber (once)
    LibZKP_C-->>GoApp: Tracing ready

    GoApp->>LibZKP_C: Assign prover task (calls into Rust)
    LibZKP_C->>RustZKP: Generate prover task
    RustZKP-->>LibZKP_C: Return result (with improved error logging)
    LibZKP_C-->>GoApp: Task result (error details included in logs)
Loading
sequenceDiagram
    participant ProverBin as Prover CLI
    participant LocalProver as LocalProver
    participant Handler as CircuitsHandler

    ProverBin->>LocalProver: dump_verifier_assets(fork, path)
    LocalProver->>Handler: get_vk(Chunk), get_vk(Batch), get_vk(Bundle) (async)
    Handler-->>LocalProver: VK strings
    LocalProver->>LocalProver: Write VKDump JSON, copy verifier.bin
    LocalProver-->>ProverBin: Done
Loading

Possibly related PRs

  • scroll-tech/scroll#1584: Modifies the same Assign methods in prover tasks, enhancing task assignment logic and error handling.
  • scroll-tech/scroll#1682: Refactors coordinator to support universal prover tasks and updates related logic, directly related to universal task handling in this PR.
  • scroll-tech/scroll#1684: Modifies the same prover task files and logic for expected verification key handling and assignment.

Suggested labels

bump-version

Suggested reviewers

  • georgehao
  • lispc

Poem

A bunny hopped through code today,
Upgrading crates along its way.
It traced the logs and fixed the keys,
Refactored proofs with gentle ease.
Singular to plural, configs aligned—
With every hop, the bugs resigned!
🐇✨


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 28e54ac and 9ff4d52.

⛔ Files ignored due to path filters (1)
  • Cargo.lock is excluded by !**/*.lock
📒 Files selected for processing (4)
  • Cargo.toml (2 hunks)
  • coordinator/internal/logic/provertask/batch_prover_task.go (1 hunks)
  • coordinator/internal/logic/provertask/bundle_prover_task.go (1 hunks)
  • coordinator/internal/logic/provertask/chunk_prover_task.go (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (4)
  • coordinator/internal/logic/provertask/batch_prover_task.go
  • coordinator/internal/logic/provertask/bundle_prover_task.go
  • coordinator/internal/logic/provertask/chunk_prover_task.go
  • Cargo.toml
⏰ Context from checks skipped due to timeout of 90000ms (3)
  • GitHub Check: tests
  • GitHub Check: tests
  • GitHub Check: check
✨ Finishing Touches
  • 📝 Generate Docstrings

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
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@noel2004 noel2004 marked this pull request as ready for review July 1, 2025 23:30
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: 3

♻️ Duplicate comments (1)
crates/libzkp/src/tasks/chunk.rs (1)

74-74: Verify serialization method compatibility and error handling.

The serialization method has been changed from to_rkyv_bytes to witness.rkyv_serialize(None)?. This is a significant change that could affect data compatibility.

Please verify that the new serialization method produces compatible output:

#!/bin/bash
# Description: Search for any remaining usage of the old serialization method

# Check for any remaining usage of to_rkyv_bytes
rg "to_rkyv_bytes" --type rust

# Check for similar serialization pattern changes
rg "rkyv_serialize" --type rust -A 2 -B 2

# Look for any error handling related to RancorError
rg "RancorError" --type rust

The change from to_rkyv_bytes::<RancorError> to rkyv_serialize(None)? suggests a different error handling approach. Ensure this doesn't introduce silent failures.

This appears related to the "EuclidV2" upgrade mentioned in the past review comment.

🧹 Nitpick comments (5)
zkvm-prover/.work/chunk/openvm.toml (1)

40-58: New struct_name attributes per curve

All three curve entries now expose struct_name.
If this replaces implicit naming conventions, ensure the verifier/prover selects curves via this field rather than by array index or hard-coded constants.

crates/libzkp/Cargo.toml (1)

11-11: Clarify the "native-keccak" suppression comment.

The comment mentions depressing the effect of "native-keccak" but doesn't explain why this is necessary or what specific issue it addresses. Consider adding more context to help future maintainers understand the reasoning.

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

107-107: Consider removing debug console logging.

The addition of println! alongside existing tracing::error! creates redundant logging. Consider keeping only the structured logging approach for consistency.

-println!("gen_universal_task failed at pre interpret step, error: {e}");
Cargo.toml (2)

24-25: Consider pinning to a specific commit instead of a branch.

The stateless-block-verifier dependencies are pointing to the chore/upgrade branch, which is a moving target and can lead to non-reproducible builds.

Consider pinning to a specific commit hash for better reproducibility:

-sbv-primitives = { git = "https://github.com/scroll-tech/stateless-block-verifier", branch = "chore/upgrade", features = ["scroll"] }
-sbv-utils = { git = "https://github.com/scroll-tech/stateless-block-verifier", branch = "chore/upgrade" }
+sbv-primitives = { git = "https://github.com/scroll-tech/stateless-block-verifier", rev = "<specific-commit-hash>", features = ["scroll"] }
+sbv-utils = { git = "https://github.com/scroll-tech/stateless-block-verifier", rev = "<specific-commit-hash>" }

63-64: Review Forked Dependencies in Cargo.toml

File: Cargo.toml
Lines: 63–64

ruint = { git = "https://github.com/scroll-tech/uint.git", branch = "v1.15.0" }
alloy-primitives = { git = "https://github.com/scroll-tech/alloy-core", branch = "v1.2.0" }

Implications of these forks

  • scroll-tech/uint.git v1.15.0 is tailored for Scroll’s zkEVM (custom APIs, performance tweaks) and may lag behind or diverge from the upstream ruint crate, which targets general Rust usage and enjoys broader maintenance.
  • scroll-tech/alloy-core v1.2.0 likely follows a similar pattern versus the upstream alloy-primitives crate.

Recommendations

  • Contribute Scroll-specific fixes/features back upstream where feasible.
  • Document the rationale for each fork in your README or inline comments.
  • Set up a regular sync process to pull in security patches and bugfixes from upstream.
  • Plan a migration path to the upstream crates once required changes are merged.

For a definitive comparison, run a side-by-side git diff between each forked branch and its upstream release to catalog exact API or implementation differences.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between ea38ae7 and 59b0f11.

⛔ Files ignored due to path filters (1)
  • Cargo.lock is excluded by !**/*.lock
📒 Files selected for processing (19)
  • Cargo.toml (2 hunks)
  • coordinator/conf/config.json (1 hunks)
  • coordinator/internal/logic/provertask/batch_prover_task.go (1 hunks)
  • coordinator/internal/logic/provertask/bundle_prover_task.go (1 hunks)
  • coordinator/internal/logic/provertask/chunk_prover_task.go (1 hunks)
  • crates/l2geth/src/rpc_client.rs (2 hunks)
  • crates/libzkp/Cargo.toml (2 hunks)
  • crates/libzkp/src/proofs.rs (3 hunks)
  • crates/libzkp/src/tasks/batch.rs (3 hunks)
  • crates/libzkp/src/tasks/batch/utils.rs (2 hunks)
  • crates/libzkp/src/tasks/bundle.rs (2 hunks)
  • crates/libzkp/src/tasks/chunk.rs (2 hunks)
  • crates/libzkp_c/src/lib.rs (2 hunks)
  • crates/prover-bin/src/main.rs (3 hunks)
  • crates/prover-bin/src/prover.rs (3 hunks)
  • crates/prover-bin/src/zk_circuits_handler.rs (1 hunks)
  • crates/prover-bin/src/zk_circuits_handler/euclidV2.rs (2 hunks)
  • zkvm-prover/.work/batch/openvm.toml (2 hunks)
  • zkvm-prover/.work/chunk/openvm.toml (2 hunks)
🧰 Additional context used
🧠 Learnings (1)
crates/libzkp/src/proofs.rs (1)
Learnt from: colinlyguo
PR: scroll-tech/scroll#1530
File: tests/integration-test/go.mod:21-21
Timestamp: 2024-10-20T15:30:18.084Z
Learning: In the `tests/integration-test` folder, updates to import statements or dependencies are not necessary since it's only used for testing purposes.
🧬 Code Graph Analysis (2)
crates/prover-bin/src/zk_circuits_handler.rs (3)
crates/prover-bin/src/zk_circuits_handler/euclidV2.rs (1)
  • get_vk (82-84)
crates/prover-bin/src/zk_circuits_handler/euclid.rs (1)
  • get_vk (108-115)
common/types/message/message.go (1)
  • ProofType (20-20)
crates/prover-bin/src/zk_circuits_handler/euclidV2.rs (3)
crates/prover-bin/src/zk_circuits_handler.rs (1)
  • get_vk (14-14)
crates/prover-bin/src/zk_circuits_handler/euclid.rs (1)
  • get_vk (108-115)
common/types/message/message.go (1)
  • ProofType (20-20)
⏰ Context from checks skipped due to timeout of 90000ms (3)
  • GitHub Check: tests
  • GitHub Check: tests
  • GitHub Check: check
🔇 Additional comments (29)
zkvm-prover/.work/batch/openvm.toml (2)

27-29: Verify that the consumer expects an “array-of-tuples” for fp2.supported_moduli

You switched from an array of strings to an array whose single element is a two-item tuple.
If the loader previously iterated over Vec<String> it will now panic/deserialise to None.
Confirm that the corresponding struct has changed to Vec<(String,String)> or similar.


30-32: struct_name introduced – ensure it’s wired through deserialisation

struct_name = "Bls12_381G1Affine" is new. Double-check that:

  1. The config schema contains this field (otherwise it will be silently ignored or trigger an unknown-field error depending on serde flags).
  2. Down-stream code actually uses it instead of hard-coding curve names.
zkvm-prover/.work/chunk/openvm.toml (2)

20-27: Renamed key supported_modulussupported_moduli – audit codebase

The pluralised field propagates here as well. Search for "supported_modulus" usages in the prover/coordinator crates; stale references will break deserialisation at runtime.


30-32: Type change for fp2.supported_moduli mirrors batch config

Same concern as in the batch file: make sure the consumer expects a list of tuples, not strings.

crates/libzkp/Cargo.toml (1)

23-23: Verify c-kzg v2.0 API compatibility

You’ve bumped c-kzg from 1.0 to 2.0, which may introduce breaking changes. Before merging, please cross-check all uses of the crate against the v2.0 changelog or release notes and update any altered signatures or removed APIs.

Key usage sites to review:

  • crates/libzkp/src/tasks/batch.rs
    c_kzg::Bytes48
    point_eval::to_blobc_kzg::Blob
    point_eval::blob_to_kzg_commitmentc_kzg::KzgCommitment
    point_eval::get_kzg_proofc_kzg::KzgProof
  • crates/libzkp/src/tasks/batch/utils.rs
    c_kzg::BYTES_PER_BLOB, c_kzg::FIELD_ELEMENTS_PER_BLOB
    c_kzg::Blob::new(...)
    c_kzg::ethereum_kzg_settings(0).blob_to_kzg_commitment(...)
    c_kzg::ethereum_kzg_settings(0).compute_kzg_proof(...)

If any of these types or functions were renamed, had their parameters changed, or were removed in v2.0, update your calls accordingly. It’s also a good idea to run the full test suite after syncing with the v2.0 API.

crates/l2geth/src/rpc_client.rs (2)

79-79: API migration looks correct.

The change from on_client to connect_client aligns with alloy provider API updates. The functionality remains the same.


108-110: Block fetching API migration is well-implemented.

The change from get_block_by_hash(block_hash, BlockTransactionsKind::Full) to the fluent API get_block_by_hash(block_hash).full() is more readable and follows modern Rust API design patterns.

coordinator/internal/logic/provertask/batch_prover_task.go (1)

200-200: Excellent error logging improvement.

Adding the actual error ("err", err) to the structured log provides valuable debugging information when universal prover task generation fails. This enhancement improves observability.

coordinator/internal/logic/provertask/chunk_prover_task.go (1)

194-194: Consistent error logging improvement.

This change mirrors the improvement made in batch_prover_task.go, ensuring consistent error reporting across all prover task types. The addition of "err", err enhances debugging capabilities.

coordinator/internal/logic/provertask/bundle_prover_task.go (1)

196-196: LGTM! Enhanced error logging for better diagnostics.

This change improves error visibility by including the actual error details in the log when universal prover task generation fails. This aligns with similar logging enhancements across the prover task modules.

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

14-14: All CircuitsHandler implementations updated to async get_vk

Confirmed that no synchronous fn get_vk remains in any impl CircuitsHandler.
Checked files:

  • crates/prover-bin/src/zk_circuits_handler/euclid.rs
  • crates/prover-bin/src/zk_circuits_handler/euclidV2.rs

Interface is now consistent with the async get_proof_data method.

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

217-217: LGTM! Import cleanup removes unused dependencies.

The simplified imports removing unused BundleInfoV1 and PublicInputs while adding the needed ForkName improve code clarity.


244-256: LGTM! Test modernization and type simplification.

The changes simplify the bundle info construction by:

  • Removing unnecessary type annotations and .into() conversions
  • Adding explicit ForkName::EuclidV1 parameter to pi_hash method
  • Fixing the assignment to use the variable directly

These improvements enhance code readability and align with modernized APIs.

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

7-8: LGTM! Import addition for envelope types.

The addition of Envelope to the imports supports the updated envelope construction patterns used in the batch proving task.


120-121: LGTM! Updated envelope construction method calls.

The change from from to from_slice provides more explicit and type-safe construction of EnvelopeV6 and EnvelopeV7 instances from byte slices. This aligns with the broader serialization pattern updates across the proving task modules.

Also applies to: 135-136

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

45-47: LGTM: Correct implementation of c-kzg 2.0 API changes.

The change from static method calls to instance method calls on ethereum_kzg_settings(0) correctly implements the new c-kzg 2.0 API. The explicit argument 0 follows the updated library interface.


69-71: LGTM: Consistent KZG API update for proof computation.

The change to use instance method compute_kzg_proof on the KZG settings object is consistent with the blob commitment changes above and correctly implements the c-kzg 2.0 API.

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

38-39: LGTM: Parameter name better reflects expanded functionality.

The rename from file_name to asset_path more accurately describes the parameter's purpose, as it now handles dumping various verifier assets rather than just a single VK file.


60-63: Confirm dump_verifier_assets implementation exists

Found pub fn dump_verifier_assets(&self, hard_fork_name: &str, out_path: &Path) -> Result<()> in crates/prover-bin/src/prover.rs at line 199. No further changes needed.

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

75-75: LGTM: Correct async/await implementation for updated trait.

The change from synchronous to asynchronous call with .await correctly implements the updated CircuitsHandler trait where get_vk became an async method.


199-228: LGTM: Well-structured verifier asset dumping implementation.

The new dump_verifier_assets method provides comprehensive functionality:

  • Proper error handling for missing fork configuration
  • Uses EuclidV2Handler for universal proving
  • Dumps both universal verifier assets and specific VK files
  • Creates structured JSON output with chunk, batch, and bundle VKs

The implementation correctly delegates to the appropriate handler and provides clear error messages.

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

49-49: LGTM: Fork name support added to witness.

Adding the fork_name field to BundleWitness with proper case normalization supports the multi-fork configuration mentioned in the PR objectives. The conversion to lowercase ensures consistency.


86-86: LGTM: Updated serialization method call.

The change from the utility function to_rkyv_bytes to the instance method rkyv_serialize(None) appears to be part of API modernization. The None parameter likely represents default serialization options.

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

60-64: LGTM: Provides access to underlying prover with clear documentation.

The get_prover method correctly exposes the bundle prover as a representative until universal prover implementation. The documentation clearly explains this is a temporary solution.


82-84: LGTM: Correct async implementation with proper mutex handling.

The change from synchronous try_lock() to asynchronous lock().await properly implements the async trait method and eliminates the potential panic from try_lock().unwrap(). This provides more robust error handling.

Cargo.toml (3)

20-22: Confirm zkvm-prover revision exists; verify revert impact

The git revision 09e998f is valid and points to a revert commit (revert ToArchievedWitness using rkyv_serialize (#129)) on branch wip/building-reth. Before merging, please double-check:

  • That this revert aligns with the intended “feynman fork” changes and hasn’t removed functionality your code depends on.
  • All zkvm-prover–related tests still pass with the new revision.
  • There are no new security concerns introduced by this commit (e.g., review serialization changes).

File to inspect:
• Cargo.toml (lines 20–22)


50-62: Verify revm patch usage and compatibility

I’ve confirmed that the feat/reth-v74 branch exists in the revm repo (commit 7746160…) but didn’t find any direct use revm or revm:: imports in your Rust code—meaning revm is likely only a transitive dependency (e.g. via reth). Please verify locally that each patched revm crate is still required and that pulling in that branch doesn’t introduce breakage:

  • Run a dependency tree check to surface all revm crates:
    cargo tree -e no-dev | grep revm
  • Ensure that all of the patched crates (revm, revm-bytecode, revm-context, …, revm-state) appear and are compatible.
  • If any patched crate is no longer used or causes conflicts, consider removing its patch or updating its version/branch.

32-35: No breaking changes found after alloy version bump

I ran the following checks against the PR branch and everything compiles cleanly:

  • Searched all use alloy and alloy:: occurrences (found only in crates/l2geth/src/rpc_client.rs)
  • Ran cargo check—no errors related to alloy, only dependency downloads for various alloy crates
  • Confirmed that disabling default-features on alloy, alloy-primitives and alloy-serde does not break existing imports or code paths

Since there are no compilation errors or missing APIs, the update to alloy v1 / primitives v1.2 / serde v1 is safe to merge.

crates/libzkp/src/tasks/chunk.rs (1)

121-125: Please manually verify ChunkWitness::new behavior

I wasn’t able to locate the ChunkWitness type or its new implementation in this crate— it may live in another module or external crate. Before approving, please confirm that:

  • The new constructor simply assigns the three fields without any extra validation or side-effects.
  • Its behavior remains fully equivalent to the previous direct struct initialization.

@codecov-commenter
Copy link

codecov-commenter commented Jul 1, 2025

Codecov Report

Attention: Patch coverage is 22.22222% with 7 lines in your changes missing coverage. Please review.

Project coverage is 39.95%. Comparing base (a776ca7) to head (9ff4d52).
Report is 1 commits behind head on develop.

Files with missing lines Patch % Lines
coordinator/cmd/tool/verify.go 0.00% 4 Missing ⚠️
...tor/internal/logic/provertask/batch_prover_task.go 0.00% 1 Missing ⚠️
...or/internal/logic/provertask/bundle_prover_task.go 0.00% 1 Missing ⚠️
...tor/internal/logic/provertask/chunk_prover_task.go 0.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #1686      +/-   ##
===========================================
+ Coverage    39.84%   39.95%   +0.10%     
===========================================
  Files          236      236              
  Lines        18814    18808       -6     
===========================================
+ Hits          7496     7514      +18     
+ Misses       10583    10555      -28     
- Partials       735      739       +4     
Flag Coverage Δ
coordinator 33.94% <22.22%> (+0.54%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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 (2)
coordinator/internal/logic/libzkp/libzkp.h (1)

11-12: Consider adding error handling capability.

The function declaration looks good and follows C conventions. However, the void return type prevents error reporting if tracing initialization fails.

Consider whether this function should return an error code to enable proper error handling in the caller.

-// Init log tracing
-void init_tracing();
+// Init log tracing - returns 0 on success, non-zero on error
+int init_tracing();
coordinator/internal/logic/libzkp/lib.go (1)

20-22: Consider error handling and initialization timing.

The automatic tracing initialization follows Go conventions but has some limitations:

  1. No error handling: The void return type prevents detecting initialization failures
  2. Automatic execution: Tracing initializes during package import, which may not be ideal in all contexts
  3. No safeguards: No protection against multiple calls or checking if already initialized

Consider adding explicit initialization with error handling:

-func init() {
-	C.init_tracing()
-}
+// InitTracing initializes the tracing subsystem
+// Should be called once during application startup
+func InitTracing() error {
+	// Note: This would require updating the C function to return an error code
+	C.init_tracing()
+	return nil
+}

Alternatively, if automatic initialization is preferred, consider adding error logging:

+import "log"
+
 func init() {
-	C.init_tracing()
+	// Initialize tracing - errors cannot be reported due to void return type
+	C.init_tracing()
+	// Consider adding a separate C function to check initialization status
 }
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 59b0f11 and 1515cc5.

⛔ Files ignored due to path filters (1)
  • Cargo.lock is excluded by !**/*.lock
📒 Files selected for processing (4)
  • coordinator/internal/logic/libzkp/lib.go (1 hunks)
  • coordinator/internal/logic/libzkp/libzkp.h (1 hunks)
  • crates/libzkp_c/Cargo.toml (1 hunks)
  • crates/libzkp_c/src/lib.rs (2 hunks)
✅ Files skipped from review due to trivial changes (1)
  • crates/libzkp_c/Cargo.toml
🚧 Files skipped from review as they are similar to previous changes (1)
  • crates/libzkp_c/src/lib.rs
⏰ Context from checks skipped due to timeout of 90000ms (3)
  • GitHub Check: check
  • GitHub Check: tests
  • GitHub Check: tests

@noel2004
Copy link
Member Author

noel2004 commented Jul 2, 2025

With the last commit, we have successfully verified proofs picked up from mainnet and sepolia testnet, (the zkvm_version of stuffs is 0.4.2)

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)
coordinator/cmd/tool/verify.go (1)

97-97: Bundle proof handling: Always use expected verification key

The verification key check has been removed for bundle proofs, and the proof's Vk is always overwritten with the expected key from the verifier. This suggests that bundle proofs have different handling requirements compared to chunk and batch proofs, where the verification key validation is intentionally bypassed.

This design decision should be documented to clarify why bundle proofs don't require verification key validation like the other proof types.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 1515cc5 and adac040.

📒 Files selected for processing (3)
  • coordinator/cmd/tool/verify.go (4 hunks)
  • crates/prover-bin/src/prover.rs (3 hunks)
  • crates/prover-bin/src/zk_circuits_handler/euclidV2.rs (2 hunks)
🚧 Files skipped from review as they are similar to previous changes (2)
  • crates/prover-bin/src/prover.rs
  • crates/prover-bin/src/zk_circuits_handler/euclidV2.rs
⏰ Context from checks skipped due to timeout of 90000ms (3)
  • GitHub Check: tests
  • GitHub Check: tests
  • GitHub Check: check
🔇 Additional comments (3)
coordinator/cmd/tool/verify.go (3)

31-31: LGTM: Logging format adjustment

The logging statement formatting has been improved for better readability.


56-56: Critical bug fix: Correct verification key comparison logic

This change fixes a critical logic error in the original code. The condition has been correctly inverted from bytes.Equal(proof.Vk, vk) to !bytes.Equal(proof.Vk, vk).

The original logic was backwards - it would return an error when the verification keys MATCHED, which would cause valid proofs to be rejected. The corrected logic now properly returns an error when the keys DON'T match, as intended.


77-77: Critical bug fix: Correct verification key comparison logic

Same critical logic fix as line 56. The condition has been correctly inverted to return an error when verification keys don't match, rather than when they do match. This ensures batch proofs with valid verification keys are not incorrectly rejected.

@colinlyguo colinlyguo self-requested a review July 2, 2025 14:25
colinlyguo
colinlyguo previously approved these changes Jul 2, 2025
@colinlyguo colinlyguo changed the title Upgrade zkvm-prover to feynman fork feat: upgrade zkvm-prover to feynman fork Jul 2, 2025
@georgehao georgehao merged commit b7a172a into develop Jul 3, 2025
6 checks passed
@georgehao georgehao deleted the zkvm/feynman branch July 3, 2025 10:48
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