Skip to content

Replace-stick flow: operator action to move a rig's record and history to a new stick #4015

Open

Description

@pithead-developer

What's the problem

With the rig as its stick, a dead or worn stick means a dead rig. Adopting a new stick under the same worker name would, under the identity match order, risk silently taking over the old record, or leave two records. There is no explicit operator action, and no documented backup of rig.json for a dead stick.

What it impacts

Owners of stick rigs after a failure or a stick swap, and the integrity of per-rig history.

How I found it

Skeptic review of the 2026-11-10 design. The identity issue defines match rules but not the replacement action; the coordinator holds the token but no flow uses it for replacement.

How important is it

Medium for 2.1.0; it must land with identity because install-to-disk is being dropped.

It is blocked by #4014.

Acceptance criteria

  • The coordinator offers 'Replace stick' on a rig record; only that action lets a new rig id adopt under an existing worker name.
  • The old record is retired with its history kept under the old rig id; the old token is forgotten.
  • A new stick with an existing worker name but no replace action is adopted as a separate rig or refused with a clear message, never merged silently.
  • Docs describe an optional backup of rig.json and what to do when the stick is under the 16 GB layout floor or worn.
  • Tests cover replace, name collision without replace, and history retention.

Possible solutions

  • A coordinator-side replace verb that marks the old id retired and binds the next adoption (preferred).
  • Escrow rig.json on the coordinator for restore: out of scope, a larger secret-handling change.

Activity

  1. added this to the v2.1.0 milestone on Nov 10, 2026
  2. added
    enhancement
    appliance
    on Nov 10, 2026
  3. pithead-developer commented on Nov 24, 2026

    @pithead-developer
    ContributorAuthor

    Grouped with #3694, but PR #4411 does not close it: Waits on #4014 and needs its own coordinator work and tests.. Released for its own pick.

  4. pithead-developer commented on Nov 26, 2026

    @pithead-developer
    ContributorAuthor

    Blocked on #4014. Blocked on pithead#4014 (rig identity: minted rig id, adoption records it, match order id→name→IP), which has not landed and has no open PR. Every #4015 acceptance criterion is defined against that foundation: "a new rig id adopt under an existing worker name," "history kept under the old rig id," and the refuse/adopt-separately rule for a new stick at an existing name — which is only meaningful as the exception to #4014's "a name match with a different rig id never silently takes over" guard. Verified on current develop: adoption (dashboard/mining_dashboard/service/workers/worker_adopt.py) knows name/host/token only, matching is name-then-IP (docs/configuration.md), history is keyed by worker name, and no rig id exists in product code (the one rig-id is xmrig's stratum rig-id, unrelated); discriminating old-stick vs new-stick at a shared name without a minted id would have to key on the token, which legitimately rotates on Remove-rig rotation — so the replace action cannot be built honestly on today's records. Finished so far: full read of #4015, #4014, rigforge#680 (closed 2026-11-16, feed fields landed), PR #4411 (the merged, unrelated DONATION_* change), and the adoption/matching/storage code; no edits made, branch untouched. What unblocks: #4014 implemented and merged (it is ready to pick now that rigforge#680 landed) — then this session resumes and builds the coordinator-side replace verb, the collision guard, the rig.json-backup and worn-stick docs, and the replace/collision/history tests.

    The runner resumes this issue when that one closes.

  5. added
    blocked
    on Nov 26, 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

    applianceblockedenhancement

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions