Repository navigation
Description
What's the problem
The 2.0.5 per-rig OS update (rig-side updater #4013 with the API in p2pool-starter-stack/rigforge#684, plus the Tor client and hardened channel backported to develop) is security-sensitive and reboots a rig. Nothing proves it end to end yet. The full proof #4018 covers more than 2.0.5 ships, so this issue is the reduced slice for 2.0.5. The rest of #4018 (rig identity, replace-stick, Update all, Remove rig, /release, rig logs, install-to-disk removal) stays in v2.1.0.
The rig must also work without Pithead. The proof therefore drives the update API directly with the rig's token, as well as through the Pithead dashboard.
What it impacts
- Rig owners: a bad update could brick a rig, leave it on a half-installed slot, or leak its address over clearnet.
- The 2.0.5 release decision: if this proof is not green, 2.0.5 ships for Pithead boxes only and rig owners stay on 2.0.3.
- Coordinator OS update: the backport of appliance: rig OS-update contract for self-fetch over Tor, and the on-demand Tor client in the image (#4007, #4008) #4040 and appliance: harden the update channel — untrusted listing, host allowlist, size cap, tag validation, stale-channel reporting #4056 changes
os-checkandos-downloadbehaviour, so it needs a re-proof.
How I found it
Planning the 2.0.5 scope. #4018 was written for the full 2.1.0 rig work. 2.0.5 carries only the per-rig update, so the proof needs its own scoped issue. Reviewing develop showed none of the Tor client, channel or rig updater code is there yet, so no existing KVM leg covers it.
How important is it
High. It gates the rig half of 2.0.5, and a failed rig update is hard to recover without a USB stick.
Acceptance criteria
All legs pass in a KVM run on the head of the 2.0.5 release candidate, with the run id linked here. Proof contains no hostnames, IPs or tokens.
- Direct update: a POST to the rig's update endpoint with its token, from a LAN client with no Pithead involved, returns 202 and installs the newer version over Tor. After reboot the slot is committed and GET status reports
updatedwith the new version. - Pithead-driven update: the dashboard "Update OS" calls the rig with the coordinator's version as ceiling. A rig is never taken above that version, and a request above the ceiling is refused.
- Refusals, each with a distinct reason and no slot change: equal version, downgrade, bad bundle signature, over the ceiling. The bundle file is gone after every outcome.
- Single flight: a second POST while an update runs returns 409.
- Fallback: a bundle that boots but cannot start the miner is not committed. The rig returns to the old slot and GET status reports
rolled_backafter boot, with the reason kept. - Quiet state: with no call, the rig makes no update request and starts no Tor client over a full idle window (Tor masked, nothing listening).
- Tor only: during an update the rig's outbound traffic is Tor only. Use the Tor egress watchdog if it is available; otherwise a packet capture on the guest shows no clearnet connection other than stratum to a configured pool, and the check fails if one appears.
- USB hop: a rig installed from 2.0.3 and upgraded by USB with Keep everything to the 2.0.5 build keeps its role,
rig.jsonand token, does not trip the/datamigration floor or a hold, stays adopted, and then answers the update endpoint. A stick rig re-flashed instead gets a new token and must be re-adopted (confirm and record). - Token handling, on every update route and with no side effects: a missing, wrong or derived read token gets 401; a named consumer token without the update scope gets 403.
- Pithead os-update re-proof: coordinator
os-check,os-downloadandos-verifyselftests pass, and atier4-e2eOS update run on the backported head passes.
Possible solutions
- Extend the existing
tier4-kvmrig leg with the legs above, using the test-base seam for the update bundle source. - Take legs 1 to 5 and 9 from the selftest style of Rig-side updater: download the signed bundle over Tor, verify, install into the spare slot, self-commit or fall back #4013 where a full guest is not needed. Keep legs 6, 7 and 8 as real KVM runs. The test-base seam skips Tor, so only the real-Tor run proves leg 7.
- Pending sibling: a separate egress audit will add time sync and DNS checks. This issue only asserts update traffic is Tor only and does not design the rest. The Tor egress watchdog is not built yet.
- Depends on the backport of appliance: rig OS-update contract for self-fetch over Tor, and the on-demand Tor client in the image (#4007, #4008) #4040, appliance: harden the update channel — untrusted listing, host allowlist, size cap, tag validation, stale-channel reporting #4056 and appliance: fix #4013 — rig-side updater: signed bundle over Tor, spare-slot install, verdict in rig-update.json #4103 onto
develop, and on Token-authenticated API to check for and perform an update, with scope, rate limit and single flight rigforge#684. If the RigForge release carrying the update API is not ready, this proof is held and 2.0.5 ships for Pithead boxes only.
Activity
pithead-developer commentedon Nov 16, 2026
Blocked on #4013.
Blocked on p2pool-starter-stack/rigforge#684.
The KVM proof needs the rig-side updater (#4013) and the RigForge update API (rigforge#684), so it starts when both close.