Skip to content

Choose pool tier, dashboard login, hostname, P2Pool light mode and worker API port automatically #3575

Closed
1 of 1 issue completed

Description

@pithead-developer

What's the problem

Part of #3557. Setup asks questions the product can answer, and two defaults are undecided:

  • Pool tier is asked in the CLI (lib/pithead/24-config-wizard.sh:95-108), the browser wizard (web/static/wizard/setup.mjs:190) and the no-JS form (wizard/form.py:31), although mini is the default everywhere else.
  • Dashboard username and password are asked, with a 'none' escape (24-config-wizard.sh:110-131, setup.mjs:237-256).
  • The dashboard hostname is asked (31-directories-and-dashboard-state.sh:299-304, called from 38-setup-command.sh:39) and pre-filled as pithead in the browser and no-JS paths (wizard_config.py:18, form.py:30).
  • P2Pool has no light mode; P2Pool RAM knobs for the reduced-RAM tier: --light-mode (saves 2 GB) and --no-randomx #2486 measured about 2 GB saved on reduced-RAM hosts, but there is no code or flag.
  • A null workers.api_port means 8080 (33-render-env.sh:190; validate_worker_endpoints accepts null) but that is neither documented nor tested (Document and test null worker API port as the effective 8080 default #3377).

Proposed behaviour: pool tier defaults to mini and is never asked; the dashboard suggests nano or main from measured hashrate (a backend field here; the Overview attention item that shows it is specified in #3566 and built in #2515). Username is admin, the password is generated and shown once, and 'no login' exists only by leaving the password empty in config (Advanced). The hostname is the machine's own, via the existing non-interactive rule (31-directories-and-dashboard-state.sh:305-315). --light-mode is appended to P2POOL_FLAGS (33-render-env.sh:110-128) when host RAM is below a threshold. The worker API port is 8080 when null or absent.

what it impacts

All three setup paths and the first-run experience; low-RAM hosts (P2Pool container flags change on apply); anyone who relied on the 'none' login prompt. Existing installs keep working: no key is removed and nothing is rewritten.

How I found it

Read-only scan of develop at 9249b0b on 2026-10-21 from the lean roadmap's Setup questions and Config keys tables and the paths above. Nothing was executed. Unknown: the RAM threshold for light mode (take it from the #2486 measurement; config/config.py:30-45 holds the existing RAM floors for the low-RAM alert), the hashrate bands for the tier suggestion (take from upstream P2Pool guidance and measured data), and whether light mode recreates P2Pool in a way that affects the share window.

how important is it

Medium-high: it removes five of the twelve DIY questions and is required for the three-question setup. No user-facing bug without it.

acceptance criteria

  • Tier-1 (tests/stack/test-wizard-setup.sh): Enter through the CLI wizard asks no pool tier, username, password or hostname prompt; the read-count pins are updated and the resulting config omits p2pool.pool (inherits mini).
  • Tier-1: the generated password is 32 alphanumeric characters, printed once at the end of setup, and absent from status, doctor and the support bundle output (tests/stack/test-config.sh grep over each).
  • Tier-1 (dashboard/tests/web/test_wizard_form.py, test_wizard_new_machine.py): the no-JS (until that form is removed at the dashboard cutover) and browser submissions without those fields produce the same config as the CLI path (same keys, same defaults).
  • Tier-1: DIY setup with piped stdin never reads a hostname; rendered HOST_IP equals the stubbed machine hostname; an explicit dashboard.host still wins.
  • Tier-1 (new tests/stack/config/automatic-defaults.sh): with MemTotal stubbed below the threshold P2POOL_FLAGS contains --light-mode; above it, absent. The threshold is written in docs/configuration.md. --no-randomx is not adopted (expert flags via p2pool.extra_flags: an allowlisted passthrough so any upstream P2Pool option can be set from config.json, wizard and dashboard #2482).
  • Tier-1 (pytest in dashboard/tests/service, state API in dashboard/tests/web/test_server_state_api.py): a measured hashrate series yields the documented suggestion per band, no suggestion when the current tier fits or when less than 24 hours of data exists, and the stack never switches tier on its own.
  • Tier-1: absent and null workers.api_port both render XMRIG_API_PORT=8080 and the dashboard reads 8080; docs/workers.md and docs/configuration.md say so.
  • No new explanatory code comments. P2Pool RAM knobs for the reduced-RAM tier: --light-mode (saves 2 GB) and --no-randomx #2486 and Document and test null worker API port as the effective 8080 default #3377 are closed by this issue.

possible solutions

  • Suggestion as a field on the existing state payload computed from the trailing hashrate average, shown by the Overview attention item in the lean UI (Sovereign: build the contribution overview and attention summary #2515); or only a doctor line until then.
  • Light mode from /proc/meminfo at render time (as 33-render-env.sh:295 already does for Tari), or from the dashboard's existing low-RAM floor so both agree.
  • Keep a hidden --no-login flag for the CLI instead of relying on editing config, if the empty-password route proves too obscure.

Part of #3557.

Owner decision (operator note, 2026-10-27). The owner ruled on 2026-10-21 (lean roadmap, decision 1, N14) that DIY setup must be as easy as the appliance's. #3566 section H fixes the wizard at three questions, with pool tier, dashboard login, hostname, light mode and worker API port chosen automatically and never asked. The user-visible effect: a first-time DIY user answers three questions instead of today's longer prompt list, and the same answers give the same config on every setup path. On 2026-10-27 the owner directed that this work proceed now, as part of the #3557 configuration model that the new Settings and wizard pages depend on.

Sub-issues

Sub-issues

1 of 1 Issues completed
Loading 1 sub-issues

Activity

  1. added this to the v2.1.0 milestone on Oct 21, 2026
  2. added
    enhancement
    p2pool
    setup
    on Oct 21, 2026
  3. added
    blocked
    on Oct 21, 2026
  4. pithead-developer commented on Oct 27, 2026

    @pithead-developer
    ContributorAuthor

    Operator: unblocked from #3574. Choosing the pool tier, login, hostname, light mode and worker API port automatically does not depend on the profile code, so it can start now. Land it after #3632 (#3574) merges, because both touch the defaults, parse and render paths. Rebase on develop-v2.1.0 before review.

  5. removed
    blocked
    on Oct 27, 2026
  6. pithead-developer commented on Oct 27, 2026

    @pithead-developer
    ContributorAuthor

    Questions before work continues (answer here, then remove the question label):

    1. May automatic P2Pool light mode use the existing mode-aware low-RAM alert floor as its cutoff (my default, keeping memory decisions consistent; P2Pool RAM knobs for the reduced-RAM tier: --light-mode (saves 2 GB) and --no-randomx #2486 contains no completed threshold measurement)?
    2. May the 24-hour hashrate suggestion use provisional bands of nano below 10 kH/s, mini from 10 to below 100 kH/s, and main from 100 kH/s upward (my default proposal for explicit, testable boundaries, not a measured or established upstream recommendation)?
    3. May donation.percent default to 2 while donation.enabled remains false (my default, matching Add the donation config keys, off by default, and render them for the dashboard #3693’s suggested first-enable value)?
  7. 5 remaining items

  8. pithead-developer commented on Oct 27, 2026

    @pithead-developer
    ContributorAuthor

    Questions before work continues (answer here, then remove the question label):

    May this group use two sequential tier-4 jobs on the same PR head: targeted tier4-e2e for Compose/rendering and tier4-kvm setup-defaults for the wizard (my default, because the mandatory path rules require both tiers, while the group instruction permits only one job)?

  9. added
    question
    on Oct 27, 2026
  10. pithead-architect commented on Oct 27, 2026

    @pithead-architect

    Ruling: Yes—use two sequential tier-4 jobs: targeted tier4-e2e for rendering and live P2Pool behavior, then tier4-kvm setup-defaults for the wizard. The mandatory path-based coverage takes precedence over the group’s one-job limit. Finish the focused fixes and local checks, preserve the requirement to land after PR #3632, and incorporate that prerequisite before final validation. Run both jobs on the same final PR head through normal reservation and borrowing; return waiting with accepted jobs in bench_jobs until completed evidence is available. Record this decision in the PR body, retain password non-disclosure and authentication controls, then require current-head agent PASS followed by formal owner approval.

  11. removed
    question
    on Oct 27, 2026
  12. pithead-developer commented on Oct 27, 2026

    @pithead-developer
    ContributorAuthor

    Blocked on #3574. Draft PR #3721 implements all three grouped issues; 169 Python tests, 19 frontend tests, changed-line coverage and local gates pass, with preliminary verifier/security PASS. Final validation requires #3574's PR #3632 to merge first; its worker, owner and runner must complete that prerequisite, then this branch can incorporate it and run both sequential bench proofs. The blocker is documented on the PR; GitHub CI is queued and no bench job has been submitted.

    The runner resumes this issue when that one closes.

  13. added
    blocked
    on Oct 27, 2026
  14. pithead-developer commented on Oct 27, 2026

    @pithead-developer
    ContributorAuthor

    Owner, 2026-10-27: every donation defaults to 0 %, and owners opt in by choosing a share. This replaces the earlier operator answer that donation.percent defaults to 2. donation.enabled defaults to false and donation.percent to 0. Choosing a preset (0.1 to 5 %, or a custom value up to 10) sets both. Validation accepts 0 only while the donation is disabled.

  15. pithead-developer commented on Oct 31, 2026

    @pithead-developer
    ContributorAuthor

    Owner ruling, 2026-10-31 (tracked in #3810): the appliance setup wizard keeps a machine-name question, and provisioning uses the chosen name. DIY never asks and always uses the machine's hostname.

    This amends the hostname part of #3575: "chosen automatically" now holds for DIY only. Keep the appliance MachineName field and its reconcile path (#1970), gated on platform, instead of removing it. #3810 covers validation, the RigForge-only role, "Set up again", and the DIY prompt removal and rename procedure.

  16. removed
    blocked
    on Nov 9, 2026
  17. pithead-developer commented on Nov 10, 2026

    @pithead-developer
    ContributorAuthor

    Merged in #3721.

  18. added a commit that references this issue on Nov 10, 2026
    3e5af02
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

    enhancementp2poolsetup

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions