* ci: run fuzz tests in matrix
* ci: fail if fuzzing fails
* ci: rename fuzz step
* ci: clean up env
* ci: fix fuzz test target matching
* ci: prebuild fuzz corpus
* ci: collect coverage while running tests
Instead of running tests twice, we can just run them
once while collecting coverage data.
* ci: temporarily disable `reth-eth-wire` fuzzing
* ci: collect fuzz coverage data
* ci: fix fuzz coverage collection
* ci: re-enable `reth-eth-wire`
* directs types we generate fuzz tests for to a method that is more
restrictive in the traits each input type should implement, so if any
type does not implement the test-fuzz required traits it will fail to
compile instead of fail to autogenerate a fuzz test at runtime.
* feat(eth-wire): add timeouts to tests using Geth
* feat(net): use NodeRecord instead of enode format
* make NodeRecord::new pub instead of pub(crate)
Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>
`require_tip` could only be determined by the headers stage,
and it signalled that we have all of the headers to sync all
the way to the chain tip. Some stages may wait to execute
until the tip is reached, e.g. the stage that checks the
stage root, but there are a few problems:
- On initial sync, `reached_tip` would be `true`, but by
the time we reach the hashing stage, this would actually
no longer be the case: the other stages have spent
enough time for us to be "out of sync". This means
that the optimization here is lost, and the additional
logic is added for nothing.
- When we are not doing our initial sync, `reached_tip` would
always be `true` for each subsequent block we sync.
The same logic applies as above, i.e. the extra logic
is there for nothing.
In other words, `reached_tip` would *always* be `true` once
we leave the header stage, making the extra logic entirely
redundant.
* add trace in DisconnectReason Decodable impl
* add trace for decoding p2p hello
* add traces to p2p and eth stream
* refactor P2PMessage decoding
* improve disconnect tracing
* s/Hello/first
* add geth disconnect test
* add disconnectreason test cases
* add known failing disconnect messages
* add trace when disconnect reason decoding fails
* cargo fmt
* add more examples
* adding more as they appear in traces
* will add the rest since they can be exhaustively enumerated
* add every other possible encoding
* fix disconnect decoding
* the four possible formats for a disconnect message (rlp list (y/n) x
snappy (y/n)):
* encoded as a single rlp byte
* with snappy
* without snappy
* encoded as a rlp list
* with snappy
* without snappy
* fix the type for decoding in the test_decode_known_reasons test
* sort reasons by length in test
* remove printlns
* use one call to advance
* simplify decode impl to strip last byte
* todo: comment explaining the different formats being parsed?
* explicitly remove geth as a peer
* style: traces
* add another disconnect code from geth
* fix: add check for DisconnectRequested
Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>