Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 12 additions & 9 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,13 @@ services:
- RUST_LOG=info
healthcheck:
test: ["CMD", "bash", "-c", "exec 3<>/dev/tcp/localhost/9010 && echo -e 'GET /health HTTP/1.1\\r\\nHost: localhost\\r\\nConnection: close\\r\\n\\r\\n' >&3 && timeout 1 cat <&3 | head -n 1 | grep -q '200 OK'"]
interval: 2s
# Generous window: Hierophant's SP1 CpuProver init alone can take
# several minutes on modest hardware (76s observed on a small
# droplet) before the HTTP server binds.
interval: 5s
timeout: 2s
retries: 30
start_period: 5s
retries: 60
start_period: 30s

magister:
image: ${MAGISTER_IMAGE:-unattended/magister:latest}
Expand Down Expand Up @@ -73,13 +76,13 @@ services:

# Override the Dockerfile-baked NETWORK_RPC_URL=http://hierophant:9000;
# with host networking the Docker DNS name no longer resolves.
- NETWORK_RPC_URL=http://localhost:9000
- NETWORK_RPC_URL=http://${HIEROPHANT_IP:-localhost}:9000
command:
- bash
- -c
- |
echo "Waiting for an SP1-capable idle Contemplant..."
while ! (exec 3<>/dev/tcp/localhost/9010 && echo -e 'GET /contemplants HTTP/1.1\r\nHost: localhost\r\nConnection: close\r\n\r\n' >&3 && cat <&3 | grep -q "Idle"); do
while ! (exec 3<>/dev/tcp/${HIEROPHANT_IP:-localhost}/9010 && echo -e 'GET /contemplants HTTP/1.1\r\nHost: localhost\r\nConnection: close\r\n\r\n' >&3 && cat <&3 | grep -q "Idle"); do
echo "No idle Contemplants available yet, waiting..."
sleep 5
done
Expand Down Expand Up @@ -119,12 +122,12 @@ services:
- -c
- |
echo "Waiting for a RISC Zero-capable idle Contemplant..."
while ! (exec 3<>/dev/tcp/localhost/9010 && echo -e 'GET /contemplants HTTP/1.1\r\nHost: localhost\r\nConnection: close\r\n\r\n' >&3 && cat <&3 | grep -q "Idle"); do
while ! (exec 3<>/dev/tcp/${HIEROPHANT_IP:-localhost}/9010 && echo -e 'GET /contemplants HTTP/1.1\r\nHost: localhost\r\nConnection: close\r\n\r\n' >&3 && cat <&3 | grep -q "Idle"); do
echo "No idle Contemplants available yet, waiting..."
sleep 5
done
echo "Idle Contemplant found, starting RISC Zero fibonacci proof (mode=$$PROOF_MODE, wrap=$$WRAP_SNARK)..."
cargo run --release --bin evm -- --n 10 --bonsai-url http://localhost:9010/bonsai
cargo run --release --bin evm -- --n 10 --bonsai-url http://${HIEROPHANT_IP:-localhost}:9010/bonsai

# OpenVM fibonacci proof. Talks to Hierophant's OpenVM-shaped REST surface
# at :9010/openvm/ over raw reqwest; OpenVM has no bonsai-sdk analog, so
Expand Down Expand Up @@ -164,9 +167,9 @@ services:
- -c
- |
echo "Waiting for an OpenVM-capable idle Contemplant..."
while ! (exec 3<>/dev/tcp/localhost/9010 && echo -e 'GET /contemplants HTTP/1.1\r\nHost: localhost\r\nConnection: close\r\n\r\n' >&3 && cat <&3 | grep -q "Idle"); do
while ! (exec 3<>/dev/tcp/${HIEROPHANT_IP:-localhost}/9010 && echo -e 'GET /contemplants HTTP/1.1\r\nHost: localhost\r\nConnection: close\r\n\r\n' >&3 && cat <&3 | grep -q "Idle"); do
echo "No idle Contemplants available yet, waiting..."
sleep 5
done
echo "Idle Contemplant found, starting OpenVM fibonacci proof (mode=$$PROOF_MODE)..."
cargo run --release --locked --bin host -- --n 10 --openvm-url http://localhost:9010/openvm
cargo run --release --locked --bin host -- --n 10 --openvm-url http://${HIEROPHANT_IP:-localhost}:9010/openvm