Skip to content

List the project donation route in the egress and topology views #3702

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. The first report requires the slice to appear in the egress list. The egress and topology views know no project destination, and one existing row is mislabelled for the new context:

  • dashboard/mining_dashboard/service/network/egress.py:121-130 lists three xmrig-proxy connections: the local P2Pool stratum, XvB donation pool and dev donation. The last (:128) is xmrig-proxy's own built-in fee, hard-coded INACTIVE. Next to a project donation, "dev donation" reads as the project's, so it needs a name that says whose fee it is.
  • A clearnet route is classified as a leak unless named in the chosen-clearnet test (egress.py:175-181), which lists only the XvB donation pool; the summary label names each clearnet choice (:205-208). The topology builder has the same list (service/network/topology.py:93, :159-163) and its own edge for the XvB route.
  • Both builders are fed from config (egress.py:234-252, topology.py:179-198); neither reads any donation setting.

Add a Pithead project donation connection on xmrig-proxy in egress.py and an edge Project donation in topology.py:

  • Route TOR when enabled with DONATION_TOR_ENABLED, CLEARNET when enabled without it, INACTIVE when available but off. When the destination constants are empty ({{A2}}) the row and the edge are absent, so nothing user-visible changes.
  • A clearnet project route counts as chosen_clearnet (egress.py:175-181, topology.py:159-163), not as a leak; the summary label gains "Project donation over clearnet by your choice: your IP is visible to the project endpoint".
  • Rename dev donation to xmrig-proxy built-in fee; update dashboard/tests/frontend/fixtures/state.json:174-178 and every test that matches the old name.
  • Put the route helper beside _xvb_route in service/network/topology_graph.py.

Both modules are under 400 lines. dashboard/tests/service/network/test_egress.py is at its 448-line ceiling, so the new tests go in a new file (the pattern is test_egress_clearnet_choice.py).

What it impacts

The Network view, the topology graph and the egress summary the status line uses. With the feature unavailable the output must be unchanged except for the renamed row.

How I found it

Read-only scan of origin/develop-v2.1.0 at 02852bd on 2026-10-27 from the paths above. Nothing was executed. Unknown: how the new topology edge lays out in the graph (an extra external node for the endpoint) and whether any frontend test enumerates the node set; the PR must run the frontend suite and a Playwright run for the topology page.

How important is it

Medium. The egress list is how an operator audits where the host talks; a route missing from it breaks the privacy story the feature is allowed to ship under.

Acceptance criteria

  • New tests (test_egress_project_donation.py, test_topology_project_donation.py): unavailable gives no row and no edge; available and off gives INACTIVE; enabled with Tor gives TOR; enabled without Tor gives CLEARNET with chosen_clearnet true, no leak count, and the summary label above.
  • The clearnet project route is classified exactly as the XvB one is, which assumes the matching firewall exception exists. Until the firewall child ({{A9b}}) ships, a clearnet dial from xmrig-proxy is dropped at the host; the PR says so in its description and a test pins the classification.
  • dev donation is renamed in code, fixtures and tests; a grep shows no remaining occurrence.
  • make test, make test-frontend and make test-patch-coverage (90 % of changed lines) pass; make lint-file-budget passes with no ceiling raised. No new explanatory code comments.

Possible solutions

  • A new boolean project_donation_route argument on compute_egress_posture and compute_topology (recommended: same shape as xvb_standby_source).
  • Read the route inside the builders from config: fewer arguments, but the pure builders stop being pure and the existing tests stop being parameter-only.

Part of #2476. Depends on {{A1}} and {{A2}}.

Activity

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

    @pithead-developer
    ContributorAuthor

    Blocked on #3695.

    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

    blockeddashboardenhancement

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions