Skip to content

refactor(coordinator): simplify logic post-Euclid #1652

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 4 commits into from
May 16, 2025

Conversation

colinlyguo
Copy link
Member

@colinlyguo colinlyguo commented May 8, 2025

Purpose or design rationale of this PR

This PR removes halo2 prover logic and only keeps openvm prover logic.

PR title

Your PR title must follow conventional commits (as we are doing squash merge for each PR), so it must start with one of the following types:

  • refactor: A code change that doesn't fix a bug, or add a feature, or improves performance

Deployment tag versioning

Has tag in common/version.go been updated or have you added bump-version label to this PR?

  • Yes

Breaking change label

Does this PR have the breaking-change label?

  • No, this PR is not a breaking change

Summary by CodeRabbit

Summary by CodeRabbit

  • Refactor
    • Removed legacy proof types and interfaces, consolidating all proof handling to use new OpenVM proof types for chunk, batch, and bundle proofs.
    • Simplified configuration and logic by removing support for "low version" circuits and mock mode throughout the system.
    • Updated APIs, controllers, and internal logic to exclusively support the new OpenVM proof structures and types.
    • Streamlined logging and verification key management to focus on the high version circuit and OpenVM verification keys.
    • Removed backward compatibility conditions and prover version special cases.
  • Chores
    • Deleted all prover-related Rust source files, configuration files, build scripts, and CI workflows, effectively removing the prover component from the repository.
    • Cleaned up test and configuration files to reflect the removal of deprecated features and the prover component.
    • Removed scripts and tooling related to prover versioning and Rust toolchain pinning.
  • Tests
    • Updated tests to use OpenVM proof types exclusively, removing references to deprecated proof types and adjusting assertions accordingly.
  • Style
    • Reduced log verbosity and improved naming to reflect deprecated types where still referenced for compatibility.

Copy link

coderabbitai bot commented May 8, 2025

Walkthrough

This change removes the entire legacy prover Rust codebase, configuration, and related build/test infrastructure. It eliminates all references to legacy proof types and interfaces (e.g., Halo2 proofs) from the Go codebase, replacing them with exclusive use of new OpenVM proof types. Configuration and control logic are simplified by dropping support for low-version circuits, mock mode, and legacy proof abstractions.

Changes

File(s) / Path(s) Change Summary
.github/workflows/prover.yml, prover/Cargo.toml, prover/Makefile, prover/config.json, prover/rust-toolchain, prover/rustfmt.toml, prover/print_halo2gpu_version.sh, prover/print_high_zkevm_version.sh, prover/src/* Deleted the entire legacy prover Rust codebase, configuration, build scripts, and CI workflow.
common/types/message/message.go Removed all legacy proof interfaces and types; updated task details to use only OpenVM proof types.
coordinator/internal/logic/verifier/types.go, coordinator/internal/logic/verifier/verifier.go, coordinator/internal/logic/verifier/mock.go Removed legacy VK maps and low-version circuit support from the verifier; updated verification methods to use OpenVM proof types.
coordinator/internal/logic/provertask/batch_prover_task.go, coordinator/internal/logic/provertask/bundle_prover_task.go, coordinator/internal/logic/provertask/chunk_prover_task.go, coordinator/internal/logic/provertask/prover_task.go Refactored to use only OpenVM proof types; removed legacy proof handling and backward compatibility logic.
coordinator/internal/logic/auth/login.go Simplified login logic to use only high-version circuits and OpenVM VKs; removed legacy version and VK checks.
coordinator/internal/config/config.go, coordinator/conf/config.json, coordinator/cmd/api/app/mock_app.go, coordinator/test/api_test.go Removed mock mode and low-version circuit configuration from code and JSON config.
coordinator/internal/logic/submitproof/proof_receiver.go, coordinator/cmd/tool/tool.go, coordinator/test/mock_prover.go Updated proof handling to use OpenVM proof types directly.
coordinator/internal/types/prover.go, coordinator/internal/types/auth_test.go Marked legacy prover type constants as deprecated; updated tests to use only OpenVM prover types.
coordinator/internal/logic/verifier/verifier_test.go Updated test helpers to use OpenVM proof types exclusively.
coordinator/internal/controller/api/controller.go Reduced log verbosity to report only OpenVM VKs.
rollup/internal/orm/batch.go, rollup/internal/orm/bundle.go, rollup/internal/orm/orm_test.go Updated ORM methods and tests to use OpenVM proof pointer types.
rollup/internal/controller/relayer/l2_relayer.go, rollup/internal/controller/relayer/l2_relayer_test.go Updated relayer logic and tests to use OpenVM bundle proofs.
rollup/tests/rollup_test.go Updated tests to use OpenVM proof types.

Sequence Diagram(s)

sequenceDiagram
    participant Coordinator
    participant Verifier
    participant DB
    participant Prover

    Coordinator->>Verifier: Verify OpenVMChunkProof / OpenVMBatchProof / OpenVMBundleProof
    Verifier-->>Coordinator: Verification result (no legacy VKs, only OpenVM)
    Coordinator->>DB: Store or retrieve OpenVM proof (pointer types)
    Prover->>Coordinator: Submit OpenVM proof (no legacy types)
    Coordinator-->>Prover: Acknowledge proof receipt
Loading

Possibly related PRs

  • scroll-tech/scroll#1613: Adds support for the "euclidv2" fork and OpenVM proof types, which are now exclusively used after this removal of legacy proofs.
  • scroll-tech/scroll#1587: Refactors and integrates proving-sdk into the prover codebase; related to prover source files removed here.
  • scroll-tech/scroll#1597: Previously introduced legacy proof interfaces and factory functions now removed by this PR.

Suggested labels

bump-version

Suggested reviewers

  • yiweichi
  • georgehao

Poem

🐇
Goodbye to the old, the legacy's gone,
Rusty old proofs now hop along.
OpenVM shines, clean and bright,
Circuits and configs, now feather-light.
With simpler code, we leap ahead,
The future is OpenVM—enough said!

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 golangci-lint (1.64.8)

level=warning msg="[runner] Can't run linter goanalysis_metalinter: buildir: failed to load package zstd: could not load export data: no export data for "github.com/scroll-tech/da-codec/encoding/zstd""
level=error msg="Running error: can't run linter goanalysis_metalinter\nbuildir: failed to load package zstd: could not load export data: no export data for "github.com/scroll-tech/da-codec/encoding/zstd""


📜 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 d00a4ec and c4c2718.

📒 Files selected for processing (3)
  • common/version/version.go (1 hunks)
  • rollup/internal/orm/batch.go (3 hunks)
  • rollup/internal/orm/orm_test.go (4 hunks)
🚧 Files skipped from review as they are similar to previous changes (3)
  • common/version/version.go
  • rollup/internal/orm/orm_test.go
  • rollup/internal/orm/batch.go
⏰ Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: tests
✨ 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.
    • Generate unit testing code for this file.
    • 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 generate unit testing code for this file.
    • @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 generate unit testing code.
    • @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.

@codecov-commenter
Copy link

codecov-commenter commented May 8, 2025

Codecov Report

Attention: Patch coverage is 54.11765% with 39 lines in your changes missing coverage. Please review.

Project coverage is 40.91%. Comparing base (0d8b00c) to head (c4c2718).

Files with missing lines Patch % Lines
coordinator/internal/logic/auth/login.go 50.00% 6 Missing and 1 partial ⚠️
...or/internal/logic/provertask/bundle_prover_task.go 0.00% 7 Missing ⚠️
coordinator/internal/types/prover.go 0.00% 6 Missing ⚠️
coordinator/cmd/tool/tool.go 0.00% 3 Missing ⚠️
...tor/internal/logic/provertask/batch_prover_task.go 83.33% 2 Missing and 1 partial ⚠️
...tor/internal/logic/provertask/chunk_prover_task.go 0.00% 2 Missing and 1 partial ⚠️
coordinator/test/mock_prover.go 72.72% 3 Missing ⚠️
coordinator/internal/logic/verifier/mock.go 66.66% 1 Missing and 1 partial ⚠️
rollup/internal/orm/batch.go 50.00% 2 Missing ⚠️
coordinator/cmd/api/app/mock_app.go 0.00% 1 Missing ⚠️
... and 2 more
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #1652      +/-   ##
===========================================
+ Coverage    40.68%   40.91%   +0.23%     
===========================================
  Files          225      225              
  Lines        18419    18303     -116     
===========================================
- Hits          7493     7488       -5     
+ Misses       10195    10088     -107     
+ Partials       731      727       -4     
Flag Coverage Δ
common 29.86% <ø> (+1.34%) ⬆️
coordinator 34.47% <50.68%> (+0.48%) ⬆️
database 42.05% <ø> (ø)
rollup 49.25% <75.00%> (-0.03%) ⬇️

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: 4

🔭 Outside diff range comments (1)
coordinator/internal/logic/provertask/bundle_prover_task.go (1)

203-210: 🛠️ Refactor suggestion

Avoid passing a pointer-to-pointer to json.Unmarshal

proof is already a pointer. Passing &proof (i.e. **OpenVMBatchProof) forces encoding/json to allocate an additional struct and assign it to proof, which is unnecessary and makes the code harder to read.

-		proof := &message.OpenVMBatchProof{}
-		if encodeErr := json.Unmarshal(batch.Proof, &proof); encodeErr != nil {
+		proof := &message.OpenVMBatchProof{}
+		if encodeErr := json.Unmarshal(batch.Proof, proof); encodeErr != nil {

(Same applies everywhere this pattern appears.)

♻️ Duplicate comments (1)
coordinator/internal/logic/verifier/verifier_test.go (1)

74-83: Same signature mismatch for chunk proof helper

Please apply the identical fix here:

-func readChunkProof(filePat string, as *assert.Assertions) types.OpenVMChunkProof {
+func readChunkProof(filePat string, as *assert.Assertions) *types.OpenVMChunkProof {
@@
-	proof := &types.OpenVMChunkProof{}
-	as.NoError(json.Unmarshal(byt, proof))
-
-	return proof
+	proof := &types.OpenVMChunkProof{}
+	as.NoError(json.Unmarshal(byt, proof))
+	return proof
 }
🧹 Nitpick comments (8)
coordinator/test/mock_prover.go (2)

210-221: Minor: default case for unsupported task types

submitProof silently leaves proof as nil if an unexpected TaskType is received.
Adding a default: that fails the test early makes debugging easier.

  switch proverTaskSchema.TaskType {
@@
  	proof = encodeData
+default:
+	t.Fatalf("unsupported task type %d", proverTaskSchema.TaskType)
 }

225-235: Duplicated code – factor into a helper

The chunk/batch branches that craft an invalid proof are identical except for the proof struct type. Extracting a small helper reduces duplication and future maintenance cost.

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

203-206: Avoid double-pointer unmarshalling

proof is already a pointer; passing &proof to json.Unmarshal yields a **message.OpenVMChunkProof.
While Go’s encoding/json tolerates this, it is unnecessary and obscures intent.

-        proof := &message.OpenVMChunkProof{}
-        if encodeErr := json.Unmarshal(chunk.Proof, &proof); encodeErr != nil {
+        proof := &message.OpenVMChunkProof{}
+        if encodeErr := json.Unmarshal(chunk.Proof, proof); encodeErr != nil {

258-259: Unused hardForkName parameter – clarify or drop

hardForkName is accepted but ignored because ForkName is hard-coded to message.EuclidV2ForkNameForProver.
Either use the parameter:

-        ForkName:    message.EuclidV2ForkNameForProver,
+        ForkName:    hardForkName,

or delete it from the signature and call sites to avoid future confusion.

coordinator/internal/logic/auth/login.go (1)

98-101: Redundant length check after strings.Split

strings.Split always returns at least one element, so len(proverVersionSplits)==0 is impossible.
This guard can be removed to simplify the code.

coordinator/internal/logic/verifier/verifier.go (1)

164-195: Potential temp-file race when multiple verifier instances start

loadOpenVMVks dumps VKs to a fixed filename in /tmp (openVmVk.json).
Parallel starts (e.g., multiple coordinator replicas) could race on this file.
Consider using os.CreateTemp to obtain a unique filename:

- tempFile := path.Join(os.TempDir(), "openVmVk.json")
+ f, err := os.CreateTemp("", "openVmVk_*.json")
+ if err != nil { return err }
+ tempFile := f.Name()
+ f.Close()
common/types/message/message.go (2)

101-108: Add omitempty to slice-typed JSON fields to prevent unwanted null values

ChunkProofs (and other byte / slice fields in this struct) default to null when the slice is nil.
Down-stream services that previously consumed an absent field ("" in JSON) may now receive the literal value null, which can break strict decoders or cause subtle logic branches.

-    ChunkProofs     []*OpenVMChunkProof `json:"chunk_proofs"`
+    ChunkProofs     []*OpenVMChunkProof `json:"chunk_proofs,omitempty"`

Consider doing the same for BlobBytes, ChunkInfos, etc., if they may be empty at marshaling time.


114-116: Mirror the omitempty change for BatchProofs

For consistency with the suggestion above, and to keep the marshalled JSON surface identical between task types, mark BatchProofs as omitempty as well:

-    BatchProofs []*OpenVMBatchProof `json:"batch_proofs"`
+    BatchProofs []*OpenVMBatchProof `json:"batch_proofs,omitempty"`

This avoids emitting null when a bundle task is constructed before proofs are attached.

📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between a18fe06 and 10160c2.

⛔ Files ignored due to path filters (1)
  • prover/Cargo.lock is excluded by !**/*.lock
