[Core] Add reindex-chainstate startup option#2391
Merged
furszy merged 12 commits intoPIVX-Project:masterfrom Jun 28, 2021
Merged
[Core] Add reindex-chainstate startup option#2391furszy merged 12 commits intoPIVX-Project:masterfrom
furszy merged 12 commits intoPIVX-Project:masterfrom
Conversation
e3b21f6 to
35c1f04
Compare
furszy
reviewed
May 25, 2021
furszy
left a comment
There was a problem hiding this comment.
nice work, code review ACK 35c1f04b96ba284b9449fcea8dd6a82805b5a8e1.
Will give it a full run.
furszy
previously approved these changes
May 26, 2021
furszy
left a comment
There was a problem hiding this comment.
Reindex and resync tested, ACK 35c1f04
|
This needs another rebase. Once it's done and v5.2 release is completed, will move forward with it. |
Also cap the allocation for the leveldb-specific cache for the UTXO set to 8MiB. This avoids that the extra cache memory goes to the much less effective leveldb cache instead of our application-level cache.
Since the setting is always created with default value, nodes launched with the GUI will keep the cache size at 100 (previous default). Create a new setting and update the value to the new default, only if it was previously set to 100.
which was introduced in 4386edd
>>> based on bitcoin/bitcoin@316623f without switching to AcceptBlock in LoadExternalBlockFile, as we need to sequentially Accept and ActivateBestChain for PoS validation
35c1f04 to
73d7288
Compare
Author
|
Rebased |
furszy
approved these changes
Jun 28, 2021
|
Moving forward.. |
random-zebra
added a commit
that referenced
this pull request
Jul 12, 2021
… more. 017ee3e Validation cleanup: Inside ConnectBlock, move coinSpend parse and validation to zerocoin_verify file. (furszy) e8206e8 Remove unneeded hashBlock arg from ContextualCheckZerocoinSpend and ContextualCheckZerocoinSpendNoSerialCheck (furszy) c402eef Remove dead zerocoin.h/cpp (furszy) 0a3f069 Remove dead mintpool.h/cpp. (furszy) Pull request description: Built on top of #2391. Made the following changes: 1) Removed dead `mintpool.h/cpp`. 2) Removed dead `zerocoin.h/cpp`. 3) Removed unneeded hashBlock arg from `ContextualCheckZerocoinSpend` and `ContextualCheckZerocoinSpendNoSerialCheck`. 4) Validation cleanup: Inside ConnectBlock, moved coinSpend parse and validation to `zerocoin_verify` files. ACKs for top commit: random-zebra: utACK 017ee3e Tree-SHA512: 1df0d91906234741e3baee5af828d8cfb77a701597d10f09d88b0a11c4c4899aeeb1ca9c801fd57cfbe64fbd747041d92f2752a218c4b17d4d03dedf75c5855a
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This was attempted already in #1864 and #1907.
Third time's a charm.
Now the speed is acceptable and (unlike what was happening in #1907) the process can be interrupted.
Further, as it is performed in ThreadImport, the GUI is open and functional during the chainstate reindex, instead of being seemingly stuck at the splash screen.
This PR also includes a few improvements coming from bitcoin#10919, bitcoin#8273, bitcoin#8136 and bitcoin#8611.
Here's a quick comparison of the data I had testing here (empty wallet with GUI, empty pivx.conf / default values).
The reindexes have been performed with 0 network connections.