ci: expose r0vm on PATH and add timeout to risc0 job - #761
Open
ch4r10t33r wants to merge 6 commits into
Open
Conversation
Following #759 the risc0 job no longer crashes in `xmss_aggregate`, so control reaches `default_prover().prove(...)` for the first time in a long while. The job then hangs indefinitely in `run prover` because `risc0-zkvm = 3.0.3`'s `default_prover()` is an IPC client that needs `r0vm` reachable on PATH, and the installer step only wrote to ~/.bashrc / ~/.profile, which GitHub Actions run: steps do not source. Export ~/.risc0/bin to \$GITHUB_PATH right after install, add a `which r0vm && r0vm --version` sanity check so a broken install fails the job fast instead of silently hanging, and cap the prover step at 30 minutes so future PATH regressions don't eat the default 6h job budget.
Historical green runs (e.g. run 21992231306, commit #574) show the prover step genuinely takes ~2h 3m on GitHub's 2-core Ubuntu runner. The 30 min cap introduced in the previous commit would fail every real run. Raise to 180 min so legitimate proving completes with headroom while still capping runaway hangs well under the 6h default job budget.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
After #759 cleared the
xmss_aggregateGPF, the risc0 CI job progressed past mock-chain generation for the first time in months and landed in actualdefault_prover().prove(...). It then ran against the default 6h job budget with no visible output, and I cancelled run 24583531824 after ~1h.Two separate fixes are needed to make this workflow maintainable again.
Diagnosis
1. No timeout on the prover step
Checking the last green risc0 run on
main(run 21992231306, Feb 13, commit #574):run proverSo even a successful run genuinely takes ~2h on the standard 2-core Ubuntu runner. Without an explicit
timeout-minutes, a regression that turns those 2h into a hang silently wastes 6h of runner budget and bounces off the default job timeout instead of giving a clean red X.2. No discoverability check on
r0vmrisc0-zkvm = 3.0.3'sdefault_prover()is an IPC client that requiresr0vmonPATH. It turns outrzup install r0vm 3.0.3drops the binary in~/.cargo/bin/r0vm(already on PATH viasetup-rust-toolchain), so today this happens to work — but there's nothing in the workflow asserting that. A future upgrade that changes the install layout, or a missing/version‑mismatchedr0vm, would manifest as a silent multi‑hour hang insideprover.prove()with zero log output. Verified via CI on this PR:which r0vm→/home/runner/.cargo/bin/r0vm,r0vm --version→risc0-r0vm 3.0.3.Fix
which r0vm && r0vm --versionas a distinct step. Cheap (ms), and a broken install now fails the job in seconds with a clear error instead of wedging the prover step.timeout-minutes: 180onrun prover. Safe margin above the historical ~2h runtime, still caps runaway hangs well below the 6h default.echo \"$HOME/.risc0/bin\" >> \"$GITHUB_PATH\"right after install as defence‑in‑depth in case the layout changes back.No prover or build changes — workflow-only.
Test plan
Verify r0vm on PATHpasses on this PR (/home/runner/.cargo/bin/r0vm,risc0-r0vm 3.0.3).run provercompletes within 180 min withSuccessfully proved and verified all transitions.