-
Notifications
You must be signed in to change notification settings - Fork 38.6k
fuzz: Add utxo_snapshot target #21953
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
Conversation
|
Concept ACK Very nice! :) |
fab6ed5 to
fa91994
Compare
|
Fuzzed Log |
Sure, just set the tempdir to a ramdisk |
|
For refrerence, I am getting |
jamesob
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.
ACK fa91994
I'm in the process of trying to get this to run locally, but have reviewed the code and it looks like a great start. We could maybe save some cycles by conditionally prepending valid snapshot metadata to the file we construct (in the same way that we conditionally have the background chainstate synced to the snapshot base), but in any case this is a good change.
I'll report back with logs when I get this running.
| const auto& coinscache{chainman.ActiveChainstate().CoinsTip()}; | ||
| int64_t chain_tx{}; | ||
| for (const auto& block : *g_chain) { | ||
| Assert(coinscache.HaveCoin(COutPoint{block->vtx.at(0)->GetHash(), 0})); |
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.
Just out of curiosity - if we've gotten here, that means that the fuzzer has provided random input that has happened to correspond to a utxo snapshot that matches the chain we've generated in setup. This seems extraordinarily unlikely to me; how often do we expect this to actually happen? Am I missing some mechanic about how the fuzzer works that makes this a more frequent thing?
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.
Right, I expect this to be impossible unless one of the initial seed inputs is a valid snapshot.
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 ACK Ran it locally for a while: |
|
Post-merge tested ACK fa91994
|
No description provided.