📒 Files selected for processing (43)
  • .github/workflows/prover.yml (0 hunks)
  • common/types/message/message.go (1 hunks)
  • coordinator/cmd/api/app/mock_app.go (0 hunks)
  • coordinator/cmd/tool/tool.go (1 hunks)
  • coordinator/conf/config.json (0 hunks)
  • coordinator/internal/config/config.go (0 hunks)
  • coordinator/internal/controller/api/controller.go (1 hunks)
  • coordinator/internal/logic/auth/login.go (1 hunks)
  • coordinator/internal/logic/provertask/batch_prover_task.go (2 hunks)
  • coordinator/internal/logic/provertask/bundle_prover_task.go (3 hunks)
  • coordinator/internal/logic/provertask/chunk_prover_task.go (1 hunks)
  • coordinator/internal/logic/provertask/prover_task.go (0 hunks)
  • coordinator/internal/logic/submitproof/proof_receiver.go (1 hunks)
  • coordinator/internal/logic/verifier/mock.go (1 hunks)
  • coordinator/internal/logic/verifier/types.go (0 hunks)
  • coordinator/internal/logic/verifier/verifier.go (3 hunks)
  • coordinator/internal/logic/verifier/verifier_test.go (1 hunks)
  • coordinator/internal/types/auth_test.go (2 hunks)
  • coordinator/internal/types/prover.go (3 hunks)
  • coordinator/test/api_test.go (0 hunks)
  • coordinator/test/mock_prover.go (2 hunks)
  • prover/Cargo.toml (0 hunks)
  • prover/Makefile (0 hunks)
  • prover/config.json (0 hunks)
  • prover/print_halo2gpu_version.sh (0 hunks)
  • prover/print_high_zkevm_version.sh (0 hunks)
  • prover/rust-toolchain (0 hunks)
  • prover/rustfmt.toml (0 hunks)
  • prover/src/config.rs (0 hunks)
  • prover/src/main.rs (0 hunks)
  • prover/src/prover.rs (0 hunks)
  • prover/src/types.rs (0 hunks)
  • prover/src/utils.rs (0 hunks)
  • prover/src/zk_circuits_handler.rs (0 hunks)
  • prover/src/zk_circuits_handler/common.rs (0 hunks)
  • prover/src/zk_circuits_handler/darwin.rs (0 hunks)
  • prover/src/zk_circuits_handler/darwin_v2.rs (0 hunks)
  • rollup/internal/controller/relayer/l2_relayer.go (3 hunks)
  • rollup/internal/controller/relayer/l2_relayer_test.go (1 hunks)
  • rollup/internal/orm/batch.go (3 hunks)
  • rollup/internal/orm/bundle.go (3 hunks)
  • rollup/internal/orm/orm_test.go (4 hunks)
  • rollup/tests/rollup_test.go (2 hunks)
💤 Files with no reviewable changes (23)
  • prover/rust-toolchain
  • coordinator/cmd/api/app/mock_app.go
  • prover/rustfmt.toml
  • coordinator/internal/config/config.go
  • coordinator/conf/config.json
  • prover/config.json
  • prover/print_halo2gpu_version.sh
  • coordinator/test/api_test.go
  • prover/print_high_zkevm_version.sh
  • coordinator/internal/logic/provertask/prover_task.go
  • prover/Makefile
  • prover/src/config.rs
  • coordinator/internal/logic/verifier/types.go
  • prover/Cargo.toml
  • .github/workflows/prover.yml
  • prover/src/main.rs
  • prover/src/utils.rs
  • prover/src/zk_circuits_handler/common.rs
  • prover/src/types.rs
  • prover/src/zk_circuits_handler.rs
  • prover/src/prover.rs
  • prover/src/zk_circuits_handler/darwin_v2.rs
  • prover/src/zk_circuits_handler/darwin.rs
🧰 Additional context used
🧬 Code Graph Analysis (14)
rollup/internal/controller/relayer/l2_relayer_test.go (1)
common/types/message/message.go (1)
  • OpenVMBundleProof (250-259)
coordinator/internal/logic/provertask/chunk_prover_task.go (1)
common/types/message/message.go (1)
  • EuclidV2ForkNameForProver (17-17)
coordinator/cmd/tool/tool.go (1)
common/types/message/message.go (1)
  • OpenVMBatchProof (190-199)
coordinator/internal/types/auth_test.go (1)
coordinator/internal/types/prover.go (2)
  • ProverType (19-19)
  • ProverTypeOpenVM (42-42)
rollup/tests/rollup_test.go (1)
common/types/message/message.go (2)
  • OpenVMBatchProof (190-199)
  • OpenVMBundleProof (250-259)
coordinator/internal/logic/verifier/verifier_test.go (1)
common/types/message/message.go (2)
  • OpenVMBatchProof (190-199)
  • OpenVMChunkProof (158-166)
coordinator/internal/logic/provertask/bundle_prover_task.go (1)
common/types/message/message.go (2)
  • OpenVMBatchProof (190-199)
  • EuclidV2ForkNameForProver (17-17)
rollup/internal/controller/relayer/l2_relayer.go (3)
common/types/message/message.go (1)
  • OpenVMBundleProof (250-259)
rollup/internal/orm/batch.go (2)
  • Batch (22-72)
  • Batch (80-82)
rollup/internal/orm/chunk.go (2)
  • Chunk (20-64)
  • Chunk (72-74)
coordinator/internal/logic/submitproof/proof_receiver.go (1)
common/types/message/message.go (3)
  • OpenVMChunkProof (158-166)
  • OpenVMBatchProof (190-199)
  • OpenVMBundleProof (250-259)
rollup/internal/orm/batch.go (3)
coordinator/internal/orm/batch.go (2)
  • Batch (18-72)
  • Batch (80-82)
tests/integration-test/orm/batch.go (2)
  • Batch (17-60)
  • Batch (68-70)
common/types/message/message.go (1)
  • OpenVMBatchProof (190-199)
rollup/internal/orm/orm_test.go (1)
common/types/message/message.go (1)
  • OpenVMBundleProof (250-259)
coordinator/test/mock_prover.go (2)
common/types/message/message.go (3)
  • OpenVMChunkProof (158-166)
  • OpenVMBatchProof (190-199)
  • OpenVMProof (146-149)
coordinator/internal/logic/verifier/types.go (1)
  • InvalidTestProof (8-8)
coordinator/internal/logic/verifier/mock.go (2)
coordinator/internal/logic/verifier/types.go (2)
  • Verifier (11-14)
  • InvalidTestProof (8-8)
common/types/message/message.go (3)
  • OpenVMChunkProof (158-166)
  • OpenVMBatchProof (190-199)
  • OpenVMBundleProof (250-259)
coordinator/internal/logic/verifier/verifier.go (2)
coordinator/internal/logic/verifier/types.go (1)
  • Verifier (11-14)
common/types/message/message.go (3)
  • OpenVMBatchProof (190-199)
  • OpenVMChunkProof (158-166)
  • OpenVMBundleProof (250-259)
🪛 golangci-lint (1.64.8)
coordinator/internal/logic/provertask/batch_prover_task.go

257-257: cannot use chunkProofs (variable of type []message.OpenVMChunkProof) as []*message.OpenVMChunkProof value in struct literal

(typecheck)

🪛 GitHub Check: tests
coordinator/internal/logic/provertask/batch_prover_task.go

[failure] 257-257:
cannot use chunkProofs (variable of type []message.OpenVMChunkProof) as []*message.OpenVMChunkProof value in struct literal

coordinator/internal/logic/verifier/mock.go

[failure] 34-34:
proof.VmProof undefined (type *message.OpenVMBundleProof has no field or method VmProof)

🪛 GitHub Actions: Coordinator
coordinator/internal/logic/provertask/batch_prover_task.go

[error] 225-225: Type mismatch error: cannot use chunkProofs (type []*message.OpenVMChunkProof) as []message.OpenVMChunkProof in argument to bp.getBatchTaskDetail

coordinator/internal/logic/verifier/mock.go

[error] 34-34: Compilation error: proof.VmProof undefined (type *message.OpenVMBundleProof has no field or method VmProof)

🪛 GitHub Actions: Integration
coordinator/internal/logic/verifier/mock.go

[error] 34-34: proof.VmProof undefined (type *message.OpenVMBundleProof has no field or method VmProof)

⏰ Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: tests
🔇 Additional comments (28)
coordinator/internal/controller/api/controller.go (1)

29-29: Simplified logging for verifier maps

The logging has been streamlined to only include the OpenVMVkMap, removing references to legacy verification key maps (like ChunkVKMap, BatchVKMap, BundleVkMap) that are no longer needed. This change aligns with the broader refactoring to remove legacy proof types and focus exclusively on OpenVM proofs.

rollup/internal/controller/relayer/l2_relayer_test.go (1)

151-152: Updated to use OpenVMBundleProof instead of legacy proof type

The test now uses the new OpenVMBundleProof struct with a simpler structure, setting only the Vk field. This aligns with the codebase's migration from legacy Halo2 proof abstractions to OpenVM proof types.

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

194-194: Simplified ForkName assignment

The conditional logic for assigning the fork name has been removed, directly setting it to message.EuclidV2ForkNameForProver ("euclidv2"). This simplification is part of the broader refactoring to standardize on the Euclid V2 fork and remove support for legacy circuit versions.

coordinator/internal/types/auth_test.go (2)

25-25: Updated to use OpenVM prover type

Replaced legacy ProverTypeBatch with ProverTypeOpenVM to align with the codebase's migration to exclusively use OpenVM proof types.


67-67: Updated to use OpenVM prover type

Replaced legacy ProverTypeChunk with ProverTypeOpenVM to align with the codebase's migration to exclusively use OpenVM proof types.

rollup/tests/rollup_test.go (2)

150-152: Proof type updated to OpenVMBatchProof

The test is now using the new OpenVMBatchProof type which replaces the legacy Halo2BatchProof type. This change is part of the refactoring to simplify the codebase post-Euclid by removing all legacy proof types.

The new proof type requires only the Vk field compared to the previous implementation that included additional fields like RawProof and Instances.


163-165: Proof type updated to OpenVMBundleProof

Similar to the batch proof change above, the test now uses the simplified OpenVMBundleProof type instead of the legacy Halo2BundleProof. This continues the standardization on OpenVM proof types throughout the codebase.

coordinator/cmd/tool/tool.go (1)

65-73: Updated proof type from BatchProof interface to concrete OpenVMBatchProof

The code now uses a slice of concrete *message.OpenVMBatchProof types instead of an interface type. This change:

  1. Simplifies the code by removing the need for factory functions that handle different proof types
  2. Makes the type more explicit, improving code readability
  3. Aligns with the broader refactoring to eliminate legacy proof abstractions

The instantiation is also simplified by directly creating an empty struct rather than relying on a factory function that took fork information as a parameter.

rollup/internal/orm/orm_test.go (2)

454-464: Test updated to use OpenVMBundleProof

The test now uses the new OpenVMBundleProof type instead of the legacy Halo2BundleProof type. The assertion is also updated to use the Proof() method rather than accessing internal fields directly, following good object-oriented practices of encapsulation.

This test update ensures proper verification of the database ORM layer with the new proof types.


475-490: Updated test case for UpdateProofAndProvingStatusByHash

The test for UpdateProofAndProvingStatusByHash now properly uses the OpenVMBundleProof type and its associated methods. This ensures that proof persistence and retrieval work correctly with the new proof structure.

The change maintains the same test verification logic while adapting to the new proof type interface.

coordinator/internal/logic/submitproof/proof_receiver.go (3)

174-178: Simplified chunk proof creation

The code now directly instantiates an OpenVMChunkProof instead of using a factory function that required hard fork information. This simplification:

  1. Removes conditional logic based on hard fork names
  2. Makes the code more straightforward and easier to understand
  3. Aligns with the broader refactoring to use OpenVM proof types exclusively

The hard fork name is still used for verification later, maintaining compatibility with the verification process.


180-185: Simplified batch proof creation

Similar to the chunk proof change, the code now directly creates an OpenVMBatchProof instead of using a factory function. This continues the pattern of simplification across all proof types.

The proof unmarshalling and verification process remains unchanged, ensuring that functionality is preserved while the code structure is improved.


186-191: Simplified bundle proof creation

Completing the pattern, bundle proof creation is also simplified to use direct instantiation of OpenVMBundleProof. This change maintains consistency with the other proof type changes.

This refactoring successfully removes all legacy proof factory functions while maintaining the core verification functionality.

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

214-216: Hard-coding the fork name may break future forks

ForkName is now hard-coded to message.EuclidV2ForkNameForProver, ignoring hardForkName derived earlier.
If another fork is enabled, bundle provers will still advertise euclidv2, leading to mismatched VK selection or verification failure.

Consider:

-		ForkName:    message.EuclidV2ForkNameForProver,
+		ForkName:    hardForkName,

(or document why the constant is always correct).

coordinator/internal/types/prover.go (1)

46-53: MakeProverType still returns deprecated variants

ProofTypeBundle/Batch map to ProverTypeBatchDeprecated, and ProofTypeChunk maps to ProverTypeChunkDeprecated.
If the intention is to phase these out in favour of ProverTypeOpenVM, update the mapping (or add a TODO) to avoid propagating “deprecated” types throughout new code paths.

rollup/internal/controller/relayer/l2_relayer.go (3)

729-729: Type change from interface to concrete type

Changed aggProof from message.BundleProof interface to a pointer to the concrete message.OpenVMBundleProof struct. This aligns with the broader refactoring to remove legacy proof interfaces and standardize on OpenVM proof types.


1052-1052: Parameter type changed to pointer to concrete type

Changed parameter type from message.BundleProof interface to *message.OpenVMBundleProof. This completes the refactoring to remove legacy proof types across the codebase.


1080-1080: Parameter type changed to pointer to concrete type

Changed parameter type from message.BundleProof interface to *message.OpenVMBundleProof. This completes the refactoring to remove legacy proof types across the codebase.

rollup/internal/orm/batch.go (3)

124-124: Return type changed from interface to concrete pointer type

Changed return type from message.BatchProof interface to *message.OpenVMBatchProof. This change is part of the broader refactoring to remove legacy proof interfaces in favor of concrete OpenVM proof types.


135-135: Variable type changed to pointer to concrete type

Changed variable declaration from using the interface type to using a pointer to the concrete message.OpenVMBatchProof struct. This change aligns with the return type modification and simplifies the implementation.


439-439: Parameter type changed to pointer to concrete type

Changed parameter type from message.BatchProof interface to *message.OpenVMBatchProof. This change completes the refactoring to use concrete OpenVM proof types throughout the codebase.

rollup/internal/orm/bundle.go (3)

137-137: Return type changed from interface to concrete pointer type

Changed return type from message.BundleProof interface to *message.OpenVMBundleProof. This change aligns with the broader refactoring to remove legacy proof interfaces in favor of concrete OpenVM proof types.


148-148: Variable type changed to pointer to concrete type

Changed variable declaration from using the interface type to using a pointer to the concrete message.OpenVMBundleProof struct. This aligns with the return type modification and simplifies the implementation.


259-259: Parameter type changed to pointer to concrete type

Changed parameter type from message.BundleProof interface to *message.OpenVMBundleProof. This change completes the refactoring to use concrete OpenVM proof types throughout the codebase.

coordinator/internal/logic/verifier/mock.go (3)

13-13: Simplified NewVerifier function return

The function now only returns the Verifier with configuration, removing the previously returned verification key maps that were used for legacy proof types. This simplification aligns with the removal of legacy proof abstractions.


17-18: Parameter type changed and condition updated for OpenVM proof

Changed parameter type from message.ChunkProof to *message.OpenVMChunkProof and updated the condition to check for invalid proof by examining proof.VmProof.Proof.


25-26: Parameter type changed and condition updated for OpenVM proof

Changed parameter type from message.BatchProof to *message.OpenVMBatchProof and updated the condition to check for invalid proof by examining proof.VmProof.Proof.

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

225-229: Update call after type fix

After changing the parameter type of getBatchTaskDetail (next comment), the call site stays valid, but ensure you re-run go vet to confirm no further mismatches remain.

🧰 Tools
🪛 golangci-lint (1.64.8)

225-225: cannot use chunkProofs (variable of type []*message.OpenVMChunkProof) as []message.OpenVMChunkProof value in argument to bp.getBatchTaskDetail

(typecheck)

🪛 GitHub Check: tests

[failure] 225-225:
cannot use chunkProofs (variable of type []*message.OpenVMChunkProof) as []message.OpenVMChunkProof value in argument to bp.getBatchTaskDetail

🪛 GitHub Actions: Coordinator

[error] 225-225: Type mismatch error: cannot use chunkProofs (type []*message.OpenVMChunkProof) as []message.OpenVMChunkProof in argument to bp.getBatchTaskDetail

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

🧹 Nitpick comments (2)
CONTRIBUTING.md (1)

14-14: Fix grammar and improve clarity in the new contribution guideline sentence.

The sentence is currently a bit long, contains a stray “to” (“contribute to by adding…”), and is missing punctuation. Consider splitting it and tightening the wording for readability:

