Repository navigation
Description
What's the problem
The 2.0.5 rig update (RigForge control API, p2pool-starter-stack/rigforge#684) has the rig download its own signed bundle over its own on-demand Tor client. Two pieces of that already exist, but only on develop-v2.1.0, not on develop, which is the 2.0.x line:
- appliance: rig OS-update contract for self-fetch over Tor, and the on-demand Tor client in the image (#4007, #4008) #4040: the on-demand Tor client (
os/overlay/pithead-tor), the rewritten contract indocs/dev/rig-os-update.md, and the rootfs headroom gate (1536 MiB). - appliance: harden the update channel — untrusted listing, host allowlist, size cap, tag validation, stale-channel reporting #4056: the hardened update channel: new
lib/pithead/47a-os-update-channel.shplus edits to47-os-update-helpers.shand48-os-update-verbs.sh. It adds untrusted listing, release-host allowlist,socks5h, no off-host redirects, strict tag regex, semantic version compare, size cap and stale-channel reporting.
On develop, pithead-tor, 47a-os-update-channel.sh and docs/dev/rig-os-update.md do not exist. Without them 2.0.5 cannot ship a rig update that works over Tor, and a rig with no Pithead cannot update itself.
These changes are not rig-only. #4056 edits the shared helpers behind the coordinator's own OS update, which exist on develop today. The Tor client also adds a package and a daemon to the rig image.
Rig egress rule: outbound is Tor only, except stratum to an external pool the owner configured. The update path must not use clearnet. A separate egress audit will add the time-sync and DNS items; this issue does not cover them.
Decision: do not forward-merge develop-v2.1.0. Cherry-pick (or retarget) #4040 and #4056 here, and #4103 in the sibling item, onto develop.
What it impacts
- Every RigForge-only appliance: this is the base of the per-rig update that lets a rig update with or without a Pithead.
- Every Pithead box on 2.0.5: the coordinator's live
os-check,download,verifyandinstallrun through the code appliance: harden the update channel — untrusted listing, host allowlist, size cap, tag validation, stale-channel reporting #4056 changes. A regression here can break coordinator OS updates, which is the path boxes use to leave a bad release. - The rig image slot: the Tor client adds a package and a daemon, so rootfs and slot headroom shrink.
- The later forward merge of
developintodevelop-v2.1.0: it stays clean only if the cherry-picked commits are identical to the originals. - 2.0.5 scope: if the RigForge release carrying the update API is not ready, 2.0.5 ships for Pithead boxes only and rig owners stay on 2.0.3. The coordinator-side effect of this backport still has to be safe on its own.
How I found it
From the 2026-11-15/16 owner rulings and a read of the repository state:
- appliance: rig OS-update contract for self-fetch over Tor, and the on-demand Tor client in the image (#4007, #4008) #4040 merged 2026-11-12 into
develop-v2.1.0.os/overlay/pithead-toranddocs/dev/rig-os-update.mdexist ondevelop-v2.1.0and not ondevelop. - appliance: harden the update channel — untrusted listing, host allowlist, size cap, tag validation, stale-channel reporting #4056 merged 2026-11-13 into
develop-v2.1.0.47a-os-update-channel.shexists there and not ondevelop;47-os-update-helpers.shand48-os-update-verbs.shexist on both. - appliance: rig OS-update contract for self-fetch over Tor, and the on-demand Tor client in the image (#4007, #4008) #4040 was proved with tier4-kvm boot and rig runs on
develop-v2.1.0. That proof does not carry over todevelopby itself. - Unknown: how many conflicts the cherry-picks hit on
develop, and the exact headroom left after adding the Tor client. Both must be measured.
How important is it
High for 2.0.5. The rig update cannot ship without it, and it changes the coordinator's live update path, so it needs full re-proof. Medium risk. No user-visible feature ships from this issue alone, and it blocks the rig-side updater (#4103) and the RigForge API (p2pool-starter-stack/rigforge#684).
Acceptance criteria
- 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 are applied to
developby cherry-pick (or retarget) with commit contents identical to the originals. No forward merge ofdevelop-v2.1.0. A diff of the touched paths between the cherry-picks and the originals shows no changes beyond conflict-free context. -
os/overlay/pithead-tor,docs/dev/rig-os-update.mdand the rootfs headroom gate exist ondevelop. The Tor client starts only on demand, stops afterwards, and the units stay masked otherwise. The quiet-state and helper KVM legs pass. - The hardened channel is enforced on
develop: only allowlisted release hosts, oversocks5h, no off-host redirects, tag matching the strict regex, a download over the size cap refused, a stale channel reported. A selftest covers each refusal. - The coordinator's
os-check,download,verifyandinstallare re-proved ondevelopafter appliance: harden the update channel — untrusted listing, host allowlist, size cap, tag validation, stale-channel reporting #4056, including a full coordinator update and a rollback, in a tier4-e2e (or equivalent KVM) run. The PR names the run. - Rig slot and rootfs headroom are re-measured with the Tor client and daemon added. The measured free space is recorded in the PR, and the headroom gate still passes on a 16 GB stick.
- A rig with the backport makes no update-related network request unless the update API is called, and runs no timer. Any update-related traffic the test captures goes only through the on-demand Tor client, never clearnet.
-
make checkpasses on the cherry-picked branch, and a trial merge ofdevelopintodevelop-v2.1.0completes with no conflicts in the touched paths.
Possible solutions
- Cherry-pick the merge commits 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 onto a branch from
develop, resolve conflicts, and open one PR intodevelop. Keeps commits identical, which keeps the later forward merge clean. - Retarget the original branches onto
developif the cherry-picks conflict heavily. This changes the commits, so the trial merge in the acceptance criteria must be run. - Land 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 as two PRs so a coordinator regression from appliance: harden the update channel — untrusted listing, host allowlist, size cap, tag validation, stale-channel reporting #4056 can be bisected on its own. Land appliance: harden the update channel — untrusted listing, host allowlist, size cap, tag validation, stale-channel reporting #4056 first, since it only touches the shared update path, and prove the coordinator update before adding the Tor client.
- If headroom is too tight after the Tor client is added, trim the image before raising the gate. The slot sizes stay as they are.
Activity
pithead-developer commentedon Nov 16, 2026
Released to the runner. The approved plan is in the body.
Ordering note: #4146 (fail-closed clients) gates the
os_update_test_baseseam in lib/pithead/47-os-update-helpers.sh, and the backported lib/pithead/47a-os-update-channel.sh calls the same seam. Whichever of the two lands second must cover both files. #4013 and #4151 wait on this issue.pithead-developer commentedon Nov 18, 2026
Merged in #4210.