qml: clarify onboarding storage options for existing datadir #1050

Open
johnny9 wants to merge 19 commits from codex/onboarding-keep-current into qt6 AGit
johnny9 commented 2026-10-21 05:49:17 +00:00 (Migrated from github.com)

Mark the profile's configured storage mode with a Your current setting badge. Keeping it preserves the exact prune target. If no prune setting is present, use full storage.

Describe reduced storage as “Uses about %1GB with older data pruned, suitable for regular wallet use.”

For prune=1, show Manual pruning with “Prune older blocks manually to control storage use.” and no automatic storage estimate.

Show a redownload warning when switching from pruned storage to full storage. Keep Custom available when selecting another option and include chainstate in its total size. Keep option cards at their original padding, typography and text alignment while allowing descriptions to wrap, including cards with no badge or warning.

Stop onboarding choices from flashing on click and rename the network step to Connect to the network.

Hide Developer options in the onboarding About dialog, link License to Bitcoin Core's license file, and show Version as a read-only value.

Parse localized storage, mempool, cache and thread input before saving. Reject invalid values without changing the setting, including malformed grouping that Qt would otherwise rewrite. Use the same database cache limit as Core's Qt GUI.

Screenshots from the app at 800 × 665:

Full storage Reduced storage
Full storage marked as the current setting Reduced storage marked as current, with a redownload warning under full storage
Manual pruning Custom retained after selecting Reduce storage
Manual pruning with its description and no automatic storage estimate Custom storage remains available and includes chainstate in the total
Network step Onboarding About dialog
Connect to the network step Onboarding About dialog with a read-only version and no Developer options
Valid grouped input Invalid grouping
Mempool size input accepts 1,000 Mempool size input rejects 1,00 and shows an error

Custom storage locations are now retained when selecting Default and restored when selecting Custom. A separate Choose location… action opens the folder picker; canceling preserves the selection. Popup pruning edits select Custom until the exact saved setting is restored. The redownload warning is conditional, and the unused Header animation option is removed.

Returning to the exact saved MiB target restores the current-setting card, including native mouse/keyboard activation. Rounded GB values do not count as the same target, and manual pruning stays distinct from full storage. Invalid database-cache input shows minimum-only guidance while retaining Core/integer validation.

Validation at ed40a35c6940: native application build, all 63 affected onboarding QML cases, and the complete 12-flow real-GUI pre-init suite pass, including the formerly failing native Custom click. Startup, all shutdown cases and blocked startup also pass. The eight native CTest groups passed before the last QML-only binding change (920 C++ passes, 10 existing skips; full QML 772; integration 20); affected QML was rebuilt and retested on the final head. Production C++ is unchanged by the final binding/test follow-ups.

Strict LLVM 22 ASan/LSan/UBSan/integer C++ validation passes all 180 OptionsModel and 12 storage cases with no extra exceptions. Actual instrumented QML passes all 63 onboarding cases and 62 unchanged integer-input cases, with leak detection enabled and only the independently reproduced Qt hash exception. Old-production and native-keyboard controls fail before the fixes. Matching LLVM 22/Bitcoin-plugin checks, pinned Ruff and supplemental lint pass on the changed scope.

The standalone checkout lacks the requested top-level CI drivers. Configured rootless Docker is available; pinned Core-only fallback runs are incomplete and do not validate parent GUI-QML. The IPC-enabled standalone GUI uses a local node factory; actual Core multiprocess IPC lifecycle remains uncovered and interface_gui.py is absent. Earlier CI run.

Fixes #1053

Fixes #1014
Fixes #942
Fixes #941
Fixes #1002

Review fixes and validation

Review fixes at f68f5bf24c: restore remembered Custom directories after selecting Default, reset edited settings when switching profiles so proxy choices cannot carry over, explain manual-pruning switch behavior, and show an advisory when free space is insufficient for a full download. Validation: 63 onboarding QML, 17 asynchronous onboarding, 181 settings-model, and 12 storage tests pass. The original prune-only reset fails the new cross-directory settings regression. The broader QML suite has 815 passes and four payment-request amount-validation failures also reproduced on an unchanged baseline; no payment code was changed.

Mark the profile's configured storage mode with a **Your current setting** badge. Keeping it preserves the exact prune target. If no prune setting is present, use full storage. Describe reduced storage as “Uses about %1GB with older data pruned, suitable for regular wallet use.” For `prune=1`, show **Manual pruning** with “Prune older blocks manually to control storage use.” and no automatic storage estimate. Show a redownload warning when switching from pruned storage to full storage. Keep Custom available when selecting another option and include chainstate in its total size. Keep option cards at their original padding, typography and text alignment while allowing descriptions to wrap, including cards with no badge or warning. Stop onboarding choices from flashing on click and rename the network step to **Connect to the network**. Hide Developer options in the onboarding About dialog, link License to Bitcoin Core's license file, and show Version as a read-only value. Parse localized storage, mempool, cache and thread input before saving. Reject invalid values without changing the setting, including malformed grouping that Qt would otherwise rewrite. Use the same database cache limit as Core's Qt GUI. Screenshots from the app at 800 × 665: | Full storage | Reduced storage | | --- | --- | | <img width="400" alt="Full storage marked as the current setting" src="https://raw.githubusercontent.com/johnny9/gui-qml/a5a1758b23f3761e301e94bd8cce3e2e7a14f6a3/storage-full-current.png"> | <img width="400" alt="Reduced storage marked as current, with a redownload warning under full storage" src="https://raw.githubusercontent.com/johnny9/gui-qml/a5a1758b23f3761e301e94bd8cce3e2e7a14f6a3/storage-reduced-current.png"> | | Manual pruning | Custom retained after selecting Reduce storage | | --- | --- | | <img width="400" alt="Manual pruning with its description and no automatic storage estimate" src="https://raw.githubusercontent.com/johnny9/gui-qml/a5a1758b23f3761e301e94bd8cce3e2e7a14f6a3/storage-manual-pruning.png"> | <img width="400" alt="Custom storage remains available and includes chainstate in the total" src="https://raw.githubusercontent.com/johnny9/gui-qml/a5a1758b23f3761e301e94bd8cce3e2e7a14f6a3/storage-custom-retained.png"> | | Network step | Onboarding About dialog | | --- | --- | | <img width="400" alt="Connect to the network step" src="https://raw.githubusercontent.com/johnny9/gui-qml/a5a1758b23f3761e301e94bd8cce3e2e7a14f6a3/connect-to-network.png"> | <img width="400" alt="Onboarding About dialog with a read-only version and no Developer options" src="https://raw.githubusercontent.com/johnny9/gui-qml/a5a1758b23f3761e301e94bd8cce3e2e7a14f6a3/onboarding-about.png"> | | Valid grouped input | Invalid grouping | | --- | --- | | <img width="400" alt="Mempool size input accepts 1,000" src="https://raw.githubusercontent.com/johnny9/gui-qml/a5a1758b23f3761e301e94bd8cce3e2e7a14f6a3/settings-grouped-integer.png"> | <img width="400" alt="Mempool size input rejects 1,00 and shows an error" src="https://raw.githubusercontent.com/johnny9/gui-qml/a5a1758b23f3761e301e94bd8cce3e2e7a14f6a3/settings-invalid-grouping.png"> | Custom storage locations are now retained when selecting Default and restored when selecting Custom. A separate Choose location… action opens the folder picker; canceling preserves the selection. Popup pruning edits select Custom until the exact saved setting is restored. The redownload warning is conditional, and the unused Header animation option is removed. Returning to the exact saved MiB target restores the current-setting card, including native mouse/keyboard activation. Rounded GB values do not count as the same target, and manual pruning stays distinct from full storage. Invalid database-cache input shows minimum-only guidance while retaining Core/integer validation. Validation at `ed40a35c6940`: native application build, all 63 affected onboarding QML cases, and the complete 12-flow real-GUI pre-init suite pass, including the formerly failing native Custom click. Startup, all shutdown cases and blocked startup also pass. The eight native CTest groups passed before the last QML-only binding change (920 C++ passes, 10 existing skips; full QML 772; integration 20); affected QML was rebuilt and retested on the final head. Production C++ is unchanged by the final binding/test follow-ups. Strict LLVM 22 ASan/LSan/UBSan/integer C++ validation passes all 180 OptionsModel and 12 storage cases with no extra exceptions. Actual instrumented QML passes all 63 onboarding cases and 62 unchanged integer-input cases, with leak detection enabled and only the independently reproduced Qt hash exception. Old-production and native-keyboard controls fail before the fixes. Matching LLVM 22/Bitcoin-plugin checks, pinned Ruff and supplemental lint pass on the changed scope. The standalone checkout lacks the requested top-level CI drivers. Configured rootless Docker is available; pinned Core-only fallback runs are incomplete and do not validate parent GUI-QML. The IPC-enabled standalone GUI uses a local node factory; actual Core multiprocess IPC lifecycle remains uncovered and `interface_gui.py` is absent. [Earlier CI run](https://github.com/bitcoin-core/gui-qml/pull/1050/checks). Fixes #1053 Fixes #1014 Fixes #942 Fixes #941 Fixes #1002 ## Review fixes and validation Review fixes at `f68f5bf24c`: restore remembered Custom directories after selecting Default, reset edited settings when switching profiles so proxy choices cannot carry over, explain manual-pruning switch behavior, and show an advisory when free space is insufficient for a full download. Validation: 63 onboarding QML, 17 asynchronous onboarding, 181 settings-model, and 12 storage tests pass. The original prune-only reset fails the new cross-directory settings regression. The broader QML suite has 815 passes and four payment-request amount-validation failures also reproduced on an unchanged baseline; no payment code was changed.
pseudoramdom commented 2026-10-22 17:32:12 +00:00 (Migrated from github.com)

