Skip to content

Pool mapper drops every XMRig pool key it does not know: rig-id, nicehash, algo/coin, sni #527

Closed

Description

@VijitSingh97

What's the problem

Line references are to develop @ 91ca45b. Part of the XMRig-surface sweep.

What's missing

The pool mapper is a whitelist: known_pool="url user pass keepalive tls enabled tls-fingerprint socks5" (rigforge.sh:760). Any other per-pool key XMRig accepts warns as an unknown field and is dropped (rigforge.sh:793). #115 added tls-fingerprint and #400 added socks5, one issue and one mapper change each. The rest of XMRig's per-pool schema is still missing:

Key Default What it is for
rig-id null the pool-side rig identifier. RigForge overloads user with the hostname instead (rigforge.sh:1134); on a pool that keys stats on rig-id, every RigForge worker is anonymous
nicehash false NiceHash-protocol pools (nonce is pool-assigned). Without it, every share is rejected
algo / coin null pin the algorithm or let XMRig pick by block version. RigForge assumes rx/0; a RandomX variant (rx/wow, rx/arq, rx/graft) has a different scratchpad and thread profile
sni false send SNI on a TLS pool. Needed behind any name-based TLS front; pairs with tls and tls-fingerprint, which RigForge already supports

The change

The whitelist becomes XMRig's full per-pool schema, minus the daemon/solo keys (their own issue). Each key gets the same treatment socks5 got in #400: re-attached from the raw config only when set, validated, and passed through verbatim.

  • rig-id: same charset rule as user/pass (rigforge.sh:484). Docs say when to use it instead of user.
  • nicehash, sni: strict booleans, like keepalive/tls/enabled (rigforge.sh:553).
  • algo: accept the rx/* family only, error on anything else naming the reason (the HugePages reservation and tune's bench assume a RandomX scratchpad). coin: XMRig's list.
  • status and doctor show the algorithm when it is not rx/0.
  • The control path's /apply pool schema accepts the same set (util/control-server.py), so a Pithead-driven pool change cannot strip a key the operator set locally.
  • config.reference.json and docs/configuration.md list every pool key with its XMRig meaning.

Testing

Unit tier, tests/run.sh, next to the existing #400 cases (tests/run.sh:359-450): each key round-trips into the generated config; an invalid value is rejected with its message; a config without any of them is byte-identical to today; the control-server drift test still passes.

what it impacts

Scope, what stays out

daemon, daemon-poll-interval, daemon-job-timeout, daemon-zmq-port, self-select, submit-to-origin, spend-secret-key are solo-mining mode, which changes what doctor and the feed mean by "pool". Separate issue. No non-RandomX algorithms.

How I found it

Discovery details are not separately established in the existing report; preserve and verify the evidence already recorded.

how important is it

Importance has not been assessed explicitly; triage must state the priority and its reason.

acceptance criteria

Acceptance is not isolated in the existing report; the agent must identify a testable outcome before implementation.

possible solutions

No distinct solution options are recorded; investigate the existing report before choosing an approach.

Activity

  1. added this to the v2.x - post-GA milestone on Sep 20, 2026
  2. pithead-developer commented on Sep 24, 2026

    @pithead-developer
    Contributor

    Investigation brief (operator pre-read, 2026-09-23)

    still_valid: yes, on develop @ dcdbc7e (current head). The pool mapper still builds POOLS_JSON from a fixed object literal — url/user/pass/keepalive/tls/enabled only (rigforge.sh:449-457) — and only tls-fingerprint (#115) and socks5 (#400) got a follow-up "re-attach from raw config if set" jq pass (rigforge.sh:461-472). No PR since the issue's baseline (91ca45b) touches rig-id/nicehash/algo/coin/sni; gh pr list search turns up nothing on those keys. CHANGELOG's [Unreleased]/1.17.3 entries don't mention this either.

    root_cause: the whitelist-then-patch pattern. Unknown pool fields are dropped after only a lint warning (known_pool, rigforge.sh:761, checked at 785-798); rig-id/nicehash/algo/coin/sni were never given the same re-attach treatment socks5 got. Separately, user unconditionally defaults to the rig name (rigforge.sh:1183) — there's no rig-id path at all.

    fix_shape: mechanical repeat of the #400 pattern, not a new mechanism — one single-line jq re-attach pass per key (rigforge.sh ~472), extend the validation loop (rigforge.sh:509-556) with rig-id's charset rule and strict booleans for nicehash/sni, add an algo allowlist (rx/0|rx/wow|rx/arq|rx/graft) since tune --bench/HugePages assume rx/0 (rigforge.sh:3278, 6190). util/control-server.py:21 stages pools opaquely (WRITABLE) and rigforge.sh re-validates on apply, so no separate control-server schema is needed — one fix covers both paths. Tests slot in next to tests/run.sh:359-366 as the issue proposes.

    evidence_tier: read (file:line, current head).

    rulings_needed:

    1. algo scope — ship all four rx/* variants now (default), or trim to what a pool actually needs?
    2. rig-id vs the existing user=rig-name default — coexist, emitted only when set (default), or replace?
    3. Timing — independent of the Tari/appliance work in 2.0.0 (default: yes, defer).

    duplicates_or_blockers: none found.

    Triage recommendation: MOVE-2.0.x — config completeness for XMRig pool keys, unrelated to the fork/appliance/dashboard cut; no security or data-loss exposure to justify blocking GA.

    Verify against the code before relying on this; it was written by an investigator, not the implementer.

  3. added
    operator-actionNeeds the operator's hands, not an answer: nothing waits on it and no ruling clears it
    on Nov 1, 2026
  4. pithead-developer commented on Nov 1, 2026

    @pithead-developer
    Contributor

    Operator: claimed for an operator-run implementation session (owner request, 2026-11-01). operator-action keeps the automated runner off it until the session's draft PR is reviewed.

  5. pithead-developer commented on Nov 2, 2026

    @pithead-developer
    Contributor

    Operator: draft PR #607 from the implementation session, held with operator-action for operator review.

  6. removed
    operator-actionNeeds the operator's hands, not an answer: nothing waits on it and no ruling clears it
    on Nov 6, 2026
  7. pithead-developer commented on Nov 6, 2026

    @pithead-developer
    Contributor

    Operator: released to the runner (owner 2026-11-06). New work goes to the local Flash-Next model first; Claude only after three local rounds or for sensitive work.

  8. pithead-developer commented on Nov 9, 2026

    @pithead-developer
    Contributor

    Merged in #607.

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

    enhancementNew feature or requestsetupConfiguration and first-run setup

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions