* 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>
* refactor: move things to types
* feat(ethwire): bring in message type from ethp2p
30c11138d5/src/message.rs
* feat(ethwire): add eth-stream with Stream/Sink impls
* feat(ethwire): make Sink error an EthStreamError
* feat(ecies): expose util module
* add more deps
* feat: add broadcast newblockhashes
* fix: rlp serialize with message-id first
* chore: cleanup doc
* wip: test eth connection
* bump cargo lock
* feat: add rlp codec and get stream tests working
* fix: convert RlpCodec to PassthroughCodec
we were rlp encoding twice
* Revert "fix: convert RlpCodec to PassthroughCodec"
This reverts commit 6e6e0a58112c14d7ffba62dc83f9747ddc280641.
This does not handle framing, which would fail decoding if a partial
write happened to the socket.
* add tracing
* refactor: add handshake error
* feat(ethwire): add status handshake
* test(ethwire): handshake works
* refactor: expose EthStream::new
* chore: clippy lints
* fix: get rid of rlp codec
we can instead use LengthLimitedCodec from Tokio IO, which we re-export
as PassthroughCodec
* fix(eth): add handshake + msg error checks
1. 10MB message lengths
2. Same Genesis, Version, Chain on Status Handshake
* chore: ignore result_large_err
Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>
* feat(p2p): add anchor file for discovery state
* move rustdoc and improve error messages
Co-authored-by: Bjerg <onbjerg@users.noreply.github.com>
* add temp file tests and log drop error
* fix error due to lack of read option
* fix empty and nonexistent file error
* remove redundant new
* replace println with tracing
* show underlying error in custom error message
* chore: cargo fmt
* change AsRef<Path> to &Path
* remove ineffective dedups
* chore: cargo fmt
* switch out Vec<Enr<K>> for HashSet<Enr<K>>
* cargo fmt
* use tempdir instead of of std::env::temp_dir
* refactor anchor to contain &Path instead of File
* change new_from_file to explicitly include logic for opening existing
files, rather than calling out to from_toml
* remove from_toml because new_from_file handles existing files
properly with only a path. It is not possible to obtain a Path from a
File anyways, its only purpose was to accept a File type
* use PathBuf instead of Path
Co-authored-by: Bjerg <onbjerg@users.noreply.github.com>