Skip to content

feat: openvm v0.3.0 #1648

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 22 commits into from
Apr 24, 2025
Merged

Conversation

colinlyguo
Copy link
Member

@colinlyguo colinlyguo commented Apr 18, 2025

Purpose or design rationale of this PR

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:

  • feat: A new feature

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

  • Chores

    • Updated dependency versions for improved compatibility and consistency.
    • Added configuration files and scripts to streamline Docker build and environment setup for the coordinator API, including local dependency overrides and Git URL rewrites.
    • Enhanced CI workflow with SSH key injection for secure repository access during builds.
    • Updated application version to v4.5.7.
  • Bug Fixes

    • Improved batch retrieval logic to exclude finalized batches and updated related test expectations.

Copy link

coderabbitai bot commented Apr 18, 2025

Walkthrough

This change updates dependency versions in several Rust project configuration files, specifically upgrading euclid_prover, euclid_verifier, and multiple p3-* crates to newer versions. It introduces a new Docker build configuration for the coordinator API, including a config.toml for patching openvm-gpu dependencies, a Git configuration to enforce HTTPS for GitHub, and a shell script to clone and checkout a specific commit of the openvm-gpu repository. Additionally, a GitHub Actions workflow is updated to provide SSH key access for Docker builds. The ORM layer's batch query is refined, and its corresponding test is updated.

Changes

Files/Paths Change Summary
common/libzkp/impl/Cargo.toml, zkvm-prover/Cargo.toml Updated dependency versions for euclid_prover, euclid_verifier (to v0.3.0), and all p3-* crates (to v0.1.1).
build/dockerfiles/coordinator-api/config.toml Added a new config file to patch openvm-gpu dependencies to local paths with specific feature flags for Docker builds.
build/dockerfiles/coordinator-api/gitconfig Added a new Git configuration file to rewrite GitHub SSH URLs to HTTPS.
build/dockerfiles/coordinator-api/init-openvm.sh Added a new shell script to clone and checkout a fixed commit of the openvm-gpu repository for environment setup.
.github/workflows/docker.yml Added a new step to the coordinator-api job to inject an SSH private key using the webfactory/ssh-agent GitHub Action; enabled SSH forwarding during Docker build.
build/dockerfiles/coordinator-api.Dockerfile Added copying of openvm-gpu, gitconfig, and config.toml files into the Docker build stages for local patching during Docker builds.
rollup/internal/orm/batch.go Refined SQL query in GetCommittedBatchesGEIndexGECodecVersion to exclude finalized batches; updated method comment for clarity.
rollup/internal/orm/orm_test.go Updated test to expect zero batches returned for a specific query, removing prior assertions about batch content and statuses.
common/version/version.go Updated version tag string from "v4.5.6" to "v4.5.7".
.github/workflows/common.yml Added SSH agent setup step to the check job to load a private SSH key from secrets for private repository access during CI runs.

Sequence Diagram(s)

sequenceDiagram
    participant GitHub Actions
    participant SSH Agent
    participant Docker Build
    participant Shell Script
    participant GitHub Repo

    GitHub Actions->>SSH Agent: Set up SSH key (webfactory/ssh-agent)
    GitHub Actions->>Docker Build: Start Docker build for coordinator-api
    Docker Build->>Shell Script: Run init-openvm.sh
    Shell Script->>GitHub Repo: Clone openvm-gpu at specific commit via SSH
    Shell Script-->>Docker Build: openvm-gpu ready at fixed commit
    Docker Build-->>GitHub Actions: Build completes with patched dependencies
Loading

Possibly related PRs

  • feat: euclid v1 GPU prover #1608: Updates dependencies in zkvm-prover/Cargo.toml for GPU-enabled prover crates, similar to this PR's focus on dependency version management for prover components.
  • fix(build): image building #1603: Also updates the version tag in common/version/version.go and manages dependency versions, showing related version bump practices.

Suggested reviewers

  • colinlyguo
  • georgehao
  • jonastheis

Poem

In the warren where code does hop,
New crates and configs make the build non-stop.
With versions bumped and scripts anew,
The Docker bunnies know just what to do.
SSH or HTTPS, the repo’s in sight—
The openvm-gpu is fetched just right!
🐇✨


📜 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 cdae92b and 44babd3.

