Skip to content

Add the --donation-routing-smoke end-to-end phase #3706

Open

Description

@pithead-developer

What's the problem

Part of #2476. Owner priority (2026-10-27): build the opt-in donation feature now, shipping dark. Routing, config rendering and the firewall can be unit-tested, but whether a real xmrig-proxy accepts a third pool, honours its socks5, flips back, and keeps rigs attached is a live question. The only live routing proof today is the XvB one: --xvb-routing-smoke (tests/integration/lib/live-xvb-support.sh:152-300, flag at lib/run-cli.sh:72-76, :275-278, allowlist at lib/harness-args.sh:19, dispatch at run.sh:300). Nothing proves the donation path, and benches must never dial the real project endpoint.

Add a phase --donation-routing-smoke, modelled on run_xvb_routing_smoke, that uses the fake stratum from {{A7}} as a stub endpoint:

  1. Baseline: healthy stack, miners hashing, the proxy on the P2Pool route (_pred_proxy_route, live-xvb-support.sh:79; proxy_active_route, proxy_active_pool and proxy_active_socks5 in lib/live-state-support.sh:178-182).
  2. Off by default: with donation.enabled unset, the route does not change across one full controller cycle (600 s, dashboard/mining_dashboard/config/config.py:144).
  3. Enable at the 10 % cap (a 60 s slice lands in the first cycle) with the stub as the destination and donation.tor true: the proxy flips to the stub pool and back; during the slice the active pool carries the Tor socks5 (as live-xvb-support.sh:276 asserts for XvB); workers stay attached (proxy_workers unchanged); hashes advance (_pred_hashes_advanced, :71).
  4. With XvB on (when the box has it enabled), the XvB slice length is unchanged by the project slice.
  5. Refusing endpoint: restart the stub in refuse mode; the slice ends early, the route is back on P2Pool and the donation status is fallback (the fail-open behavior of {{A10}}).
  6. Disable: no further slice over the next cycle; the original config, runtime wiring, route, workers and hashes restore exactly (restore_xvb_original at :10 is the pattern).

Injecting the stub: the destination is an image constant, not a config key ({{A2}}), so the harness must replace it without adding a production override. The proposal is a harness-only override that mounts a replacement constants file read-only into the dashboard container for the run and removes it on restore; nothing in docker-compose.yml, build/ or the dashboard reads an environment variable for it. The PR decides the exact mechanism and states it; the constraint is that the shipped image has no way to be redirected.

File budgets (docs/dev/file-budget.tsv): lib/run-cli.sh is at 410 of 410, lib.sh at 686 of 686, e2e.sh at 677 of 684 and selftest/selftest-e2e-phases.sh at 501 of 501. Put the phase in a new tests/integration/lib/live-donation-support.sh, make the flag edits net zero in run-cli.sh (move an existing block out if needed), and put the selftest rows in a new file beside selftest-e2e-harness-args.sh.

What it impacts

The live harness only; no product behavior. It is the evidence that makes the routing change reviewable, and the evidence preflight for any compose or build change.

How I found it

Read-only scan of origin/develop-v2.1.0 at 02852bd on 2026-10-27 from the paths above and docs/dev/integration-testing.md:248 (the flag table). Nothing was executed. Unknown: whether xmrig-proxy accepts the fake's job template and an onion-less stub through the Tor SOCKS, how long the whole phase takes (the XvB smoke takes tens of minutes), and which bench roles can run it. The phase needs miners and, like the XvB smoke, may need a PPLNS share; the PR states which assertions need which input and skips with a named reason (it_skip_leg) when an input is missing.

How important is it

High inside this lane: it is the only proof of the real proxy behavior. Not a merge blocker for the dark build, a blocker for go-live.

Acceptance criteria

  • --donation-routing-smoke is in the harness-args.sh allowlist and its error message (:19, :34), in the run-cli.sh usage, parsing and the --no-mining-asserts refusal (:72-76, :275-278, :406-407), and dispatched from run.sh:300's neighbourhood.
  • The six legs above are assertions with names; each failure captures artifacts (capture_artifacts) and restores the baseline before returning, as the XvB smoke does.
  • A selftest (new file) shows the flag is accepted by --harness-arg, refused without --safety-backup if the phase needs it, and that a failed leg still runs the restore.
  • docs/dev/integration-testing.md (the flag table at :248) and docs/dev/testing-strategy.md (:457, :478) describe the phase.
  • No file named above grows past its ceiling; no ceiling is raised. The bench-ci registration ({{A12b}}) lands first or together.
  • A bench run on the PR head is cited in the PR description (tier4-e2e, mode targeted, with --harness-arg --donation-routing-smoke), with a stub endpoint only.
  • make test-integration-selftest, make test and make lint-sh pass. No new explanatory code comments.

Possible solutions

  • Mount a replacement constants file for the run (proposed above).
  • A second dashboard image tag built for the phase with test constants: a stronger separation, a heavier harness, and a build-path dependency.
  • Hold this phase until the real endpoint exists and add a live onion reachability leg: proves more, and the owner has not provisioned the endpoint; the stub phase is still needed for repeatable runs.

Part of #2476. Depends on {{A7}}, {{A8}} and {{A10}}.

Activity

  1. added this to the v2.1.0 milestone on Oct 27, 2026
  2. added
    enhancement
    testing
    on Oct 27, 2026
  3. added
    blocked
    on Oct 27, 2026
  4. pithead-developer commented on Nov 16, 2026

    @pithead-developer
    ContributorAuthor

    Blocked on #3701.
    Blocked on #3704.

    Dependency marker for the dashboard. The native blocked-by links on this issue already name these open blockers, and the tick removes blocked when every one of them closes.

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

    blockedenhancementtesting

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions