-
Notifications
You must be signed in to change notification settings - Fork 724
[Core] Add reindex-chainstate startup option #2391
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Core] Add reindex-chainstate startup option #2391
Conversation
e3b21f6 to
35c1f04
Compare
furszy
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice work, code review ACK 35c1f04b96ba284b9449fcea8dd6a82805b5a8e1.
Will give it a full run.
furszy
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
|
Rebased |
furszy
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
re-ACK 73d7288, tested again.
|
Moving forward.. |
… 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 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.