Skip to content

KVM proof for the 2.0.5 rig update: update over Tor, refusals, fallback with status kept, and the 2.0.3 to 2.0.5 USB hop #4141

Open

Description

@pithead-developer

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

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.

  1. 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 updated with the new version.
  2. 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.
  3. 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.
  4. Single flight: a second POST while an update runs returns 409.
  5. 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_back after boot, with the reason kept.
  6. 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).
  7. 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.
  8. 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.json and token, does not trip the /data migration 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).
  9. 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.
  10. Pithead os-update re-proof: coordinator os-check, os-download and os-verify selftests pass, and a tier4-e2e OS update run on the backported head passes.

Possible solutions

Activity

  1. added this to the v2.0.5 milestone on Nov 16, 2026
  2. added
    testing
    appliance
    operator-action
    on Nov 16, 2026
  3. added
    blocked
    on Nov 16, 2026
  4. pithead-developer commented on Nov 16, 2026

    @pithead-developer
    ContributorAuthor

    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.

  5. removed
    operator-action
    on Nov 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    applianceblockedtesting

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions