* Add serde support to NodeRecord
* Move NodeRecord to primitives
along with NodeKey and Octets
* Reexport NodeRecord from discv4
* Move NodeKey and kad_key back to discv4::node
Also, move NodeRecord::key functionality to a helper function: discv4::node::record_key.
This avoids the discv5 dependency in the primitives crate.
* Fix NodeRecord (de)serializing
The default derive macros work with a dictionary like display.
Changed that to serde_with macros, that use Display and FromStr traits.
* Add some tests for NodeRecord (de)serializing
* Hide NodeKey struct
* Move Octets after NodeRecord
* Replace record_key with From trait
* Fix clippy error
unnecessary into()
* 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>
* 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>
* wip: geth connection test
* set port until disabling discovery sets port
* ignore test until it is complete
* check that first geth event is SessionEstablished
* fix endpoint string for the geth instance
* force an incoming connection
* we should also test establishing a session on an outgoing connections
* use NetworkEventStream helper in connect test
* create outgoing test
* make geth tests use different ports and datadirs
* update geth options
* cargo fmt
* s/geth_socket/reth_socket
* cargo fmt
* fix disc port collisions and re-add incoming test
* should add test utilities for getting unused disc/p2p ports
Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>