fuzz: Add utxo_snapshot target#21953
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.
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.
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.
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.
Full coverage (as of now): https://marcofalke.github.io/btc_cov/fuzz.coverage/src/test/fuzz/utxo_snapshot.cpp.gcov.html
|
Tested ACK Ran it locally for a while: |
|
Post-merge tested ACK fa91994
|
No description provided.