Add proof-of-work fuzzing harness.
tests: Add proof-of-work fuzzing harness #18407
pull practicalswift wants to merge 1 commits into bitcoin:master from practicalswift:fuzzers-proof-of-work changing 3 files +94 −0-
practicalswift commented at 4:28 AM on March 23, 2020: contributor
- fanquake added the label Tests on Mar 23, 2020
-
DrahtBot commented at 12:35 AM on March 25, 2020: member
<!--e57a25ab6845829454e8d69fc972939a-->
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.
<!--174a7506f384e20aa4161008e828411d-->
Conflicts
No conflicts as of last run.
- DrahtBot added the label Needs rebase on Mar 25, 2020
-
jonatack commented at 2:14 PM on March 25, 2020: member
Concept ACK, commenting to be notified when this is rebased.
- practicalswift force-pushed on Mar 25, 2020
-
practicalswift commented at 2:29 PM on March 25, 2020: contributor
@jonasnick Rebased! :)
- DrahtBot removed the label Needs rebase on Mar 25, 2020
-
jonatack commented at 3:40 PM on March 26, 2020: member
ACK baa778a
bitcoin/bitcoin (pr/18407)$ src/test/fuzz/pow INFO: Seed: 3362987756 INFO: Loaded 1 modules (514213 inline 8-bit counters): 514213 [0x562fb3600568, 0x562fb367de0d), INFO: Loaded 1 PC tables (514213 PCs): 514213 [0x562fb367de10,0x562fb3e56860), INFO: -max_len is not provided; libFuzzer will not generate inputs larger than 4096 bytes INFO: A corpus is not provided, starting from an empty corpus [#2](/bitcoin-bitcoin/2/) INITED cov: 140 ft: 141 corp: 1/1b exec/s: 0 rss: 116Mb [#5](/bitcoin-bitcoin/5/) NEW cov: 140 ft: 148 corp: 2/3b exec/s: 0 rss: 117Mb L: 2/2 MS: 3 ChangeByte-ShuffleBytes-CopyPart- [#8](/bitcoin-bitcoin/8/) NEW cov: 140 ft: 153 corp: 3/6b exec/s: 0 rss: 117Mb L: 3/3 MS: 3 EraseBytes-InsertByte-InsertByte- NEW_FUNC[0/35]: 0x562fb06f9180 in boost::optional<CBlockHeader> ConsumeDeserializable<CBlockHeader>(FuzzedDataProvider&, unsigned long) /home/jon/projects/bitcoin/bitcoin/src/./test/fuzz/util.h:42 NEW_FUNC[1/35]: 0x562fb06fcf30 in FuzzedDataProvider::Advance(unsigned long) /home/jon/projects/bitcoin/bitcoin/src/./test/fuzz/FuzzedDataProvider.h:247 [#14](/bitcoin-bitcoin/14/) NEW cov: 460 ft: 512 corp: 4/81b exec/s: 0 rss: 118Mb L: 75/75 MS: 1 InsertRepeatedBytes- .../... [#220985](/bitcoin-bitcoin/220985/) REDUCE cov: 1308 ft: 7563 corp: 309/508Kb exec/s: 373 rss: 517Mb L: 869/4096 MS: 3 ChangeASCIIInt-ChangeBit-EraseBytes- [#221115](/bitcoin-bitcoin/221115/) REDUCE cov: 1308 ft: 7563 corp: 309/508Kb exec/s: 374 rss: 517Mb L: 147/4096 MS: 5 PersAutoDict-ChangeByte-CopyPart-EraseBytes-CopyPart- DE: "\x08\x00\x00\x00"- -
practicalswift commented at 9:07 PM on April 2, 2020: contributor
@MarcoFalke Would you mind reviewing? :)
-
in src/test/fuzz/pow.cpp:20 in baa778ae1a outdated
15 | +#include <string> 16 | +#include <vector> 17 | + 18 | +void initialize() 19 | +{ 20 | + SelectParams(CBaseChainParams::REGTEST);
MarcoFalke commented at 9:59 PM on April 2, 2020:I'd prefer to test main-net, because regtest has some odd pow rules like
consensus.fPowAllowMinDifficultyBlocks = true;
MarcoFalke commented at 10:03 PM on April 2, 2020:or
consensus.fPowNoRetargeting = true;.Those rule effectively bypass the code you want to fuzz. See for example here in line 51: https://doxygen.bitcoincore.org/pow_8cpp_source.html#l00049
practicalswift commented at 5:25 PM on April 4, 2020:Nice catch! Now using
CBaseChainParams::MAIN.MarcoFalke commented at 10:10 PM on April 2, 2020: memberACK baa778ae1a7d75a448bafe30115f963e7de1fc18
tests: Add proof-of-work fuzzing harness acf269e146practicalswift force-pushed on Apr 4, 2020practicalswift commented at 5:25 PM on April 4, 2020: contributor@MarcoFalke Updated. Please re-review :)
MarcoFalke merged this on Apr 4, 2020MarcoFalke closed this on Apr 4, 2020Fabcien referenced this in commit f9c4169b6d on Jan 20, 2021practicalswift deleted the branch on Apr 10, 2021kittywhiskers referenced this in commit a35d9aa07e on May 7, 2022kittywhiskers referenced this in commit e7b1283a66 on May 7, 2022Munkybooty referenced this in commit 1987b6e3d7 on Jun 9, 2022kittywhiskers referenced this in commit 61e1f9fb2d on Jun 14, 2022kittywhiskers referenced this in commit 62e7aaccda on Jun 14, 2022kittywhiskers referenced this in commit 1ba1f6a629 on Jun 18, 2022Munkybooty referenced this in commit d2bd515c06 on Jun 21, 2022Munkybooty referenced this in commit 06399eeb7c on Jun 25, 2022kittywhiskers referenced this in commit b00fc11767 on Jul 4, 2022kittywhiskers referenced this in commit d16547f260 on Jul 4, 2022kittywhiskers referenced this in commit 6e23c5efea on Jul 6, 2022kittywhiskers referenced this in commit 1b424f6b3b on Jul 6, 2022PastaPastaPasta referenced this in commit eefdae1a53 on Jul 12, 2022knst referenced this in commit f1c92c8bbd on Jul 21, 2022DrahtBot locked this on Aug 16, 2022ContributorsLabels
This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-16 15:14 UTC
More mirrored repositories can be found on mirror.b10c.me