feat(eth-wire): fuzzing wire encoding roundtrip (#350)

* move hello to separate file

* cargo fmt

* wip: actual fuzz test

 * should probably also take advantage of test-fuzz to generate
   benchmarks like impl_fuzzer_with_input

* impl generic roundtrip method

* generate test with macro

* change testname to fuzzname

* add reth-eth-wire to fuzz in ci

* add other message types to fuzz

* remove unused_crate_dependencies

 * was causing test issues, may want to revisit whether or not we can
   include this warning and still use test_fuzz

* more afl debugging ci

* use more explicit imports in fuzz_rlp

* impl Default for types and fuzz ping/pong

 * Default is necessary for test-fuzz to auto generate a corpus for each
   type we are fuzz testing

* enable AFL_I_DONT_CARE_ABOUT_MISSING_CRASHES

 * not sure if we should do this in the workflow instead:
   echo core >/proc/sys/kernel/core_pattern

   we may miss crashes if we keep this enabled?

* remove reth-interfaces from fuzzing

* add secp256k1 to reth-db dev deps
This commit is contained in:
Dan Cline
2022-12-13 12:10:52 -05:00
committed by GitHub
parent dff3936b29
commit 1e38ffa5ad
18 changed files with 402 additions and 141 deletions

View File

@ -37,12 +37,16 @@ eyre = "0.6.8"
[dev-dependencies]
tempfile = "3.3.0"
test-fuzz = "3.0.4"
criterion = "0.4.0"
iai = "0.1.1"
tokio = { version = "1.21.2", features = ["full"] }
arbitrary = { version = "1.1.7", features = ["derive"]}
reth-db = { path = ".", features = ["test-utils","bench"]}
# needed for test-fuzz to work properly, see https://github.com/paradigmxyz/reth/pull/177#discussion_r1021172198
secp256k1 = "0.24.0"
reth-interfaces = { path = "../../interfaces",features=["bench"] }
async-trait = "0.1.58"