Will review soon.
Unrelated to this PR - wonder how there's a floating "Done" button in Settings sidebar. Is this with wallet disabled?

Will review soon. Unrelated to this PR - wonder how there's a floating "Done" button in Settings sidebar. Is this with wallet disabled?
pseudoramdom commented 2026-10-27 21:21:13 +00:00 (Migrated from github.com)

Ran in to an issue related to "Storage location" step while testing this - https://github.com/bitcoin-core/gui-qml/issues/1053 . Would be nice if you can address #1053 as part of this since this is related. Totally okay if you want to do it as a follow-up.

Ran in to an issue related to "Storage location" step while testing this - https://github.com/bitcoin-core/gui-qml/issues/1053 . Would be nice if you can address #1053 as part of this since this is related. Totally okay if you want to do it as a follow-up.
johnny9 commented 2026-11-01 19:01:59 +00:00 (Migrated from github.com)

Ran in to an issue related to "Storage location" step while testing this - https://github.com/bitcoin-core/gui-qml/issues/1053 . Would be nice if you can address #1053 as part of this since this is related. Totally okay if you want to do it as a follow-up.

Ill give it a try. I think this likely fits within the scope

> Ran in to an issue related to "Storage location" step while testing this - https://github.com/bitcoin-core/gui-qml/issues/1053 . Would be nice if you can address #1053 as part of this since this is related. Totally okay if you want to do it as a follow-up. Ill give it a try. I think this likely fits within the scope
First-time contributor

🟠 Minor · Restoring the exact prune target leaves the current-setting card unchecked

On an existing prune=1907 profile, popup edits from 2 to 3 to 2 GB restore the exact target but leave Custom selected instead of the card marked “Your current setting.”

Location: qml/components/StorageOptions.qml:71 (head).

🔵 Suggestion · Database-cache errors present the integer type limit as guidance

Rejected editable database-cache input displays 2147483647 MiB as its upper bound, where a lower-bound-only message would provide clearer correction guidance.

Location: qml/models/options_model.cpp:317 (head).

Review coverage was incomplete.


Reviewed: 73ca0bc518ee · Full review report · Previous reports

permalink

<!-- ralph:bitcoin-core/gui-qml --> <!-- ralph-engine:current:965af1044d9e41839565702e4d9bd0a751eda81f6e8b6402747fa296ef84ebea:f7677f01bbeeeda2e9dfb365f1407384e31618edbeddff6daa5ff425bb8651e2 --> <!-- ralph-base:6cdad5344018f35e8c33c77a23f6ba996d507549 --> <!-- ralph-head:73ca0bc518ee95a943a1e10a08c234130d24d1f0 --> <!-- ralph-case:877ce71cf63afc860e6e8140db38e4a8b372210a78533ecb7cb83857a3ee56ee --> **🟠 Minor · Restoring the exact prune target leaves the current-setting card unchecked** On an existing prune=1907 profile, popup edits from 2 to 3 to 2 GB restore the exact target but leave Custom selected instead of the card marked “Your current setting.” Location: [`qml/components/StorageOptions.qml:71`](<https://git.fish.foo/bitcoin-core/gui-qml/src/commit/73ca0bc518ee95a943a1e10a08c234130d24d1f0/qml/components/StorageOptions.qml#L71>) (head). **🔵 Suggestion · Database-cache errors present the integer type limit as guidance** Rejected editable database-cache input displays 2147483647 MiB as its upper bound, where a lower-bound-only message would provide clearer correction guidance. Location: [`qml/models/options_model.cpp:317`](<https://git.fish.foo/bitcoin-core/gui-qml/src/commit/73ca0bc518ee95a943a1e10a08c234130d24d1f0/qml/models/options_model.cpp#L317>) (head). Review coverage was incomplete. <!-- Review tier: sensitive --> --- Reviewed: [`73ca0bc518ee`](<https://git.fish.foo/bitcoin-core/gui-qml/commit/73ca0bc518ee95a943a1e10a08c234130d24d1f0>) · [Full review report](<https://review.fish.foo/traces/gui/1050-73ca0bc518ee95a943a1e10a08c234130d24d1f0-1988-2.html>) · [Previous reports](<https://review.fish.foo/traces/1050/>) [permalink](<https://review.fish.foo/traces/gui/1050-73ca0bc518ee95a943a1e10a08c234130d24d1f0-1988-2.html>)
rreview commented 2026-11-01 19:38:25 +00:00 (Migrated from github.com)

Earlier concerns neither republished nor resolved: 1 minor finding. See the Run archive linked from the Review report for their assessments.

🔴 Major · Reselecting Custom discards the configuration-selected datadir source

During onboarding, reselecting a directory supplied by datadir= in the default bitcoin.conf, without command-line -datadir or -conf, skips that configuration and persists the change, potentially removing configured proxy restrictions on this and later launches.

Location: qml/components/StorageLocations.qml:82 (head).

🟠 Minor · Low-space exception permits a prune target above the saved target

On a low-space profile with prune=4096, editing the popup target from 5 GB to 4 and back to 5 permits 4768 MiB, exceeding the saved target rather than only keeping or lowering it.

Location: qml/models/onboardingoptionsmodel.cpp:221 (head).

🔵 Suggestion · Changing directory silently drops earlier network privacy choices

Changing the storage directory intentionally reloads the new profile's network settings, but onboarding gives no notice when this discards a proxy or Tor choice made earlier in the session.

Location: qml/models/onboardingoptionsmodel.cpp:194 (head).

🔵 Suggestion · Manual-pruning help replaces the disabled switch's lock explanation

With command-line -prune=1 on an existing profile, the disabled Store recent blocks only switch tells the user to turn it on instead of explaining its command-line lock.

Location: qml/pages/settings/StorageSettingsPage.qml:42 (head).

🔵 Suggestion · The sizing-test commit claims a production change and depends on an unrelated test hook

a5931d7 describes a layout-sizing change but only adds a test, whose optionButtonHeader lookup depends on a hook placed in the earlier highlight-animation commit.

Location: qml/controls/OptionButton.qml:81 at ec48c8a887d2 (commit) (commit).

🔵 Suggestion · Storage-card corrections are interleaved with unrelated changes

The storage-card workflow introduced in ab4dbbd is corrected across several later commits, requiring reviewers to reconstruct selection bindings and warning behavior through intermediate implementations.

Location: qml/components/StorageOptions.qml:91 at 7de892dc8022 (commit) (commit).

Review coverage was incomplete.


Reviewed: 63a406f17251 · Review report

<!-- ralph-major:bitcoin-core/gui-qml --> Earlier concerns neither republished nor resolved: 1 minor finding. See the Run archive linked from the Review report for their assessments. **🔴 Major · Reselecting Custom discards the configuration-selected datadir source** During onboarding, reselecting a directory supplied by `datadir=` in the default `bitcoin.conf`, without command-line `-datadir` or `-conf`, skips that configuration and persists the change, potentially removing configured proxy restrictions on this and later launches. Location: [qml/components/StorageLocations.qml:82](<https://github.com/bitcoin-core/gui-qml/blob/63a406f17251975198a962445840ded020449c48/qml/components/StorageLocations.qml#L82>) (head). **🟠 Minor · Low-space exception permits a prune target above the saved target** On a low-space profile with `prune=4096`, editing the popup target from 5 GB to 4 and back to 5 permits 4768 MiB, exceeding the saved target rather than only keeping or lowering it. Location: [qml/models/onboardingoptionsmodel.cpp:221](<https://github.com/bitcoin-core/gui-qml/blob/63a406f17251975198a962445840ded020449c48/qml/models/onboardingoptionsmodel.cpp#L221>) (head). **🔵 Suggestion · Changing directory silently drops earlier network privacy choices** Changing the storage directory intentionally reloads the new profile's network settings, but onboarding gives no notice when this discards a proxy or Tor choice made earlier in the session. Location: [qml/models/onboardingoptionsmodel.cpp:194](<https://github.com/bitcoin-core/gui-qml/blob/63a406f17251975198a962445840ded020449c48/qml/models/onboardingoptionsmodel.cpp#L194>) (head). **🔵 Suggestion · Manual-pruning help replaces the disabled switch's lock explanation** With command-line `-prune=1` on an existing profile, the disabled Store recent blocks only switch tells the user to turn it on instead of explaining its command-line lock. Location: [qml/pages/settings/StorageSettingsPage.qml:42](<https://github.com/bitcoin-core/gui-qml/blob/63a406f17251975198a962445840ded020449c48/qml/pages/settings/StorageSettingsPage.qml#L42>) (head). **🔵 Suggestion · The sizing-test commit claims a production change and depends on an unrelated test hook** `a5931d7` describes a layout-sizing change but only adds a test, whose `optionButtonHeader` lookup depends on a hook placed in the earlier highlight-animation commit. Location: [qml/controls/OptionButton.qml:81 at ec48c8a887d2 (commit)](<https://github.com/bitcoin-core/gui-qml/blob/ec48c8a887d2b458176c92feffe081d21168b582/qml/controls/OptionButton.qml#L81>) (commit). **🔵 Suggestion · Storage-card corrections are interleaved with unrelated changes** The storage-card workflow introduced in `ab4dbbd` is corrected across several later commits, requiring reviewers to reconstruct selection bindings and warning behavior through intermediate implementations. Location: [qml/components/StorageOptions.qml:91 at 7de892dc8022 (commit)](<https://github.com/bitcoin-core/gui-qml/blob/7de892dc8022c09c30eae3b2cb31cfb974f9546e/qml/components/StorageOptions.qml#L91>) (commit). Review coverage was incomplete. <!-- Review tier: sensitive --> --- Reviewed: [`63a406f17251`](<https://github.com/bitcoin-core/gui-qml/commit/63a406f17251975198a962445840ded020449c48>) · [Review report](<https://review.fish.foo/report/gui/1050-63a406f17251975198a962445840ded020449c48-3204-10.html>)
johnny9 commented 2026-11-02 15:37:00 +00:00 (Migrated from github.com)

Fixed #1053 in cdf76d82a: Custom retains the last location, including -datadir; Choose location… changes it explicitly and canceling preserves the selection. The screenshots use -disablewallet; Done is the existing Settings navigation button.

The follow-up findings are fixed in f77b90d5 and ed40a35c. Exact saved targets restore the current-setting card (1907 MiB through 2 → 3 → 2 GB), with rounded and manual-pruning values kept distinct. Direct model notifications restore the card after native button clicks and Space activation, including an unchanged exact target. Custom state is retained. Database-cache errors now show only the minimum while preserving validation.

Validation at ed40a35c6940: native application build, all 63 affected onboarding QML cases, and the complete 12-flow real-GUI pre-init suite pass, including the formerly failing native Custom click. Startup, all shutdown cases and blocked startup also pass. The eight native CTest groups passed before the last QML-only binding change (920 C++ passes, 10 existing skips; full QML 772; integration 20); affected QML was rebuilt and retested on the final head. Production C++ is unchanged by the final binding/test follow-ups.

Strict LLVM 22 ASan/LSan/UBSan/integer C++ validation passes all 180 OptionsModel and 12 storage cases with no extra exceptions. Actual instrumented QML passes all 63 onboarding cases and 62 unchanged integer-input cases, with leak detection enabled and only the independently reproduced Qt hash exception. Old-production and native-keyboard controls fail before the fixes. Matching LLVM 22/Bitcoin-plugin checks, pinned Ruff and supplemental lint pass on the changed scope.

Correction to the earlier CI note: The standalone checkout lacks the requested top-level CI drivers. Configured rootless Docker is available; pinned Core-only fallback runs are incomplete and do not validate parent GUI-QML. The IPC-enabled standalone GUI uses a local node factory; actual Core multiprocess IPC lifecycle remains uncovered and interface_gui.py is absent. Current CI.

Additional CI follow-up in 34acc2a9d5: the inherited custom-fee test required exact equality with the final signed transaction size. Pinned Core reproduced a 141-sat fee with a 140-vB transaction after a shorter ECDSA signature, so this was a test defect. The test now uses Core's bounded fee assertion and retains the wallet-minimum override and relay-minimum rejection checks. Shared-path validation passes eleven fee-boundary controls and both instrumented GUI fee scenarios. Only the Python test changed in this follow-up; earlier sanitizer/driver/IPC qualifications remain unchanged. New hosted checks are queued or running on this revision; no result is claimed yet. A freshly rebuilt native application for this PR also passes both GUI fee scenarios.

Fixed #1053 in cdf76d82a: Custom retains the last location, including -datadir; Choose location… changes it explicitly and canceling preserves the selection. The screenshots use -disablewallet; Done is the existing Settings navigation button. The follow-up findings are fixed in f77b90d5 and ed40a35c. Exact saved targets restore the current-setting card (1907 MiB through 2 → 3 → 2 GB), with rounded and manual-pruning values kept distinct. Direct model notifications restore the card after native button clicks and Space activation, including an unchanged exact target. Custom state is retained. Database-cache errors now show only the minimum while preserving validation. Validation at `ed40a35c6940`: native application build, all 63 affected onboarding QML cases, and the complete 12-flow real-GUI pre-init suite pass, including the formerly failing native Custom click. Startup, all shutdown cases and blocked startup also pass. The eight native CTest groups passed before the last QML-only binding change (920 C++ passes, 10 existing skips; full QML 772; integration 20); affected QML was rebuilt and retested on the final head. Production C++ is unchanged by the final binding/test follow-ups. Strict LLVM 22 ASan/LSan/UBSan/integer C++ validation passes all 180 OptionsModel and 12 storage cases with no extra exceptions. Actual instrumented QML passes all 63 onboarding cases and 62 unchanged integer-input cases, with leak detection enabled and only the independently reproduced Qt hash exception. Old-production and native-keyboard controls fail before the fixes. Matching LLVM 22/Bitcoin-plugin checks, pinned Ruff and supplemental lint pass on the changed scope. Correction to the earlier CI note: The standalone checkout lacks the requested top-level CI drivers. Configured rootless Docker is available; pinned Core-only fallback runs are incomplete and do not validate parent GUI-QML. The IPC-enabled standalone GUI uses a local node factory; actual Core multiprocess IPC lifecycle remains uncovered and `interface_gui.py` is absent. [Current CI](https://github.com/bitcoin-core/gui-qml/pull/1050/checks). Additional CI follow-up in 34acc2a9d52f: the inherited custom-fee test required exact equality with the final signed transaction size. Pinned Core reproduced a 141-sat fee with a 140-vB transaction after a shorter ECDSA signature, so this was a test defect. The test now uses Core's bounded fee assertion and retains the wallet-minimum override and relay-minimum rejection checks. Shared-path validation passes eleven fee-boundary controls and both instrumented GUI fee scenarios. Only the Python test changed in this follow-up; earlier sanitizer/driver/IPC qualifications remain unchanged. New hosted checks are queued or running on this revision; no result is claimed yet. A freshly rebuilt native application for this PR also passes both GUI fee scenarios.
jarolrod commented 2026-11-10 22:52:31 +00:00 (Migrated from github.com)

The storage reset this PR adds on a directory change fixes a case I reproduced on current qt6. The same carry-over still applies to the proxy, which this branch does not reset.

What the storage reset fixes

At eed1f426fcb6: start the wizard with the default directory, click Reduce storage, go Back, choose an existing full node's directory as Custom, and press Start. The existing node's settings.json gained "prune": "1907" and the node came up pruned. With txindex=1 in its bitcoin.conf, the app stopped with Prune mode is incompatible with -txindex. on every relaunch. In the reverse direction, a pruned node lost its prune key and stopped at the rebuild question. Choosing the existing directory first, without touching storage, kept its setting in every case.

By source, clearing the prune mark in setDataDir (onboardingoptionsmodel.cpp#L187-L195) and the onboardingStorageChoiceResetsForAnotherDirectory test cover this. I have not run this branch.

What remains: the proxy

To reproduce at eed1f426fcb6, with an existing node directory B whose settings.json has "proxy": "127.0.0.1:9050":

  1. Start the wizard with no saved directory and continue to the last page with the default directory selected.
  2. Open Network settings → Proxy settings. Turn Enable on and click Save. Turn it off and click Save. Close the popup.
  3. Go Back twice to the storage location page, choose Custom and pick B.
  4. Click Next, Next and Start.

B's settings.json loses "proxy" and gains "proxy-prev": "127.0.0.1:9050". The started node's getnetworkinfo reports an empty proxy for ipv4, ipv6 and onion. The result was the same offscreen and native.

Controls with the same navigation kept B's proxy:

  • Never opening the popup.
  • Turning the switch on and off without clicking Save.

After the switch to B, no wizard page shows the proxy. Reopening the popup shows Enable off, while B's file still has the proxy. With B chosen first and nothing touched, the same popup shows B's proxy as on.

One related case may be intended: if B has no proxy and the user turned the proxy on for the default directory, B gains that proxy on Start.

setDataDir does not clear the set of settings the user has touched (onboardingoptionsmodel.cpp#L188-L198), and the preview for the new directory skips every touched key (core_settings.cpp#L832-L858). This branch clears only prune. By source the same applies to listen, NAT-PMP, server and the Tor proxy; I did not run those.

Clearing the whole touched set on a real directory change would cover all of them. If an explicit choice should survive the switch, the wizard could show it against the new directory's own value before Start.

This needs two saved changes and two Back presses, so it is narrow. The outcome is an existing node starting without the proxy it was configured with.

Reproduced on merged qt6 at eed1f426fcb6, macOS / Qt 6.9, isolated regtest, offscreen and native. No traffic was observed, since the node ran with -connect=0; the evidence is settings.json, getnetworkinfo and debug.log. The directory was passed to the model with the call the folder dialog makes, and the other steps were clicks through the test bridge. I wrote B's proxy key by hand in the app's format and confirmed with bitcoind that it took effect.

The storage reset this PR adds on a directory change fixes a case I reproduced on current `qt6`. The same carry-over still applies to the proxy, which this branch does not reset. **What the storage reset fixes** At `eed1f426fcb6`: start the wizard with the default directory, click **Reduce storage**, go Back, choose an existing full node's directory as Custom, and press Start. The existing node's `settings.json` gained `"prune": "1907"` and the node came up pruned. With `txindex=1` in its `bitcoin.conf`, the app stopped with `Prune mode is incompatible with -txindex.` on every relaunch. In the reverse direction, a pruned node lost its prune key and stopped at the rebuild question. Choosing the existing directory first, without touching storage, kept its setting in every case. By source, clearing the prune mark in `setDataDir` ([onboardingoptionsmodel.cpp#L187-L195](https://github.com/bitcoin-core/gui-qml/blob/e6aea2543d8106df975d84553ef631625ed18276/qml/models/onboardingoptionsmodel.cpp#L187-L195)) and the `onboardingStorageChoiceResetsForAnotherDirectory` test cover this. I have not run this branch. **What remains: the proxy** To reproduce at `eed1f426fcb6`, with an existing node directory B whose `settings.json` has `"proxy": "127.0.0.1:9050"`: 1. Start the wizard with no saved directory and continue to the last page with the default directory selected. 2. Open **Network settings → Proxy settings**. Turn **Enable** on and click **Save**. Turn it off and click **Save**. Close the popup. 3. Go Back twice to the storage location page, choose Custom and pick B. 4. Click Next, Next and Start. B's `settings.json` loses `"proxy"` and gains `"proxy-prev": "127.0.0.1:9050"`. The started node's `getnetworkinfo` reports an empty proxy for ipv4, ipv6 and onion. The result was the same offscreen and native. Controls with the same navigation kept B's proxy: - Never opening the popup. - Turning the switch on and off without clicking Save. After the switch to B, no wizard page shows the proxy. Reopening the popup shows **Enable** off, while B's file still has the proxy. With B chosen first and nothing touched, the same popup shows B's proxy as on. One related case may be intended: if B has no proxy and the user turned the proxy on for the default directory, B gains that proxy on Start. `setDataDir` does not clear the set of settings the user has touched ([onboardingoptionsmodel.cpp#L188-L198](https://github.com/bitcoin-core/gui-qml/blob/eed1f426fcb64daa61b004590335a03afe376274/qml/models/onboardingoptionsmodel.cpp#L188-L198)), and the preview for the new directory skips every touched key ([core_settings.cpp#L832-L858](https://github.com/bitcoin-core/gui-qml/blob/eed1f426fcb64daa61b004590335a03afe376274/qml/core_settings.cpp#L832-L858)). This branch clears only `prune`. By source the same applies to listen, NAT-PMP, server and the Tor proxy; I did not run those. Clearing the whole touched set on a real directory change would cover all of them. If an explicit choice should survive the switch, the wizard could show it against the new directory's own value before Start. This needs two saved changes and two Back presses, so it is narrow. The outcome is an existing node starting without the proxy it was configured with. Reproduced on merged `qt6` at `eed1f426fcb6`, macOS / Qt 6.9, isolated regtest, offscreen and native. No traffic was observed, since the node ran with `-connect=0`; the evidence is `settings.json`, `getnetworkinfo` and `debug.log`. The directory was passed to the model with the call the folder dialog makes, and the other steps were clicks through the test bridge. I wrote B's proxy key by hand in the app's format and confirmed with `bitcoind` that it took effect.
jarolrod commented 2026-11-13 15:11:38 +00:00 (Migrated from github.com)

I ran this branch at f68f5bf24c50. Both parts of my comment above are fixed: the storage choice and the proxy.

  • Storage. Default directory, Reduce storage, Back, Custom set to an existing full node's directory, Start. Storage amount now shows Store all data with Your current setting for that directory, its settings.json gains only qml_onboarded, and the node comes up unpruned. With txindex=1 in its bitcoin.conf there is no error. In the reverse direction a pruned node keeps "prune": "1907" and there is no rebuild question.
  • Proxy. After the proxy switch is saved on and then saved off for the default directory, the existing node keeps "proxy": "127.0.0.1:9050", gets no proxy-prev, and getnetworkinfo reports the proxy.
  • A choice made after selecting the directory is still applied to it. Reduce storage and the proxy, chosen with the existing directory selected, were both written there.
  • The pages follow the switch. Storage amount, the Storage settings popup and the Proxy popup showed the new directory's own values, so I found no page showing a choice that Start then did not apply.

Two changes in behaviour follow from clearing the choices, in case either is not intended:

  • Switching away and back drops the choice. Default, Reduce storage, Custom set to another directory, then Default again: the page shows Store all data and the node starts unpruned. Nothing says the earlier choice was dropped. On qt6 it survives.
  • The case I called possibly intended. A proxy turned on for the default directory is no longer applied to a directory that has none.

The same folder reached through a symlink, or through a path in a different letter case, counts as a different directory and clears the choices. A trailing slash does not.

This branch also fixes, by its diff, a case I had not reported. On qt6 at 2bd5a61e8304, a number outside the range typed into Mempool size limit, Block storage limit, Database cache size or Script verification threads stays in the field with no error and is not saved, and after a restart the old value is shown and in effect. IntValidator calls such a number Intermediate, so editingFinished never fires and the range messages cannot be reached by typing. The new validator's fixup() reports the rejected entry, which runs the commit function. I have not run that part. The below-minimum row of test_dbcache_errors_show_minimum_guidance sets the text and calls editingFinished() directly, so one typed case (digits, then Return or focus loss) would pin it.

Tested on macOS / Qt 6.9, isolated regtest. The cases from my earlier comment and the two above ran offscreen and in a native window; the rest ran offscreen only. Directories were passed to the model with the call the folder dialog makes, and the other steps were clicks through the test bridge. No traffic was observed, since the nodes ran with -connect=0; the evidence is settings.json, getblockchaininfo and getnetworkinfo. Listen, NAT-PMP, server and the Tor proxy are still by source only; I did not toggle them. In the number-field runs on qt6 the digits were key events, focus was moved programmatically, and Return was not sent.

I ran this branch at `f68f5bf24c50`. Both parts of my comment above are fixed: the storage choice and the proxy. - **Storage.** Default directory, **Reduce storage**, Back, Custom set to an existing full node's directory, Start. Storage amount now shows **Store all data** with **Your current setting** for that directory, its `settings.json` gains only `qml_onboarded`, and the node comes up unpruned. With `txindex=1` in its `bitcoin.conf` there is no error. In the reverse direction a pruned node keeps `"prune": "1907"` and there is no rebuild question. - **Proxy.** After the proxy switch is saved on and then saved off for the default directory, the existing node keeps `"proxy": "127.0.0.1:9050"`, gets no `proxy-prev`, and `getnetworkinfo` reports the proxy. - **A choice made after selecting the directory is still applied to it.** Reduce storage and the proxy, chosen with the existing directory selected, were both written there. - **The pages follow the switch.** Storage amount, the Storage settings popup and the Proxy popup showed the new directory's own values, so I found no page showing a choice that Start then did not apply. Two changes in behaviour follow from clearing the choices, in case either is not intended: - **Switching away and back drops the choice.** Default, Reduce storage, Custom set to another directory, then Default again: the page shows Store all data and the node starts unpruned. Nothing says the earlier choice was dropped. On `qt6` it survives. - **The case I called possibly intended.** A proxy turned on for the default directory is no longer applied to a directory that has none. The same folder reached through a symlink, or through a path in a different letter case, counts as a different directory and clears the choices. A trailing slash does not. This branch also fixes, by its diff, a case I had not reported. On `qt6` at `2bd5a61e8304`, a number outside the range typed into **Mempool size limit**, **Block storage limit**, **Database cache size** or **Script verification threads** stays in the field with no error and is not saved, and after a restart the old value is shown and in effect. `IntValidator` calls such a number Intermediate, so `editingFinished` never fires and the range messages cannot be reached by typing. The new validator's `fixup()` reports the rejected entry, which runs the commit function. I have not run that part. The below-minimum row of `test_dbcache_errors_show_minimum_guidance` sets the text and calls `editingFinished()` directly, so one typed case (digits, then Return or focus loss) would pin it. Tested on macOS / Qt 6.9, isolated regtest. The cases from my earlier comment and the two above ran offscreen and in a native window; the rest ran offscreen only. Directories were passed to the model with the call the folder dialog makes, and the other steps were clicks through the test bridge. No traffic was observed, since the nodes ran with `-connect=0`; the evidence is `settings.json`, `getblockchaininfo` and `getnetworkinfo`. Listen, NAT-PMP, server and the Tor proxy are still by source only; I did not toggle them. In the number-field runs on `qt6` the digits were key events, focus was moved programmatically, and Return was not sent.
Sign in to join this conversation.
No description provided.