This repository is a mixed Rust + Go monorepo for the Scroll ZK Rollup. The two most important components for proving-related work are:
- Coordinator (
coordinator/) — Go service that schedules proving tasks and verifies proofs. - Prover (
crates/prover-bin/) — Rust binary that generates ZK proofs using OpenVM. - Shared library (
crates/libzkp/,crates/libzkp_c/) — Rust proof logic consumed by both prover and coordinator (via CGO).
For a detailed architecture overview, see docs/prover-coordinator-overview.md.
Follow the structured testing guide in docs/testing/openvm-upgrade-testing-guide.md. It covers five verification levels:
- Compilation & static checks
- Unit tests
- Artifact builds
- End-to-end proving
- Docker image builds
# Rust formatting / linting
cargo fmt --all -- --check
cargo clippy --all-features --all-targets -- -D warnings
cargo check --all-features
# Build shared library for coordinator
cargo build --release -p libzkp-c
# Build prover (CPU)
cd zkvm-prover && make prover_cpu
# Build prover (GPU)
cd zkvm-prover && make prover
# Build coordinator API
cd coordinator && make coordinator_api
# Coordinator unit tests (needs libzkp.so)
cd coordinator && make test
# E2E test setup
cd tests/prover-e2e
ln -snf <scenario> conf # e.g., sepolia-galileoV2
make all
make coordinator_setup| Directory | Purpose |
|---|---|
crates/libzkp |
Core Rust proving/verification library |
crates/libzkp_c |
C FFI bindings for libzkp |
crates/prover-bin |
Prover binary (prover) |
coordinator/ |
Go coordinator service |
rollup/ |
Go rollup services (produces tasks for coordinator) |
tests/prover-e2e/ |
E2E test harness for coordinator + prover |
tests/integration-test/ |
General integration tests |
zkvm-prover/ |
Build scripts and runtime config for the prover binary |
build/dockerfiles/ |
Dockerfiles for production images |
- System PostgreSQL often occupies port 5432. If the default
DB_PORT=5432conflicts with a system instance, edit.envto use an alternative (e.g.,5433) and runmake gen-configto regenerate all configs. - Kill stale coordinator processes before restarting:
pkill -f coordinator_api.
- After changing
docker-compose.yml, old containers may persist with stale port mappings. Always usedocker rm -f <name>beforedocker compose up. - The E2E container is named
local_postgres. Verify the port mapping withdocker port local_postgres.
- The project requires solc ≥ 0.8.24 (for
--evm-version cancun). System-installed solc is often older. - Workaround: download
solc-static-linuxv0.8.24 to/tmp/solcand prepend/tmpto PATH.
- The E2E
setup_dbstep requiresgoose. Install with:go install github.com/pressly/goose/v3/cmd/goose@latest. - Ensure
$GOPATH/bin(typically~/go/bin) is in PATH.
- Some config templates contain literal placeholder strings (e.g.,
"<serach a public rpc endpoint like alchemy>"). Always verify thel2geth.endpointfield points to a reachable RPC before launching the coordinator. - A bad endpoint causes the coordinator to panic at startup during
InitL2geth.
- The E2E config (
tests/prover-e2e/*/config.json) and coordinator config (coordinator/build/bin/conf/config.json) must agree onvalidium_mode. Mismatch causes "invalid data length for DABatchV7" errors. - For mainnet testing: set
validium_mode: false. - For cloak / validium testing: set
validium_mode: trueand ensuresequencer.decryption_keyis provided.
- Blocks must be post-fork to match the configured codec version. For GalileoV2 (codec V10) on mainnet, use blocks ≥ 33,750,000. Older blocks (e.g., 26,653,680) are Galileo (codec V9) and will fail with "mismatched post-state root".
- To verify fork compatibility: check
codec_versionin the E2E config and ensureSCROLL_FORK_NAMEmatches the coordinator's verifier fork list.
- The prover config
base_urlmust match the actual S3 object path. Verify withcurl -sIbefore running. - The coordinator downloads verifier assets from
v0.X.X/verifier/; the prover downloads circuit assets from<fork>/<proof_type>/<vk>/. - If you see HTTP 403 from S3, check whether the URL contains a
releases/segment that shouldn't be there.
- Running
make coordinator_setuprebuilds the binary but does not stop running instances. If the old instance holds port 8390, the new one fails withbind: address already in use. - Always check with
ss -tlnp | grep 8390before launching.
- Code / logic issues: agents should reason independently and propose fixes.
- Environment / secrets issues (database passwords, RPC endpoints, cloud credentials, sudo access): ask the human and wait for a response. Do not time out and make unilateral decisions.
| Document | What It Covers |
|---|---|
docs/prover-coordinator-overview.md |
Architecture, data flow, component relationships, common operations |
docs/testing/openvm-upgrade-testing-guide.md |
Step-by-step testing checklist after OpenVM / zkvm-prover upgrades |
docs/testing/docker-compose-e2e-guide.md |
Production-like E2E testing with Docker Compose + Coordinator Proxy |
docs/testing_reports/openvm-v1.6.0-guest-v0.8.0-May19.md |
Test report for PR #1783 (OpenVM 1.6.0, guest v0.8.0) |