Repository navigation
fuzz: Add PartiallyDownloadedBlock target - #26898
Conversation
|
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. 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. |
mzumsande
left a comment
There was a problem hiding this comment.
Concept ACK, only minor comments
1105efe to
b350ffd
Compare
|
Concept ACK |
maflcko
left a comment
There was a problem hiding this comment.
Thanks for working on improved fuzz targets!
I've left some nano-nits that can be ignored. Please let us know if you want this merged or want to address the nits.
review ACK b350ffd07c04d3b499f5960973d664d699341ec1 🎧
Show signature
Signature:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512
review ACK b350ffd07c04d3b499f5960973d664d699341ec1 🎧
-----BEGIN PGP SIGNATURE-----
iQGzBAEBCgAdFiEE+rVPoUahrI9sLGYTzit1aX5ppUgFAlwqrYAACgkQzit1aX5p
pUgq+Av/em84tR5X4rXmHJSeQPxVnzZUNBTZYXwnjL+A3EbtpxWP+ne/jGTdkj43
URmm15WNSbKeLKTR3w+FbdcgNbGuyfRlx6tJsvKNFbAMZtEvR4Ezs7WxZmQKdLAa
DHsp3Tpfe+axMgu1TGpx1JZ2+wC+6pDYDqMvAh2yLkN1NHUrHEToVwIN2r4z2+Nl
0adRB0cxh7WF9VGN4twevz5AAoIEXMhlmDXEGJO8ljFyBbkxmTDtYcYzgRxdQVig
Ok9JoNuFxxVQeBTC1TeloGCqXAapwS+ZVQul0NpEsWejD29jGGi+/kw3qOXq3HjI
Kmb/K/6zNMNUgptln5bFSWnwMHAkhbKlor7a2bDPHcpO6Fiti5EubKodw3+1i0nZ
Lx5y3Jgr1ae41s/hAuxGF8MtfyBHmBhl5EkoVLnHKLE/mYmIg2C2v/TwN6xmwpuh
zXhIyon2Ht2p8pi0nI197Mp6av+Ify3/EC0UgfC+yyVHhTAugq9DIF833Y8zXrqR
VeWb6Kg0
=ay5H
-----END PGP SIGNATURE-----
b350ffd to
a1c3627
Compare
|
@MarcoFalke addressed all your comments. CI failures seem unrelated (restarted the failing jobs). |
maflcko
left a comment
There was a problem hiding this comment.
lgtm. Follow-ups can be done in new pulls, if there are any.
re-ACK a1c3627 🎼
Show signature
Signature:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512
re-ACK a1c36275b5a27ae685f49ff02dabff0adbf51aa1 🎼
-----BEGIN PGP SIGNATURE-----
iQGzBAEBCgAdFiEE+rVPoUahrI9sLGYTzit1aX5ppUgFAlwqrYAACgkQzit1aX5p
pUhUGAv8CVgILyXBbe4tlLJ6RxNL9KDFKjr7dYR+6pLtarndtMPlJs+xS/dJwHSi
6Exkiq1N54HCLzzgMZeN03rUW4FbXW1qngFiTS4SJCOliuaqtZInk4uH8O5AIlWt
igJ8Kfeues7VcwsVSIIAkfg8ZCnoj4BoOKJGWNdRVeCUfa0JqoftIHzX3yqwjmS/
7Y9CWzn7nTqqSzcel4Ry6BcqMetJsZohTtsqy8GCZfB/Ylam5TxrUgkYaBid8BO+
4sTAcy9Cj9+2JhHXeyXXVaLbPDeB3WHErHelxv8z0PgKcH1xDvvVO7SmAuKWVP6q
Lsq6n+OannMTc8V24ue5x+QQTDtTLl33C+MNSZnCG7lZ0WPW2vmHZEvyGBTsLZId
TM3uVmByZlCjOHir4Vm9hR6DupzLkjNRaoKlLSeZrrvBJuEWQ2vMZGv+5OIyHVTE
GJHsVC7djHNX1yVtqT6j8jCgqigotS5piD3hcYB3z30nBfCa1lzaZpt1p9/TkSyD
4jM6fVom
=ozo3
-----END PGP SIGNATURE-----
| BlockValidationResult::BLOCK_INVALID_PREV, | ||
| BlockValidationResult::BLOCK_TIME_FUTURE, | ||
| BlockValidationResult::BLOCK_CHECKPOINT, | ||
| BlockValidationResult::BLOCK_HEADER_LOW_WORK}); |
There was a problem hiding this comment.
nit: Could move to a common header file?
| pool.addUnchecked(ConsumeTxMemPoolEntry(fuzzed_data_provider, *tx)); | ||
| available.insert(i); | ||
| } | ||
| } |
There was a problem hiding this comment.
nit: Could make sense to include some extraneous txs that are not in the block in the extra txn or mempool?
| if (init_status == READ_STATUS_OK) { | ||
| assert(!pdb.IsTxAvailable(i) || available.count(i) > 0); |
There was a problem hiding this comment.
nit:
if (init_status == READ_STATUS_OK && pdb.IsTxAvailable(i)) {
assert(available.count(i) > 0);Also, in the comment replace "then" with "and"?
| if (!pdb.IsTxAvailable(i) && !skip) { | ||
| missing.push_back(block->vtx[i]); | ||
| } | ||
|
|
||
| skipped_missing |= (!pdb.IsTxAvailable(i) && skip); |
There was a problem hiding this comment.
nit:
if (!pdb.IsTxAvailable(i)) {
if (skip) { skipped_missing = true; }
else { missing.push_back(block->vtx[i]); }
}
This PR adds a fuzz target for
PartiallyDownloadedBlock, which we currently do not have any coverage for.