-
Notifications
You must be signed in to change notification settings - Fork 624
feat: upgrading for feynman #1690
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
Conversation
WalkthroughThis update revises dependency versions for several zkVM prover workspace crates, restructures GPU and CPU build flows in the Makefile, introduces a new GPU-specific Cargo patch configuration, removes multiple configuration files and legacy scripts related to GPU repo cloning and patching, and updates the release download script to handle new versioning and download logic for required files. Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant Makefile
participant crates/gpu_override
participant crates/prover-bin
User->>Makefile: make prover
Makefile->>Makefile: Set ZK_VERSION (CPU version)
Makefile->>Makefile: Run prover_gpu target
Makefile->>crates/gpu_override: Build prover with GPU patches
Note right of Makefile: CPU build uses prover_cpu target (optional)
sequenceDiagram
participant User
participant download-release.sh
participant GitHub Releases
User->>download-release.sh: ./download-release.sh [version]
download-release.sh->>download-release.sh: Map version name to release version
download-release.sh->>download-release.sh: Create .work/chunk, .work/batch, .work/bundle
download-release.sh->>GitHub Releases: Download app.vmexe and openvm.toml for each circuit type
Possibly related PRs
Suggested reviewers
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
⏰ Context from checks skipped due to timeout of 90000ms (1)
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed 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)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 5
🧹 Nitpick comments (6)
crates/gpu_override/.cargo/config.toml (2)
2-14
: Commented-out patch block clutters the config.If these overrides are no longer needed, delete them; if they are needed, ship them active and pin to a commit for reproducibility.
20-45
: Many crates point to the same commit – consider workspace-level patch & a constant.Duplicating the hash 18 times is error-prone. Move the override to the workspace root or use a Cargo
workspace.dependencies
table to reference a single variable.zkvm-prover/Makefile (1)
35-42
: Dead/disabled GPU-selection logic – remove or revive.The old
ifeq (${PLONKY3_GPU_VERSION},)
block is now commented. Keeping stale code hampers readability.zkvm-prover/download-release.sh (1)
23-35
: Three almost-identicalwget
blocks – loop it.for part in chunk batch bundle; do dir=.work/$part mkdir -p "$dir" for file in app.vmexe openvm.toml; do wget -q "https://circuit-release.s3.us-west-2.amazonaws.com/scroll-zkvm/releases/$SCROLL_ZKVM_VERSION/$part/$file" \ -O "$dir/$file" done doneCuts duplication and makes future circuit additions trivial.
Cargo.toml (2)
6-7
: Workspace still listscrates/prover-bin
but Makefile switched togpu_override
.If
prover-bin
is obsolete, drop it and addcrates/gpu_override
to avoid unused-crate bloat and ensurecargo check
covers the new code.
19-23
: Revision bump LGTM, but pin by tag if possible.Using raw commit hashes is fine short-term; long-term, tagged releases convey intent and survive force-pushes.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
Cargo.lock
is excluded by!**/*.lock
📒 Files selected for processing (9)
Cargo.toml
(1 hunks)crates/gpu_override/.cargo/config.toml
(1 hunks)crates/prover-bin/.cargo/config.toml
(0 hunks)zkvm-prover/.work/.gitignore
(1 hunks)zkvm-prover/.work/batch/openvm.toml
(0 hunks)zkvm-prover/.work/bundle/openvm.toml
(0 hunks)zkvm-prover/.work/chunk/openvm.toml
(0 hunks)zkvm-prover/Makefile
(2 hunks)zkvm-prover/download-release.sh
(1 hunks)
💤 Files with no reviewable changes (4)
- zkvm-prover/.work/bundle/openvm.toml
- zkvm-prover/.work/chunk/openvm.toml
- zkvm-prover/.work/batch/openvm.toml
- crates/prover-bin/.cargo/config.toml
⏰ Context from checks skipped due to timeout of 90000ms (1)
- GitHub Check: tests
🔇 Additional comments (1)
zkvm-prover/.work/.gitignore (1)
2-2
: Good call on ignoringopenvm.toml
.Keeps transient config out of source control.
bump version? |
There was a problem hiding this 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)
build/dockerfiles/coordinator-api/config.toml (2)
4-15
: Absolute paths tie the build to a specific container layoutAll patched crates reference
/openvm-gpu/...
(leading slash).
This:
- Breaks
cargo check
outside the Docker image;- Makes future container re-organisation painful.
Prefer relative paths (e.g.
path = "../../openvm-gpu/…"
from the config file location) or anchor them via an env var ({ path = "${OPENVM_GPU_SRC}/crates/…" }
) set in the Dockerfile.
58-58
: Aliasingp3-monty-31
without features may disable SIMD/GPU pathsThe upstream crate exposes optional feature flags (
gpu
,simd
, etc.).
By patching it with nodefault-features
stanza you inherit whatever the crate’s defaults are—which could differ between upstream tags and break determinism.
Explicitly include the expected feature set, e.g.:-p3-monty-31 = { path = "/plonky3-gpu/monty-31" } +p3-monty-31 = { path = "/plonky3-gpu/monty-31", default-features = false, features = ["gpu"] }Also applies to: 87-87
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (3)
build/dockerfiles/coordinator-api/checkout_all.sh
(1 hunks)build/dockerfiles/coordinator-api/config.toml
(5 hunks)crates/gpu_override/.cargo/config.toml
(1 hunks)
✅ Files skipped from review due to trivial changes (1)
- build/dockerfiles/coordinator-api/checkout_all.sh
🚧 Files skipped from review as they are similar to previous changes (1)
- crates/gpu_override/.cargo/config.toml
⏰ Context from checks skipped due to timeout of 90000ms (1)
- GitHub Check: tests
🔇 Additional comments (1)
build/dockerfiles/coordinator-api/config.toml (1)
44-46
:nightly-features
enabled – ensure the toolchain is pinnedThe
p3-baby-bear
patch now opts into"nightly-features"
.
Compilation will fail on stable Rust. Double-check that:
- A
rust-toolchain.toml
(orrust-toolchain
) at workspace root pins an appropriate nightly;- CI images/install scripts install the same nightly.
If this is accidental, drop the feature flag.
Also applies to: 73-75
There was a problem hiding this 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
🧹 Nitpick comments (1)
build/dockerfiles/coordinator-api.Dockerfile (1)
42-47
: Slim-down the final image & keep security hygiene
Installingvim
and leaving APT caches bloats the runtime image by hundreds of MB. Use--no-install-recommends
and clean the cache.-RUN apt update && apt install vim netcat-openbsd net-tools curl jq -y +RUN apt-get update \ + && DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends -y \ + netcat-openbsd net-tools curl jq \ + && rm -rf /var/lib/apt/lists/*
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (8)
.github/workflows/docker.yml
(0 hunks)build/dockerfiles/coordinator-api.Dockerfile
(2 hunks)build/dockerfiles/coordinator-api/checkout_all.sh
(0 hunks)build/dockerfiles/coordinator-api/clone_openvm_gpu.sh
(0 hunks)build/dockerfiles/coordinator-api/clone_openvm_stark_gpu.sh
(0 hunks)build/dockerfiles/coordinator-api/clone_plonky3_gpu.sh
(0 hunks)build/dockerfiles/coordinator-api/config.toml
(0 hunks)build/dockerfiles/coordinator-api/gitconfig
(0 hunks)
💤 Files with no reviewable changes (7)
- build/dockerfiles/coordinator-api/gitconfig
- build/dockerfiles/coordinator-api/clone_openvm_stark_gpu.sh
- build/dockerfiles/coordinator-api/checkout_all.sh
- build/dockerfiles/coordinator-api/clone_plonky3_gpu.sh
- build/dockerfiles/coordinator-api/clone_openvm_gpu.sh
- .github/workflows/docker.yml
- build/dockerfiles/coordinator-api/config.toml
🧰 Additional context used
🪛 Hadolint (2.12.0)
build/dockerfiles/coordinator-api.Dockerfile
[error] 3-3: Use absolute WORKDIR
(DL3000)
⏰ Context from checks skipped due to timeout of 90000ms (10)
- GitHub Check: bridgehistoryapi-db-cli
- GitHub Check: coordinator-cron
- GitHub Check: coordinator-api
- GitHub Check: bridgehistoryapi-api
- GitHub Check: gas_oracle
- GitHub Check: bridgehistoryapi-fetcher
- GitHub Check: rollup_relayer
- GitHub Check: rollup-db-cli
- GitHub Check: blob_uploader
- GitHub Check: tests
🔇 Additional comments (1)
build/dockerfiles/coordinator-api.Dockerfile (1)
42-50
: Double-check glibc compatibility after switching to Ubuntu 20.04
libzkp.so
is compiled in the builder (Ubuntu 22.04 base image). Running it on older glibc (20.04 ships 2.31) can cause symbol-version errors. Please verify at runtime or align both stages to the same distro level.
This PR would trace the upgrades in the progress of feynman integration
Summary by CodeRabbit
.gitignore
to exclude additional files.