Skip to content

dashboard: record the rig id and match workers by rig id, then name, then IP; hints never authenticate #4181

Done

Description

@pithead-architect

What's the problem

The coordinator matches workers by stratum name first, then by declared IP (_worker_override in dashboard/mining_dashboard/client/xmrig_client.py), and adoption (dashboard/mining_dashboard/service/workers/worker_adopt.py) records name, host and token but no rig id. rigforge#694 merged: the sister feed now carries rig_id, os_version, and a token-gated identity block (mac, board_uuid, cpu_model) as display hints. #4014 requires the coordinator to adopt by rig id first and to treat the id as a lookup hint only.

What it impacts

Coordinator owners: a renamed rig keeps its history once records carry an id, and a same-name rig with a different id can no longer silently take over an existing record.

How I found it

Split from #4014 (owner decisions of 2026-11-10, item 8) after rigforge#694 closed rigforge#680. Reading _worker_override and worker_adopt.py.

How important is it

Medium for 2.1.0; gates the duplicate-identity fault slice and #4016.

Acceptance criteria

  • Adoption records the feed's rig_id into the worker record; the workers.list entry gains an optional rig_id accepted by both validators (pithead's own workers validation and the dashboard's) with the 32-lowercase-hex shape, and config.reference.json describes it.
  • Match order is rig id, then name, then IP: an id match wins when both sides carry ids; a name match whose ids differ never silently adopts the existing record — it surfaces as a distinct identity-change outcome (Rig identity from the stick: random rig id plus token, hardware as hints, clone detection #4014's replace-stick rule), never a silent takeover.
  • The feed parse surfaces rig_id, os_version and identity into the rig state; absence of any of them (older RigForge, hint probes that found nothing) is unknown, not an error.
  • The id is a lookup hint only: the token remains the sole credential, a wrong id never authenticates, and probe responses never reveal which ids exist (an unknown-id rig answers like a rig whose feed carries no id).
  • MAC, board UUID and CPU model are display-only; nothing authenticates from them; their absence is never an error.
  • Fixture tests cover: feed with an id, without one, and with the null/whitespace shapes rigforge nulls out; a renamed rig keeping its id; a same-name different-id rig; identity hints present and absent.

Possible solutions

  • Optional rig_id on the descriptor beside name/host/token, reusing the token validator's shape checks; _worker_override takes the candidate id and tries id, then name, then IP.

Parent: #1837

Worker brief: Test tier: tiers 1-3 on GitHub (dashboard pytest suites; the matching fixtures need no bench). Scope: the dashboard's feed parse and adoption/matching slices, pithead's workers.list validation for the one new optional key, config.reference.json, and docs for the entry shape. No fault mechanism (a sibling chunk owns the duplicate-identity fault), no stick-side minting (a sibling chunk owns it), no control-verb changes. Spec is #4014 acceptance criteria 2, 3, 4 and 7 — read #4014, _worker_override and worker_adopt.py first. No comments in code.

Activity

  1. added this to the v2.1.0 milestone on Nov 17, 2026
  2. added
    installer
    appliance
    needs-triage
    size:M
    on Nov 17, 2026
  3. pithead-developer commented on Nov 24, 2026

    @pithead-developer
    Contributor

    Grouped with #3694, but PR #4411 does not close it: Dashboard-only change with its own pytest proof, separate from the appliance unit change.. Released for its own pick.

  4. pithead-developer commented on Nov 26, 2026

    @pithead-developer
    Contributor

    Waiting on a transient bench_outage condition, not on another issue. the runner could not read the bench to confirm that no job still runs on the PR head (<urlopen error [Errno 61] Connection refused>). The runner re-checks it (first at 2026-11-26T20:38Z, at most 5 times).

  5. pithead-developer commented on Nov 28, 2026

    @pithead-developer
    Contributor

    Merged in #4535.

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

    applianceinstallerneeds-triagesize:M

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions