Enable changing the autoprune block space size in intro dialog#125
Enable changing the autoprune block space size in intro dialog#125hebasto merged 5 commits intobitcoin-core:masterfrom
Conversation
|
Concept ACK |
|
|
||
| #include <interfaces/node.h> | ||
| #include <util/system.h> | ||
| #include <validation.h> |
There was a problem hiding this comment.
It's unfortunate to include this just because of MIN_DISK_SPACE_FOR_BLOCK_FILES.
|
Testing ACK 7e37329 on Windows 10.0.18363 Build 18363. Articulating how exactly the pruned storage works is a great UX move. Many users seem to think pruning only stores data relevant to them, not that its only storing a recent history of blocks. Can be quite a shock importing an old wallet that you believe has coins only to get a zero balance displayed. Just some minor nits that could be fixed along with this PR: "The wallet will also be stored in this directory" should be changed to "Wallets will also be stored in this directory" in the top dialogue. Users can / may have multiple wallets. Blockchain size is around ~350GB now, may want to update the 320GB text in the second last paragraph. |
|
Concept ACK |
|
@Bosch-0 Does rescanning a wallet with a pruned node that misses relevant blocks result in an incorrect balance? That sounds like a bug - it should just abort with missing blocks or so. |
Usually, we are trying to keep PRs focused :)
This number update is a part of the release process, e.g., bitcoin/bitcoin#20263. |
|
Addressed @hebasto's comments. Ping @promag @ryanofsky @Bosch-0 for re-ACKing |
I haven't actually tested this but I don't think it does - will test this today. The only time an incorrect balance may be shown is when importing a wallet post-prune that has tx history older than the block history stored as far as I'm concerned. |
|
ACK ea79265, looks good. |
Which commit did you mean? |
I just re-tested the changes made since my first ACK, I did not review the code |
|
Is an update supposed to be pushed? My review was requested but there haven't been any changes since my last review #125 (review) |
7d40a48 to
28ec1b2
Compare
|
Ah, that's the problem: Forgot we have to push to a different repo to get PRs in /gui to update :/ Should be ready now |
28ec1b2 to
415fb2e
Compare
|
QOverload doesn't work in Qt 5.5 ... reverted that change |
415fb2e to
a479be9
Compare
a479be9 to
415fb2e
Compare
|
master is bumped to Qt 5.9, so went back to QOverload... |
| // User language is set up: pick a data directory | ||
| bool did_show_intro = false; | ||
| bool prune = false; // Intro dialog prune check box | ||
| int64_t prune_MiB = 0; // Intro dialog prune configuration |
There was a problem hiding this comment.
style piconit: clang-format-diff.py suggests
| int64_t prune_MiB = 0; // Intro dialog prune configuration | |
| int64_t prune_MiB = 0; // Intro dialog prune configuration |
| <property name="text"> | ||
| <string>Limit block chain storage to</string> | ||
| </property> | ||
| <property name="toolTip"> | ||
| <string>Reverting this setting requires re-downloading the entire blockchain. It is faster to download the full chain first and prune it later. Disables some advanced features.</string> | ||
| </property> |
There was a problem hiding this comment.
Qt Designer insists on changing properties order:
| <property name="text"> | |
| <string>Limit block chain storage to</string> | |
| </property> | |
| <property name="toolTip"> | |
| <string>Reverting this setting requires re-downloading the entire blockchain. It is faster to download the full chain first and prune it later. Disables some advanced features.</string> | |
| </property> | |
| <property name="toolTip"> | |
| <string>Reverting this setting requires re-downloading the entire blockchain. It is faster to download the full chain first and prune it later. Disables some advanced features.</string> | |
| </property> | |
| <property name="text"> | |
| <string>Limit block chain storage to</string> | |
| </property> |
| ); | ||
| ui->lblExplanation2->setText(ui->lblExplanation2->text().arg(PACKAGE_NAME)); | ||
|
|
||
| const int min_prune_target_GB = std::ceil(MIN_DISK_SPACE_FOR_BLOCK_FILES / 1e9); |
There was a problem hiding this comment.
| UpdatePruneLabels(prune_checked); | ||
| UpdateFreeSpaceLabel(); | ||
| }); | ||
| connect(ui->pruneGB, QOverload<int>::of(&QSpinBox::valueChanged), [this](int prune_GB) { |
There was a problem hiding this comment.
The QOverload helper class is required for C++11 code. Having C++17, the qOverload should be used.
There was a problem hiding this comment.
IIRC qOverload function template does not work with Visual Studio 2017 due to implementation limitations, and I see that compiler mentioned in https://github.com/bitcoin-core/gui/blob/master/build_msvc/README.md .
There was a problem hiding this comment.
IIRC qOverload function template does not work with Visual Studio 2017 due to implementation limitations
Oh, I was not aware of it. I'd like to know more about this pitfall. Any proof/link/test is appreciated :)
There was a problem hiding this comment.
There was a problem hiding this comment.
Thanks! Since bitcoin/bitcoin#21811 is merged, it isn't a problem, is it?
Btw, could you look at #257?
There was a problem hiding this comment.
It seem so, yes. Maybe I should try building on some older GCC to make sure other compiler does not have similar limitations (though I doubt it).
I will take a look at 257 at some time.
| case Qt::Unchecked: default: | ||
| return 0; |
There was a problem hiding this comment.
| case Qt::Unchecked: default: | |
| return 0; | |
| case Qt::Unchecked: | |
| [[fallthrough]]; | |
| default: | |
| return 0; |
| static constexpr uint64_t nPowTargetSpacing = 10 * 60; // from chainparams, which we don't have at this stage | ||
| static constexpr uint32_t expected_block_data_size = 2250000; // includes undo data |
There was a problem hiding this comment.
style piconit: clang-format-diff.py suggests
| static constexpr uint64_t nPowTargetSpacing = 10 * 60; // from chainparams, which we don't have at this stage | |
| static constexpr uint32_t expected_block_data_size = 2250000; // includes undo data | |
| static constexpr uint64_t nPowTargetSpacing = 10 * 60; // from chainparams, which we don't have at this stage | |
| static constexpr uint32_t expected_block_data_size = 2250000; // includes undo data |
|
|
||
| QString getDataDirectory(); | ||
| void setDataDirectory(const QString &dataDir); | ||
| int64_t getPruneMiB() const; |
…… … size in intro dialog
|
Post-merge tACK. Great improvement! |
8b77133 qt: Replace disambiguation strings with translator comments (Hennadii Stepanov) Pull request description: Since bitcoin/bitcoin#21694 is merged, translator comments is the right way to pass context to translators. This PR fixes changes were made: - in #220 before bitcoin/bitcoin#21694 - in bitcoin/bitcoin#21694 on testing purpose - in #125 Closes #288. ACKs for top commit: jarolrod: ACK 8b77133 Tree-SHA512: 466ade35f4969a41fbf3196780b1ae9fa810bab5d2f09077f8631604636cc63b24a901c719f6b5797366d2aa307993d0aa419ce35200c8d0a741a3d81cad3e6b
|
See IRC discussion:
|




Moved from bitcoin/bitcoin#18728