Repository navigation
Description
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), althoughminiis 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 from38-setup-command.sh:39) and pre-filled aspitheadin 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_portmeans 8080 (33-render-env.sh:190;validate_worker_endpointsaccepts 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 omitsp2pool.pool(inheritsmini). - Tier-1: the generated password is 32 alphanumeric characters, printed once at the end of setup, and absent from
status,doctorand the support bundle output (tests/stack/test-config.shgrep 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_IPequals the stubbed machine hostname; an explicitdashboard.hoststill wins. - Tier-1 (new
tests/stack/config/automatic-defaults.sh): withMemTotalstubbed below the thresholdP2POOL_FLAGScontains--light-mode; above it, absent. The threshold is written indocs/configuration.md.--no-randomxis 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 indashboard/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_portboth renderXMRIG_API_PORT=8080and the dashboard reads 8080;docs/workers.mdanddocs/configuration.mdsay 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
doctorline until then. - Light mode from
/proc/meminfoat render time (as33-render-env.sh:295already does for Tari), or from the dashboard's existing low-RAM floor so both agree. - Keep a hidden
--no-loginflag 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.
Activity
pithead-developer commentedon Oct 27, 2026
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.0before review.pithead-developer commentedon Oct 27, 2026
Questions before work continues (answer here, then remove the
questionlabel):5 remaining items
pithead-developer commentedon Oct 27, 2026
Questions before work continues (answer here, then remove the
questionlabel):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)?
pithead-architect commentedon Oct 27, 2026
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.
pithead-developer commentedon Oct 27, 2026
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.
pithead-developer commentedon Oct 27, 2026
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.percentdefaults to 2.donation.enableddefaults to false anddonation.percentto 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.pithead-developer commentedon Oct 31, 2026
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
MachineNamefield 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.pithead-developer commentedon Nov 10, 2026
Merged in #3721.
setup: fix #3575, #3693, #3699 — automatic defaults and dark donation…