-Did you know there are many ways of contributing to Scroll? If you are looking to contribute to by adding Scroll to existing Dev Tools or by doing integrations please go to the [Contribute to Scroll](https://github.com/scroll-tech/contribute-to-scroll) repo instead. This repository covers the Scroll infrastructure and smart contracts, if you want to contribute to these areas continue reading this document.
+Did you know there are many ways to contribute to Scroll? If you're looking to add Scroll to existing Dev Tools or integrations, please go to the [Contribute to Scroll](https://github.com/scroll-tech/contribute-to-scroll) repo instead.
+
+This repository covers the Scroll infrastructure and smart contracts. If you want to contribute to these areas, continue reading this document.
🧰 Tools
🪛 LanguageTool

[typographical] ~14-~14: It seems that a comma is missing.
Context: ...sting Dev Tools or by doing integrations please go to the [Contribute to Scroll](https:...

(IF_PLEASE_COMMA)


[uncategorized] ~14-~14: A comma might be missing here.
Context: ...cts, if you want to contribute to these areas continue reading this document. ## Iss...

(AI_EN_LECTOR_MISSING_PUNCTUATION_COMMA)

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

260-265: Return a typed constant instead of a raw string & keep room for future forks

The fork gate keeps only EuclidV2Fork; all other values throw an error, which is fine today but brittle for future forks and hard-codes the log level to Error.

Consider using a switch with explicit typed constants and logging unknown forks at Warn before erroring. This makes the intent clearer and easier to extend.

📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 10160c2 and 5c2b781.

📒 Files selected for processing (5)
  • CONTRIBUTING.md (1 hunks)
  • coordinator/internal/logic/provertask/batch_prover_task.go (2 hunks)
  • coordinator/internal/logic/verifier/mock.go (1 hunks)
  • coordinator/internal/logic/verifier/verifier.go (3 hunks)
  • coordinator/test/api_test.go (3 hunks)
🚧 Files skipped from review as they are similar to previous changes (3)
  • coordinator/test/api_test.go
  • coordinator/internal/logic/verifier/mock.go
  • coordinator/internal/logic/verifier/verifier.go
🧰 Additional context used
🪛 LanguageTool
CONTRIBUTING.md

[typographical] ~14-~14: It seems that a comma is missing.
Context: ...sting Dev Tools or by doing integrations please go to the [Contribute to Scroll](https:...

(IF_PLEASE_COMMA)


[uncategorized] ~14-~14: A comma might be missing here.
Context: ...cts, if you want to contribute to these areas continue reading this document. ## Iss...

(AI_EN_LECTOR_MISSING_PUNCTUATION_COMMA)

⏰ Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: tests
🔇 Additional comments (1)
coordinator/internal/logic/provertask/batch_prover_task.go (1)

210-221: Defensive-check proof.MetaData to prevent panics

proof.MetaData (and the nested ChunkInfo) originate from external JSON and may legally be null.
Dereferencing it without a check will panic and crash the coordinator.

if proof.MetaData == nil || proof.MetaData.ChunkInfo == nil {
    return nil, fmt.Errorf("missing MetaData in chunk proof, taskID:%s chunkHash:%s", task.TaskID, chunk.Hash)
}

Place the guard before constructing chunkInfo.

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

🔭 Outside diff range comments (1)
rollup/tests/rollup_test.go (1)

176-176: ⚠️ Potential issue

Variable 'bundleProof' is used but not defined.

This line references a variable bundleProof that is not defined in the visible code. It should use the proof variable defined on line 172.

-	err = bundleOrm.UpdateProofAndProvingStatusByHash(context.Background(), bundle.Hash, bundleProof, types.ProvingTaskVerified, 100)
+	err = bundleOrm.UpdateProofAndProvingStatusByHash(context.Background(), bundle.Hash, proof, types.ProvingTaskVerified, 100)
🧰 Tools
🪛 golangci-lint (1.64.8)

176-176: undefined: bundleProof

(typecheck)

📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between cca9087 and 6ee5fa1.

📒 Files selected for processing (14)
  • coordinator/cmd/api/app/mock_app.go (1 hunks)
  • coordinator/internal/config/config.go (0 hunks)
  • coordinator/internal/logic/verifier/types.go (1 hunks)
  • coordinator/internal/logic/verifier/verifier.go (3 hunks)
  • coordinator/internal/logic/verifier/verifier_test.go (2 hunks)
  • coordinator/test/api_test.go (13 hunks)
  • coordinator/test/mock_prover.go (2 hunks)
  • rollup/internal/controller/relayer/l2_relayer.go (3 hunks)
  • rollup/internal/controller/relayer/l2_relayer_test.go (1 hunks)
  • rollup/internal/orm/batch.go (3 hunks)
  • rollup/internal/orm/bundle.go (3 hunks)
  • rollup/internal/orm/orm_test.go (4 hunks)
  • rollup/tests/bridge_test.go (1 hunks)
  • rollup/tests/rollup_test.go (3 hunks)
💤 Files with no reviewable changes (1)
  • coordinator/internal/config/config.go
✅ Files skipped from review due to trivial changes (1)
  • rollup/tests/bridge_test.go
🚧 Files skipped from review as they are similar to previous changes (10)
  • coordinator/cmd/api/app/mock_app.go
  • rollup/internal/controller/relayer/l2_relayer_test.go
  • coordinator/internal/logic/verifier/types.go
  • coordinator/test/mock_prover.go
  • coordinator/internal/logic/verifier/verifier_test.go
  • rollup/internal/orm/orm_test.go
  • rollup/internal/orm/batch.go
  • rollup/internal/controller/relayer/l2_relayer.go
  • coordinator/test/api_test.go
  • rollup/internal/orm/bundle.go
🧰 Additional context used
🧬 Code Graph Analysis (2)
coordinator/internal/logic/verifier/verifier.go (2)
coordinator/internal/logic/verifier/types.go (1)
  • Verifier (11-14)
common/types/message/message.go (3)
  • OpenVMBatchProof (190-199)
  • OpenVMChunkProof (158-166)
  • OpenVMBundleProof (250-259)
rollup/tests/rollup_test.go (1)
common/types/message/message.go (3)
  • OpenVMBatchProof (190-199)
  • OpenVMBundleProof (250-259)
  • OpenVMEvmProof (152-155)
🪛 golangci-lint (1.64.8)
rollup/tests/rollup_test.go

172-172: declared and not used: proof

(typecheck)

⏰ Context from checks skipped due to timeout of 90000ms (4)
  • GitHub Check: tests
  • GitHub Check: tests
  • GitHub Check: tests
  • GitHub Check: tests
🔇 Additional comments (11)
coordinator/internal/logic/verifier/verifier.go (7)

93-94: Method signature refactored to use OpenVM-specific proof type

The update to use *message.OpenVMBatchProof instead of the previous proof type is consistent with the PR objective to remove legacy Halo2 prover logic and simplify to OpenVM-only. The implementation correctly handles marshaling and verification with the updated type.


112-113: Method signature refactored to use OpenVM-specific proof type

The update to use *message.OpenVMChunkProof instead of the previous proof type is consistent with the PR objective to remove legacy Halo2 prover logic and simplify to OpenVM-only. The implementation correctly handles marshaling and verification with the updated type.


132-132: Method signature refactored to use OpenVM-specific proof type

The update to use *message.OpenVMBundleProof instead of the previous proof type is consistent with the PR objective to remove legacy Halo2 prover logic and simplify to OpenVM-only. The implementation correctly handles marshaling and verification with the updated type.


46-48: Rust configuration structure simplified

The rustVerifierConfig struct has been correctly simplified to remove the LowVersionCircuit field, retaining only the HighVersionCircuit configuration. This matches the overall goal of removing the legacy prover logic.


50-54: Rust verifier configuration constructor simplified

The configuration constructor now only initializes the high version circuit configuration, which is consistent with the removal of low version circuit functionality. This simplification aligns with the refactoring objective.


62-91: Verifier initialization focused on OpenVM

The NewVerifier function has been simplified to only initialize and load OpenVM verification keys for Euclid and EuclidV2 forks, removing all low version circuit and mock mode handling. This streamlined approach aligns perfectly with the PR's objective to simplify coordinator logic post-Euclid.


162-194: Retained OpenVM verification key loading logic

The loadOpenVMVks function has been preserved while removing legacy key loading methods. This function correctly handles the loading of verification keys from the Rust library and populates the OpenVMVkMap for verification.

rollup/tests/rollup_test.go (4)

151-154: Correctly updated to use OpenVMBatchProof.

The code has been successfully refactored to use the new OpenVM proof types, replacing the legacy Halo2 proof types. The monkey-patching for the SanityCheck method remains consistent with the old implementation.


156-156: LGTM: Successfully updated batch proof initialization.

The initialization has been properly updated to use the new OpenVMBatchProof type.


167-170: Successfully updated to use OpenVMBundleProof.

The monkey-patching implementation has been correctly updated to use the new OpenVMBundleProof type.


11-11: LGTM: Import maintained appropriately.

The gomonkey import is correctly maintained, which is necessary for the monkey-patching used to override the SanityCheck methods.

@colinlyguo colinlyguo force-pushed the refactor-simplify-coordinator branch 3 times, most recently from 4dd5b28 to c08f005 Compare May 8, 2025 13:08
@colinlyguo colinlyguo changed the title [DO NOT MERGE] rafactor(coordinator): simplify logic post-Euclid rafactor(coordinator): simplify logic post-Euclid May 8, 2025
@colinlyguo colinlyguo force-pushed the refactor-simplify-coordinator branch from c08f005 to 05c07a6 Compare May 8, 2025 13:16
@colinlyguo colinlyguo force-pushed the refactor-simplify-coordinator branch from 05c07a6 to 62bb661 Compare May 8, 2025 13:19
@Thegaram Thegaram changed the title rafactor(coordinator): simplify logic post-Euclid refactor(coordinator): simplify logic post-Euclid May 8, 2025
Thegaram
Thegaram previously approved these changes May 8, 2025
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)
CONTRIBUTING.md (1)

14-14: Punctuation nit: add missing commas and improve sentence flow
The sentence at line 14 combines several clauses without proper separators, which can make it harder to read. Splitting into shorter sentences and inserting commas will clarify the intent.

- If you are looking to contribute by adding Scroll to existing Dev Tools or by doing integrations please go to the [Contribute to Scroll](https://github.com/scroll-tech/contribute-to-scroll) repo instead. This repository covers the Scroll infrastructure and smart contracts, if you want to contribute to these areas continue reading this document.
+ If you are looking to contribute by adding Scroll to existing Dev Tools or by doing integrations, please go to the [Contribute to Scroll](https://github.com/scroll-tech/contribute-to-scroll) repo instead.  
+ This repository covers the Scroll infrastructure and smart contracts. If you want to contribute to these areas, continue reading this document.
🧰 Tools
🪛 LanguageTool

[typographical] ~14-~14: It seems that a comma is missing.
Context: ...sting Dev Tools or by doing integrations please go to the [Contribute to Scroll](https:...

(IF_PLEASE_COMMA)


[uncategorized] ~14-~14: A comma might be missing here.
Context: ...cts, if you want to contribute to these areas continue reading this document. ## Iss...

(AI_EN_LECTOR_MISSING_PUNCTUATION_COMMA)

📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 658f003 and d00a4ec.

⛔ Files ignored due to path filters (1)
  • prover/Cargo.lock is excluded by !**/*.lock
📒 Files selected for processing (48)
  • .github/workflows/prover.yml (0 hunks)
  • CONTRIBUTING.md (1 hunks)
  • common/libzkp/impl/src/lib.rs (0 hunks)
  • common/types/message/message.go (1 hunks)
  • common/version/version.go (1 hunks)
  • coordinator/cmd/api/app/mock_app.go (1 hunks)
  • coordinator/cmd/tool/tool.go (1 hunks)
  • coordinator/conf/config.json (1 hunks)
  • coordinator/internal/config/config.go (0 hunks)
  • coordinator/internal/config/config_test.go (1 hunks)
  • coordinator/internal/controller/api/controller.go (1 hunks)
  • coordinator/internal/logic/auth/login.go (1 hunks)
  • coordinator/internal/logic/provertask/batch_prover_task.go (2 hunks)
  • coordinator/internal/logic/provertask/bundle_prover_task.go (3 hunks)
  • coordinator/internal/logic/provertask/chunk_prover_task.go (1 hunks)
  • coordinator/internal/logic/provertask/prover_task.go (0 hunks)
  • coordinator/internal/logic/submitproof/proof_receiver.go (1 hunks)
  • coordinator/internal/logic/verifier/mock.go (1 hunks)
  • coordinator/internal/logic/verifier/types.go (1 hunks)
  • coordinator/internal/logic/verifier/verifier.go (3 hunks)
  • coordinator/internal/logic/verifier/verifier_test.go (2 hunks)
  • coordinator/internal/types/auth_test.go (2 hunks)
  • coordinator/internal/types/prover.go (3 hunks)
  • coordinator/test/api_test.go (13 hunks)
  • coordinator/test/mock_prover.go (2 hunks)
  • prover/Cargo.toml (0 hunks)
  • prover/Makefile (0 hunks)
  • prover/config.json (0 hunks)
  • prover/print_halo2gpu_version.sh (0 hunks)
  • prover/print_high_zkevm_version.sh (0 hunks)
  • prover/rust-toolchain (0 hunks)
  • prover/rustfmt.toml (0 hunks)
  • prover/src/config.rs (0 hunks)
  • prover/src/main.rs (0 hunks)
  • prover/src/prover.rs (0 hunks)
  • prover/src/types.rs (0 hunks)
  • prover/src/utils.rs (0 hunks)
  • prover/src/zk_circuits_handler.rs (0 hunks)
  • prover/src/zk_circuits_handler/common.rs (0 hunks)
  • prover/src/zk_circuits_handler/darwin.rs (0 hunks)
  • prover/src/zk_circuits_handler/darwin_v2.rs (0 hunks)
  • rollup/internal/controller/relayer/l2_relayer.go (3 hunks)
  • rollup/internal/controller/relayer/l2_relayer_test.go (1 hunks)
  • rollup/internal/orm/batch.go (3 hunks)
  • rollup/internal/orm/bundle.go (3 hunks)
  • rollup/internal/orm/orm_test.go (4 hunks)
  • rollup/tests/bridge_test.go (1 hunks)
  • rollup/tests/rollup_test.go (3 hunks)
💤 Files with no reviewable changes (20)
  • prover/rust-toolchain
  • coordinator/internal/config/config.go
  • prover/print_high_zkevm_version.sh
  • coordinator/internal/logic/provertask/prover_task.go
  • common/libzkp/impl/src/lib.rs
  • prover/rustfmt.toml
  • prover/src/config.rs
  • prover/Cargo.toml
  • prover/src/zk_circuits_handler/common.rs
  • prover/config.json
  • prover/src/main.rs
  • prover/print_halo2gpu_version.sh
  • prover/Makefile
  • prover/src/utils.rs
  • prover/src/types.rs
  • .github/workflows/prover.yml
  • prover/src/zk_circuits_handler.rs
  • prover/src/zk_circuits_handler/darwin_v2.rs
  • prover/src/prover.rs
  • prover/src/zk_circuits_handler/darwin.rs
✅ Files skipped from review due to trivial changes (1)
  • common/version/version.go
🚧 Files skipped from review as they are similar to previous changes (23)
  • coordinator/internal/controller/api/controller.go
  • coordinator/cmd/api/app/mock_app.go
  • rollup/tests/bridge_test.go
  • coordinator/conf/config.json
  • coordinator/internal/logic/provertask/chunk_prover_task.go
  • coordinator/internal/types/auth_test.go
  • coordinator/internal/logic/verifier/types.go
  • rollup/tests/rollup_test.go
  • rollup/internal/orm/orm_test.go
  • rollup/internal/controller/relayer/l2_relayer_test.go
  • coordinator/internal/logic/submitproof/proof_receiver.go
  • coordinator/cmd/tool/tool.go
  • coordinator/internal/logic/verifier/verifier_test.go
  • coordinator/internal/types/prover.go
  • coordinator/internal/logic/auth/login.go
  • rollup/internal/orm/batch.go
  • rollup/internal/orm/bundle.go
  • common/types/message/message.go
  • coordinator/test/api_test.go
  • coordinator/test/mock_prover.go
  • rollup/internal/controller/relayer/l2_relayer.go
  • coordinator/internal/logic/verifier/mock.go
  • coordinator/internal/logic/provertask/batch_prover_task.go
🧰 Additional context used
🧬 Code Graph Analysis (2)
coordinator/internal/logic/provertask/bundle_prover_task.go (2)
common/types/message/message.go (1)
  • OpenVMBatchProof (190-199)
coordinator/internal/types/auth.go (1)
  • Hash (134-141)
coordinator/internal/logic/verifier/verifier.go (2)
coordinator/internal/logic/verifier/types.go (1)
  • Verifier (11-14)
common/types/message/message.go (3)
  • OpenVMBatchProof (190-199)
  • OpenVMChunkProof (158-166)
  • OpenVMBundleProof (250-259)
🪛 LanguageTool
CONTRIBUTING.md

[typographical] ~14-~14: It seems that a comma is missing.
Context: ...sting Dev Tools or by doing integrations please go to the [Contribute to Scroll](https:...

(IF_PLEASE_COMMA)


[uncategorized] ~14-~14: A comma might be missing here.
Context: ...cts, if you want to contribute to these areas continue reading this document. ## Iss...

(AI_EN_LECTOR_MISSING_PUNCTUATION_COMMA)

🔇 Additional comments (7)
coordinator/internal/config/config_test.go (1)

18-27: Configuration structure simplification looks good.

The updated test configuration correctly reflects the removal of halo2 prover logic and focuses solely on the openvm prover, with appropriate settings for the new external_prover_threshold and bundle_collection_time_sec fields. The nested high_version_circuit structure provides a cleaner organization for verifier configurations.

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

203-210: Good simplification of proof types.

Replacing generic message.BatchProof interfaces with concrete *message.OpenVMBatchProof types simplifies the codebase and makes the intent clearer. This change aligns well with the PR's goal of removing legacy proof abstractions.


218-221: Improved error handling for unsupported fork names.

Adding explicit error handling for unsupported fork names is a good improvement. This ensures that only the supported euclidV2 fork name is accepted, preventing potential issues with invalid configurations.


231-231: Simplified MsgQueueHash assignment.

The MsgQueueHash field is now unconditionally assigned, which simplifies the code by removing conditional logic. This is consistent with the PR's goal of simplifying the coordinator logic.

coordinator/internal/logic/verifier/verifier.go (3)

93-94: Improved type safety with concrete OpenVM proof types.

Changing the parameter type from the generic message.BatchProof interface to the concrete *message.OpenVMBatchProof type improves type safety and makes the expected input clearer. This change aligns with the PR's goal of simplifying the codebase by standardizing on OpenVM proof types.


112-113: Consistent use of concrete OpenVM proof types.

Similar to the batch proof verification, using the concrete *message.OpenVMChunkProof type instead of the interface improves type safety and clarity. This is a good change that reinforces the standardization on OpenVM proof types.


132-132: Standardized on OpenVM bundle proof type.

Changing to the concrete *message.OpenVMBundleProof type completes the standardization of proof types across all verification methods. This is consistent with the other changes and improves the overall cohesion of the codebase.

@colinlyguo colinlyguo requested a review from Thegaram May 8, 2025 15:19
@colinlyguo colinlyguo requested a review from georgehao May 11, 2025 15:45
@colinlyguo colinlyguo merged commit fedfa04 into develop May 16, 2025
15 checks passed
@colinlyguo colinlyguo deleted the refactor-simplify-coordinator branch May 16, 2025 15:37
@coderabbitai coderabbitai bot mentioned this pull request Jun 27, 2025
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.

4 participants