* wip: p2pstream
* add comment for handshake timeout
* temp allow some lint violations
* ignore unused_variables
* start of ping task
* TODO: make it compile
* TODO: test ping/pong/disconnect state machine
* TODO: send subprotocol messages to stream
* TODO: encode non-hello p2p messages as snappy encoding without using
an encoder
* TODO: create test comparing encoder to hand-written snappy encoding
for ping, pong, disconnect messages
* implement message handling in stream poll method
* restricts S to be Stream+Sink for P2PStream to implement Stream
* start of a poll-based refactor
* impl Stream and Sink for P2PStream
* add tests
* TODO: make stream/sink types compatible
* TODO: handshake message ids
* TODO: inner poll fn
* TODO: pinger interval
* TODO: ethstream test
* TODO: passthrough test
* create pingers and test
* impl working timeout interval pinger
* it should be much easier to poll for pings and detect timeouts now
* use pinger in p2p stream
* change item produced by stream so it's compatible with EthStream
* add note on pros/cons
* shorten message sends in stream
* improve errors and remove redundant methods
* fix handshake
* debugging printlns
* fix encoding and decoding
* switch to snappy formatting for non-hello p2p messages
* cargo fmt
* perform handshake in ethstream over p2pstream test
* remove check for `Hello` messages outside of the handshake because
`P2PStream`s should assume messages sent in the sink are subprotocol
messages, not `p2p` messages.
* impl From<EthVersion> for CapabilityMessage
* remove printlns
* add total_message method to EthVersion
* decode Hello in handshake
* disallow protocol versions other than v5
* Integrate snappy and implement message size limits
* document constants, move stream definition
* fix missing hello message id
* implement shared capabilities
* todo: test shared capabilities
* todo: determine how / when / why to support multiple capabilities
* removes obsolete authed and offset fields
* add sink api TODOs
* remove les
* should add protocols when necessary rather than name unsupported
protocols
* fix snappy compression length
* add test for p2pstream over a passthrough codec which tests that
peers agree on a single shared capability
* fix some clippy lints
* feat(ifaces): modify DB GAT to have implicit bounds
https://sabrinajewson.org/blog/the-better-alternative-to-lifetime-gats\#the-better-gats
* test(ifaces): impl new trait for mock
* feat(ifaces): impl db container
we use that downstream to avoid consuming the db transactions
when committing a stage
* fix(test): explicitly define lifetime
* test: ensure can spawn
* test: pls review
* chore: lints/warnings
* feat(db): impl the new gats
* test(db): try to make real db work with gats like in stages
* test(db): make Stage trait take DBContainer
otherwise we cannot call db.commit()
gst
* feat(stages): impl new traits
* chore(db): cleanup tests
* chore: remove unused imports
* chore: port over remaining types from ethp2p
https://github.com/Rjected/ethp2p/
* replace fastrlp with reth_rlp
* use correct type for tx messages
* encoding / decoding still todo
* derive Default for AccessList
* export receipts
* also add Hash to more types
* fix receipts tests
* remove unused receipts test imports
* add convenience methods on transaction
* add block body
* move blockbody to eth-wire, uncomment wire type
* uncomment rest of messages
* TODO: refactor tests and make tests pass
* use U128 instead of Uint for td
* expose wire types
* use reth_eth_wire instead of ethp2p
* expose Signature
* refactor pooled transaction tests
* fix hash calculation
* do not hash the entire buffer
* uncomment block test and make clippy happy
* module-level documentation for message types
* apply a clippy fix
* cargo fmt
* actually make clippy happy
* use H256 instead of [u8; 32]
* use partition in split_transaction_by_hashes instead of peekable
Co-authored-by: Dan Cline <6798349+Rjected@users.noreply.github.com>