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
validation: assumeutxo params mainnet #28553
base: master
Are you sure you want to change the base?
Conversation
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. Code CoverageFor detailed information about the code coverage, see the test coverage report. ReviewsSee the guideline for information on the review process.
If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update. ConflictsNo conflicts as of last run. |
a001a05
to
27a8739
Compare
27a8739
to
f304a2e
Compare
f304a2e
to
0800be2
Compare
Updated I only tested that the @pablomartin4btc I found a different hash than you... Sjors@24deb20#commitcomment-130847775 |
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.
tACK 0800be2
./contrib/devtools/utxo_snapshot.sh 800000 - ./src/bitcoin-cli -datadir=${AU_DATADIR}
Rewinding chain back to height 800000 (by invalidating 00000000000000000000e26b239cf19ec7ace5edd9694d51a3f6933247720947); this may take a while
Generating txoutset info...
{
"height": 800000,
"bestblock": "00000000000000000002a7c4c1e48d76c5a37902165a270156b7a8d72728a054",
"txouts": 111535121,
"bogosize": 8443325590,
"hash_serialized_3": "6e63799cac0ab45f94789f97692caf691ee66625e920cbf2525fceb24509adda",
"total_amount": 19437286.83643360,
"transactions": 72936026,
"disk_size": 7264997650
}
Restoring chain to original height; this may take a while
I incorrectly took the muhash
value from gettxoutsetinfo
(without running the utxo_snapshot.sh
which also performs invalidateblock
right before).
@pablomartin4btc thanks for checking that you get the same snapshot. In addition it would be good to test if you're able to load the snapshot and complete the background sync. |
I've already checked IBD completed fine with I'll run all the process again with the new |
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.
Tested loadtxoutset
a few times (pending IBD to finish) with coinstatsindex
& blockfilterindex
, and without them. I've also validated that the sha256sum
corresponds to the one obtained from the downloaded file.
Now, having a pruned node with IBD completed, from which I got the m_assumeutxo_data
mentioned in my previous review, when I run ./contrib/devtools/utxo_snapshot.sh
with a filename in order to perform the actual dumptxoutset
within the script, I got a node crash with ERROR: ReadBlockFromDisk: OpenBlockFile failed for FlatFilePos(nFile=-1, nPos=0)
, which instance I had to kill since it was unresponsive. I'm not sure if this situation was due to the invalidateblock
performed twice by runnning the utxo_snapshot
script (one to get the info from gettxoutsetinfo
and the second for the actual dump), the pruned node or a combination of all three. Starting the node again without blockfilterindex
(option given by the node before doing the suggested -reindex
or -reindex-chainstate
which doesn't work on pruned nodes), made it worse till getting !setBlockIndexCandidates.empty()
. I see there are a few open issues regarding invalidateblock
& setBlockIndexCandidates
so before investigating further I'd like to know first if the dumptxoutset
is expected to work from a fully synced pruned node?
As discussed offline, the |
I agree with it, mentioned on a #27845 that's touching the script ATM. In the testing I performed and mentioned above the pruned node was above the snapshot height (
|
…in utxo_snapshot.sh 11b7269 script: Enhance validations in utxo_snapshot.sh (pablomartin4btc) Pull request description: This PR resolves #27841 and some more: - Ensure that the snapshot height is higher than the pruned block height when the node is pruned (Suggested by @Sjors [here](bitcoin/bitcoin#28553 (comment))). - Validate the correctness of the file path and check if the file already exists (@hazeycode's [#27845](bitcoin/bitcoin#27845)). - Make network activity disablement optional for the user (Suggested by @Sjors [here](bitcoin/bitcoin#16899 (comment)) and [here](bitcoin/bitcoin#16899 (comment))). - Ensure the `reconsiderblock` command is triggered on exit (@hazeycode's same PR as above), even in the case of user interruption (Ctrl-C). In order to perform some testing please follow the instructions in the description of previous @hazeycode's PR #27845. ACKs for top commit: Sjors: tACK 11b7269 ryanofsky: Code review ACK 11b7269 Tree-SHA512: 2b699894c6f732ad5104f5a2bcf5dc86ed31edcc9d664690cab55b94a8ab00e2ca5bde901ee1d63acddca7ea80ad1734d8cfe78f9c02f8470f264fe93a2af759
I plan to make a fresh snapshot after #26045 lands. |
Didn't see this one until the conflict popped up. I think we can move to 830,000 for v27.0 and I am unsure if we need to wait for #26045. I will bring it up in the next meeting. |
0800be2
to
bc9c28f
Compare
This adds snapshot parameters for mainnet block 840,000.
Depends on #29612
You can generate the snapshot yourself using
./contrib/devtools/utxo_snapshot.sh
or download my torrent:magnet:?xt=urn:btih:55cb2ea9b6c48aa11d676de871f9639e3fa3dd7e&dn=utxo-840000.dat&tr=udp%3A%2F%2Ftracker.bitcoin.sprovoost.nl%3A6969
It would be a good idea to test: