Skip to content

KVM battery mines to XMRig's donation address when the bench supplies synced nodes #4118

Closed

Description

@pithead-developer

What's the problem

The KVM battery sets up every appliance guest with HARNESS_WALLET and HARNESS_TARI, both defined once in tests/os/lib/core.sh:

  • HARNESS_WALLET (line 30) is XMRig's public donation address, as its comment says.
  • HARNESS_TARI (line 35) is a throwaway address that is not the owner's.

In local-node phases this is harmless. A scratch disk never syncs, so the sync gate keeps P2Pool and the built-in miner idle (#35).

When the bench supplies its synced nodes, some guests leave the sync gate and really mine, so their shares credit an address that is not the owner's:

On 2026-11-14 the owner ruled that test hash must go to the owner's own wallets, never "to nothing or someone else".

What it impacts

  • Hash on the KVM benches during these phases. It credits XMRig's donation address, a throwaway Tari address or the XvB donor id, never the owner.
  • Measured in bench-ci job 4020 (a rig run).
    • The RigForge guest reported an h60 of 3330, 520 and 1040 H/s across its three share legs, with fresh accepted shares in each.
    • The coordinator's built-in miner's accepted count rose in each leg: 2 to 3, 3 to 5, 6 to 8.
    • Per-leg duration is not measured.
  • Scope. Test harness only. No product code is affected.

How I found it

A read-only review on 2026-11-14, after the owner's ruling. It covered:

  • the source on develop at the paths above;
  • the kvm-rig.log artifact of bench-ci job 4020, lines 536-538, 607-608 and 678-679 (the three share legs).

How important is it

Medium. It breaks an owner rule on every KVM run that uses the bench's synced nodes: all test hash pays the owner. The hash involved per run is small, though. It is test-only, so it should not displace 2.0.4 release work. Criterion 2 would fail every node phase until the bench supplies the addresses, so the bench side lands first; this issue is held with operator-action until then.

Acceptance criteria

  1. Owner addresses used. When the bench supplies the owner's payout addresses, every guest the battery configures uses them for monero.wallet_address and tari.wallet_address. That includes the provision guest from its first submit, the migration-recovery guest, and the stack, rig and image-upgrade guests. A self-test checks the wallet in each of those served configs.
  2. Refusal without them. When the bench supplies its node variables (PITHEAD_OS_MONERO_NODE_HOST and the Tari equivalents) but not the payout addresses, the battery exits non-zero before it provisions any guest, and its message names the missing variable, never a value. The gate keys on the node variables, not on phase names. A self-test covers it.
  3. Local phases unchanged. With no node variables supplied, local-node phases and the self-tests run as today.
  4. No leak. The addresses arrive through bench-supplied environment variables. They never appear in the repository, a log, an artifact or the dashboard output the battery captures, and a self-test checks this.
  5. XvB. No hashing guest is routed to the real XvB pool under an identity that is not the owner's. Either the donor id is owner-controlled, or XvB is off, or the routing leg runs with the local miner off. The PR states which.

Possible solutions

  • Preferred. Make the single definition in tests/os/lib/core.sh read bench-supplied variables, for example HARNESS_WALLET="${PITHEAD_OS_PAYOUT_MONERO:-<today's value>}". Every phase then inherits them. Add one early check in tests/os/run.sh for criterion 2. The bench side supplies and validates the addresses; that is tracked separately.
  • Alternative. Keep the harness addresses, and turn the local miner and XvB off wherever remote mode is set (stack, rig share leg, image-upgrade, provision, migration recovery). This drops the mining assertions in the rig share leg and in migration_wait_for_mining, so the first option is preferred.

Activity

  1. added
    bug
    testing
    operator-action
    on Nov 15, 2026
  2. pithead-developer commented on Nov 15, 2026

    @pithead-developer
    ContributorAuthor

    The bench side, which supplies and validates the addresses, is bench-ci#2524. It lands first.

  3. added
    operator-hold
    and removed
    operator-action
    on Nov 16, 2026
  4. added this to the v2.0.4 milestone on Nov 20, 2026
  5. removed
    operator-hold
    on Nov 20, 2026
  6. pithead-developer commented on Nov 20, 2026

    @pithead-developer
    ContributorAuthor

    Fixed by #4120 (merged as e40f58a). When a bench supplies chain nodes, the KVM battery now mines only to the payout addresses the bench passes in, and require_owner_payouts refuses to start without them. With no payout variables set, the defaults are the owner's public wallets: the README donation wallet and the owner's Tari wallet. The battery's KVM node phases passed at the PR head with digest-verified owner payouts (provision, rig, stack, media). Image-upgrade is tracked separately in #4294.

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

    bugtesting

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions