mirror of
https://github.com/bitcoin-core/gui-qml.git
synced 2026-12-02 07:54:42 +00:00
Storage settings change pruning values after toggling and misrepresent manual pruning #1075
Labels
No labels
Android
Bug
Build system
Design suggestion
Doc
Needs design review
Needs rebase
Stage
UX
Up for grabs
Upstream
Wallet
duplicate
enhancement
good first issue
question
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
bitcoin-core/gui-qml#1075
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The Storage page can change the effective pruning configuration even when the user returns the switch to its original position. It also displays manual pruning as disabled. In both cases, the restart notice disappears despite a saved configuration change.
These are QML settings representation and persistence problems. Core’s requirement to rebuild when returning to unpruned mode after deleting historical blocks is expected behavior.
1. Toggling off and on changes the pruning target
prune=550inbitcoin.conf, without a GUI pruning override.The GUI saves
prune=953insettings.json, overriding the original 550 MiB target. The restart notice disappears after the second click, although the effective setting has changed. After restarting,getblockchaininfo.prune_target_sizeconfirms 953 MiB instead of 550 MiB.The displayed whole-GB value is converted back into a different MiB value. Returning the switch to its original state should preserve the original target.
2. Manual pruning appears disabled and can be overwritten
prune=1inbitcoin.conf, without a GUI pruning override.The switch initially appears off, although Core reports
pruned: trueandautomatic_pruning: false. After the two clicks, the GUI savesprune=0and removes the restart notice.This changes manual pruning to unpruned mode while making the page appear unchanged.
3. Disabling pruning lacks an advance warning and a recovery option
On a node that has actually removed historical block files:
Startup correctly warns that rebuilding will redownload the blockchain and asks for confirmation. However, Abort leaves the saved change intact, so the next launch repeats the prompt. There is no “Keep pruning” option. Restoring the previous pruning setting allows the existing chain to load normally.
Expected behavior
Reproduced on
qt6at6e54a48ab571, using macOS arm64, Qt 6.9.0, and offscreen regtest automation. The third case used a node with confirmed block-file removal.The other direction has no warning either. On a node that runs unpruned, one click on Store recent blocks only saves pruning at the click, and nothing on the page says that block files will be deleted or what undoing it costs.
To reproduce, on a node that runs unpruned:
settings.jsongains"prune": "1907"at the click. No confirmation opens, and the only new text is "Restart the application for these changes to take effect." The next start comes up in prune mode with no question:prunedis true,prune_target_sizeis 1999634432, andNETWORKis no longer advertised.github.com/bitcoin-core/gui-qml@2bd5a61e83/qml/pages/settings/StorageSettingsPage.qml (L64-L75)Bitcoin-Qt, by its source, shows this sentence in red when its prune box is clicked, repeats it in the box's tooltip, and saves nothing until OK (optionsdialog.ui#L94-L96):
By Core's source, a node that holds more than the target removes its old block files during that first start, and returning to unpruned mode then means the rebuild in case 3 above. I did not observe the deletion: the test chain had 200 blocks, far below the target, and its block files were unchanged.
Until the restart, a second click undoes the change completely:
pruneis removed,prune-previs left, and the next start is unpruned.#1050 at
f68f5bf24c50does not add this, by its diff. Its "May require downloading the full blockchain again." is on the full-storage card only, for a profile that is already pruned. The first-run wizard has no such sentence for reduced storage either, so no surface of the app warns in this direction.The switch does what its label says, so this is a missing sentence, not a malfunction. A line at the switch like Bitcoin-Qt's would cover it.
Reproduced on
qt6at2bd5a61e8304, macOS arm64 / Qt 6.9.0, isolated regtest, offscreen and native, and offscreen ateed1f426fcb6. The click and the Space key went through the test bridge; I did not click the switch by hand. Bitcoin-Qt was read, not run.