📒 Files selected for processing (1)
  • .github/workflows/docker.yml (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • .github/workflows/docker.yml
⏰ Context from checks skipped due to timeout of 90000ms (17)
  • GitHub Check: rollup_relayer
  • GitHub Check: rollup-db-cli
  • GitHub Check: gas_oracle
  • GitHub Check: coordinator-cron
  • GitHub Check: bridgehistoryapi-db-cli
  • GitHub Check: coordinator-api
  • GitHub Check: bridgehistoryapi-fetcher
  • GitHub Check: bridgehistoryapi-api
  • GitHub Check: tests
  • GitHub Check: check
  • GitHub Check: tests
  • GitHub Check: tests
  • GitHub Check: tests
  • GitHub Check: check
  • GitHub Check: tests
  • GitHub Check: check
  • GitHub Check: check

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.

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 Apr 18, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 40.75%. Comparing base (3ac69be) to head (44babd3).

Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #1648   +/-   ##
========================================
  Coverage    40.75%   40.75%           
========================================
  Files          225      225           
  Lines        18416    18417    +1     
========================================
+ Hits          7505     7506    +1     
  Misses       10176    10176           
  Partials       735      735           
Flag Coverage Δ
common 28.51% <ø> (ø)
coordinator 34.41% <ø> (ø)
database 42.05% <ø> (ø)
rollup 49.27% <100.00%> (+0.01%) ⬆️

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: 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 e80f030 and 9530ea0.

⛔ Files ignored due to path filters (2)
  • common/libzkp/impl/Cargo.lock is excluded by !**/*.lock
  • zkvm-prover/Cargo.lock is excluded by !**/*.lock
📒 Files selected for processing (3)
  • common/libzkp/impl/Cargo.toml (1 hunks)
  • common/version/version.go (1 hunks)
  • zkvm-prover/Cargo.toml (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (7)
  • GitHub Check: tests
  • GitHub Check: tests
  • GitHub Check: tests
  • GitHub Check: check
  • GitHub Check: tests
  • GitHub Check: check
  • GitHub Check: check
🔇 Additional comments (2)
common/version/version.go (1)

8-8: Version bump is correct and consistent.

The tag variable has been updated from "v4.5.5" to "v4.5.6" to align with the coordinated release of dependencies. No logic changes were introduced.

zkvm-prover/Cargo.toml (1)

21-21:

✅ Verification successful

Ensure the bumped tag is available upstream.

The scroll-zkvm-prover-euclid dependency tag is updated to v0.3.0. Please verify that this tag exists in the zkvm-prover repository. Additionally, if this crate is published separately, consider bumping its own version = "0.1.0" field to reflect the dependency changes.


🏁 Script executed:

#!/bin/bash
# Verify that v0.3.0 tag exists in zkvm-prover repo
git ls-remote --tags https://github.com/scroll-tech/zkvm-prover.git | grep -q 'refs/tags/v0.3.0$' \
  && echo "Tag v0.3.0 found" \
  || { echo "ERROR: Tag v0.3.0 not found"; exit 1; }

Length of output: 142


Verified upstream tag exists
Tag v0.3.0 was found in the scroll-tech/zkvm-prover repository. No further changes are required here.
Note: the scroll-zkvm-prover-euclid entry is just a git‑sourced dependency alias, so there’s no local crate version to bump.

yiweichi
yiweichi previously approved these changes Apr 18, 2025
@colinlyguo colinlyguo requested a review from Velaciela April 18, 2025 09:33
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 (4)
build/dockerfiles/coordinator-api.Dockerfile (4)

14-15: Automate and verify openvm‑gpu initialization
Relying on an external init-openvm.sh script increases fragility and manual steps. Consider embedding a RUN step to clone or checkout the openvm-gpu repo at the pinned commit directly in this Dockerfile so builds are self‑contained. Also ensure coordinator-api/init-openvm.sh is versioned and reachable in the build context, or remove the reference if fully automated.


16-16: Minimize Docker context and improve caching
Copying the entire openvm-gpu directory can bloat the build context and invalidate cache on any file change. Use a tailored .dockerignore to exclude unneeded files (tests, docs, large assets) or fetch only the required subset via a git clone --depth=1 in a RUN step to keep layers lean.


17-17: Scope Git URL rewrite to avoid global side effects
Overwriting /root/.gitconfig applies URL rewrites globally across all future Git commands in this container. Instead, limit the rewrite to this build stage by injecting the config via RUN git config --global ... or by mounting it only when needed, reducing the risk of unintended behavior in downstream stages.


18-18: Ensure Cargo config directory exists and leverage CARGO_HOME
Before copying config.toml, add RUN mkdir -p /root/.cargo or set ENV CARGO_HOME=/root/.cargo at the top of this stage. Then use COPY coordinator-api/config.toml $CARGO_HOME/config.toml for consistency and clarity.

📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 093efb0 and ce89701.

📒 Files selected for processing (4)
  • build/dockerfiles/coordinator-api.Dockerfile (1 hunks)
  • build/dockerfiles/coordinator-api/config.toml (1 hunks)
  • build/dockerfiles/coordinator-api/gitconfig (1 hunks)
  • build/dockerfiles/coordinator-api/init-openvm.sh (1 hunks)
✅ Files skipped from review due to trivial changes (3)
  • build/dockerfiles/coordinator-api/gitconfig
  • build/dockerfiles/coordinator-api/config.toml
  • build/dockerfiles/coordinator-api/init-openvm.sh
⏰ Context from checks skipped due to timeout of 90000ms (9)
  • GitHub Check: tests
  • GitHub Check: tests
  • GitHub Check: tests
  • GitHub Check: tests
  • GitHub Check: check
  • GitHub Check: check
  • GitHub Check: check
  • GitHub Check: check
  • GitHub Check: tests

@colinlyguo colinlyguo requested a review from yiweichi April 21, 2025 09:11
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 d35bd7b and ef9be09.

📒 Files selected for processing (1)
  • .github/workflows/docker.yml (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (9)
  • GitHub Check: tests
  • GitHub Check: tests
  • GitHub Check: tests
  • GitHub Check: check
  • GitHub Check: check
  • GitHub Check: check
  • GitHub Check: check
  • GitHub Check: tests
  • GitHub Check: tests

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 (1)
build/dockerfiles/coordinator-api.Dockerfile (1)

12-15: Clarify initialization of openvm‑gpu patch files
The inline comment on lines 12 and 19 reminds users to run init-openvm.sh, but it can be overlooked or become outdated if the script location moves. Consider relocating this guidance to your top‑level README or adding a fail‑fast check in the Dockerfile that explicitly errors if /openvm-gpu is missing.

📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between c2d5431 and 364c5aa.

📒 Files selected for processing (2)
  • .github/workflows/docker.yml (1 hunks)
  • build/dockerfiles/coordinator-api.Dockerfile (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • .github/workflows/docker.yml
⏰ Context from checks skipped due to timeout of 90000ms (17)
  • GitHub Check: coordinator-cron
  • GitHub Check: coordinator-api
  • GitHub Check: bridgehistoryapi-db-cli
  • GitHub Check: gas_oracle
  • GitHub Check: rollup-db-cli
  • GitHub Check: bridgehistoryapi-api
  • GitHub Check: rollup_relayer
  • GitHub Check: bridgehistoryapi-fetcher
  • GitHub Check: tests
  • GitHub Check: tests
  • GitHub Check: tests
  • GitHub Check: tests
  • GitHub Check: check
  • GitHub Check: check
  • GitHub Check: check
  • GitHub Check: check
  • GitHub Check: tests

@colinlyguo
Copy link
Member Author

the common CI failure will be resolved in next circuit release.

yiweichi
yiweichi previously approved these changes Apr 24, 2025
@colinlyguo colinlyguo added the bump-version Bump the version tag for deployment label Apr 24, 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)
.github/workflows/common.yml (1)

45-48: Verify necessity and improve SSH configuration

The Setup SSH for private repos step correctly loads the SSH key for accessing openvm-gpu, but please ensure the following:

  1. The OPENVM_GPU_SSH_PRIVATE_KEY secret exists in repo settings and is scoped read-only.
  2. Add GitHub’s host key to known_hosts to prevent host verification prompts:
    - name: Add GitHub to known hosts
      run: ssh-keyscan github.com >> ~/.ssh/known_hosts
  3. Confirm that the subsequent make lint in common truly requires SSH access—if not, consider moving this step to only those jobs that clone private repos.
📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 01c70af and cdae92b.

📒 Files selected for processing (1)
  • .github/workflows/common.yml (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (9)
  • GitHub Check: tests
  • GitHub Check: tests
  • GitHub Check: tests
  • GitHub Check: check
  • GitHub Check: check
  • GitHub Check: check
  • GitHub Check: tests
  • GitHub Check: check
  • GitHub Check: tests

georgehao
georgehao previously approved these changes Apr 24, 2025
@colinlyguo colinlyguo requested a review from georgehao April 24, 2025 14:03
@colinlyguo colinlyguo merged commit a18fe06 into develop Apr 24, 2025
23 checks passed
@colinlyguo colinlyguo deleted the feat-coordinator-and-prover-support-v0.3.0 branch April 24, 2025 14:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bump-version Bump the version tag for deployment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants