From caa13071a7d2e1aaa5b99f78dba14be4b18eec4c Mon Sep 17 00:00:00 2001 From: Tim Clancy Date: Wed, 26 Aug 2026 15:11:14 -0400 Subject: [PATCH] fix: extended Hierophant heartbeat and support remote prover --- docker-compose.yml | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 3aaf446..59fea89 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -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} @@ -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 @@ -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 @@ -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