Skip to content

feat(zk-prover): add standalone compose workflow#2941

Draft
mw2000 wants to merge 2 commits into
split/zk-devnet-clusterfrom
split/zk-standalone-prover
Draft

feat(zk-prover): add standalone compose workflow#2941
mw2000 wants to merge 2 commits into
split/zk-devnet-clusterfrom
split/zk-standalone-prover

Conversation

@mw2000
Copy link
Copy Markdown
Contributor

@mw2000 mw2000 commented May 26, 2026

Summary

  • Add a standalone Docker Compose stack for running the ZK prover locally.
  • Let local lifecycle commands infer the fixed prover stack and load network/cluster settings from local YAML.

Test plan

  • just zk-prover
  • docker compose -p zk-prover -f etc/docker/docker-compose.zk-prover.yml config --quiet
  • git diff --check

Made with Cursor

Comment thread etc/just/zk-prover.just Outdated
@github-actions
Copy link
Copy Markdown
Contributor

Review Summary

This PR adds a standalone Docker Compose stack (docker-compose.zk-prover.yml) and reworks the zk-prover.just recipes to support running the ZK prover independently from the full devnet stack. The compose file, env-file plumbing, and lifecycle recipes (up, down, logs) are well-structured and consistent with the existing devnet patterns in etc/docker/Justfile.

Findings

Minor: Fragile YAML generation via string concatenation (etc/just/zk-prover.just:192)

The inline Python one-liner generates a Docker Compose override file by concatenating a JSON-encoded path into a YAML template string. JSON and YAML double-quoted strings have subtly different escaping rules. While CA cert paths in practice are simple filesystem paths, consider using json.dumps to produce a JSON compose file (Docker Compose accepts JSON) to eliminate the escaping mismatch entirely.

Notes (no action required)

  • The PR removes the target positional parameter from list, describe, prove, get, and list-proofs recipes. These now infer the endpoint from ZK_PROVER_ENDPOINT / ZK_PROVER_GRPC_PORT env vars. This is a breaking change for anyone calling these recipes with positional target args — intentional per the PR design, but worth noting in case other scripts depend on the old signatures.
  • The compose file, healthcheck patterns, credential handling, and --deny guards for secrets in YAML configs all look correct and consistent with existing conventions.

mw2000 and others added 2 commits May 26, 2026 12:48
Add a standalone ZK prover stack that can start cluster or dry-run mode from local network and cluster YAML without requiring callers to repeat the network for logs or shutdown.

Co-authored-by: Cursor <cursoragent@cursor.com>
Generate the temporary CA mount override as JSON so Docker Compose parses paths without YAML escaping edge cases.

Co-authored-by: Cursor <cursoragent@cursor.com>
@mw2000 mw2000 force-pushed the split/zk-standalone-prover branch from 6a41323 to cd989c3 Compare May 26, 2026 19:49
- POSTGRES_SSLMODE=disable
- OTEL_SERVICE_NAME=base-prover-zk-${ZK_PROVER_NETWORK:-local}
healthcheck:
test: ["CMD", "bash", "-c", "echo > /dev/tcp/localhost/9000"]
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The zk-prover runtime image is based on debian:trixie-slim with only ca-certificates and curl installed (runtime-base stage in Dockerfile.rust-services). bash is not present in that image, so this healthcheck will always fail with exec: "bash": executable file not found.

Since curl is installed in the runtime base, you could use:

Suggested change
test: ["CMD", "bash", "-c", "echo > /dev/tcp/localhost/9000"]
test: ["CMD", "curl", "-sf", "http://localhost:9000/"]

Or if the gRPC endpoint doesn't respond to plain HTTP, a simple TCP check with the timeout utility (available in coreutils):

test: ["CMD-SHELL", "timeout 1 sh -c 'echo > /dev/tcp/localhost/9000' 2>/dev/null || curl -sf http://localhost:9000/ || exit 1"]

Note: /dev/tcp is a bash-only feature. For a POSIX shell alternative, consider using curl or installing netcat.

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.

1 participant