Commit Graph

51 Commits

Author SHA1 Message Date
6b5b6f7a40 Breaking changes (#5191)
Co-authored-by: Bjerg <onbjerg@users.noreply.github.com>
Co-authored-by: Roman Krasiuk <rokrassyuk@gmail.com>
Co-authored-by: joshieDo <ranriver@protonmail.com>
Co-authored-by: joshieDo <93316087+joshieDo@users.noreply.github.com>
Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>
Co-authored-by: Oliver Nordbjerg <hi@notbjerg.me>
Co-authored-by: Thomas Coratger <thomas.coratger@gmail.com>
2024-02-29 12:37:28 +00:00
34402caeee Replace #[async_trait] with ->imp for traits in eth_wire (#6756) 2024-02-23 16:45:25 +00:00
c8c422e278 chore: set test-fuzz to workspace dep, bump c-kzg (#6705) 2024-02-21 10:03:07 +00:00
3ce9fcf7e5 add alloy_chains (#5952)
Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>
2024-01-12 14:43:55 +00:00
9aa44093cf lints: move top-level lints to [workspace.lints] manifest table (#5935) 2024-01-04 13:38:02 +00:00
5062b7ea86 feat: integrate multiplexing (#5559) 2023-12-12 16:34:31 +00:00
cd4d6c52b0 Cap mux simple (#5577)
Signed-off-by: Emilia Hane <elsaemiliaevahane@gmail.com>
2023-12-08 08:21:01 +00:00
e897764ad4 chore(meta): manifest maintenance (#5353) 2023-11-08 19:53:50 +00:00
52670a8b24 feat: op-reth (#4377)
Co-authored-by: Roberto Bayardo <bayardo@alum.mit.edu>
Co-authored-by: refcell.eth <abigger87@gmail.com>
Co-authored-by: Roman Krasiuk <rokrassyuk@gmail.com>
Co-authored-by: refcell <refcell@oplabs.co>
Co-authored-by: nicolas <48695862+merklefruit@users.noreply.github.com>
2023-11-05 17:33:42 +00:00
a2c62cdf61 rpc tracing to workspace (#4986) 2023-10-11 16:19:06 +00:00
5f9a917fb1 feat: Alloy migration (#4737)
Co-authored-by: Alessandro Mazza <121622391+alessandromazza98@users.noreply.github.com>
Co-authored-by: Supernovahs.eth <91280922+supernovahs@users.noreply.github.com>
Co-authored-by: Oliver Nordbjerg <hi@notbjerg.me>
2023-09-28 15:55:39 +00:00
28f5118048 chore: update dependencies with breaking changes (#4555) 2023-09-11 14:53:09 +00:00
6d0b00a391 chore: use DEFAULT_DISCOVERY_PORT constant (#4356) 2023-08-25 07:47:58 +00:00
7f9116b747 dep: move metrics to workspace (#4289) 2023-08-21 09:33:50 +00:00
2904745650 chore: bump metrics (#4265) 2023-08-18 14:57:28 +00:00
443383b307 chore: make txpool cargo test compile (#4058) 2023-08-04 20:14:40 +02:00
8cdb097829 chore: simplify workspace = true usage (#3930) 2023-07-26 15:21:09 +00:00
ab2dc70368 chore(deps): bump smolstr hex-literal (#3693) 2023-07-10 13:47:29 +00:00
5b20aece2b chore: move bytes to workspace dep (#3302) 2023-06-21 19:13:32 +00:00
ee4f6b32a0 chore(deps): bump test-fuzz 4 (#3303) 2023-06-21 19:13:13 +00:00
7ab8a7f3ec chore: use workspace version (#3240) 2023-06-19 17:29:15 +00:00
9b81043a53 chore(deps): move ethers to workspace deps (#3145) 2023-06-14 19:58:39 +00:00
ea2fcee995 chore: use workspace dependencies (#3132) 2023-06-13 22:46:26 +00:00
171166e84a chore: add msrv to manifests, add and use workspace.package (#3006) 2023-06-06 03:45:44 +00:00
2e406c1791 ci: upgrade to geth 1.12.0-e501b3b0 (#2874)
Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>
2023-06-02 19:11:19 +00:00
10b577096b chore(metrics): restructure crates (#2850) 2023-05-26 12:21:48 +00:00
7d36dea420 Changed the ethers-rs imports for Foundry compatibility (#2787) 2023-05-23 00:48:25 +03:00
ae2b0954c6 perf: do not compile traces in release mode (#2652) 2023-05-15 17:06:10 -07:00
a40f3d775c chore(deps): bump enr + secp256k1 (#2443) 2023-04-28 11:05:00 -07:00
15d79cedad chore(deps): upgrade secp256k1+enr (#1715) 2023-03-15 11:15:55 +01:00
71bc1451af fix: use correct type for NewPooledTransactionHashes68 (#1548) 2023-02-28 21:20:02 +01:00
c168ef4433 feat: implement eth handshake disconnects (#1494) 2023-02-22 12:18:12 +01:00
f979c6c1fb chore: reexport bytes & bump version to 1.4 (#1395) 2023-02-16 10:33:28 -08:00
1d1d90bd19 feat: optional serde features (#1214)
Co-authored-by: lambdaclass-user <github@lambdaclass.com>
2023-02-07 15:52:32 -08:00
1f64d8e9d7 refactor: pull reth/common/rlp up to reth/rlp (#1146) 2023-02-02 13:54:13 -08:00
d50d9bd0fe chore(net): Add proptest roundtrip to rlp types (#829) 2023-01-16 09:50:58 -08:00
31cb66902e fix: Fix typos (#773) 2023-01-09 01:43:51 +01:00
aab385c84a feat(eth-wire): RLP encode then compress (#535) 2022-12-20 14:33:47 +02:00
4da574df84 feat: add prometheus support (#474) 2022-12-16 20:21:26 +01:00
c2719ec27e chore(deps): bump secp256k1 from 0.24.1 to 0.24.2 (#440)
Bumps [secp256k1](https://github.com/rust-bitcoin/rust-secp256k1) from 0.24.1 to 0.24.2.
- [Release notes](https://github.com/rust-bitcoin/rust-secp256k1/releases)
- [Changelog](https://github.com/rust-bitcoin/rust-secp256k1/blob/secp256k1-0.24.2/CHANGELOG.md)
- [Commits](https://github.com/rust-bitcoin/rust-secp256k1/compare/secp256k1-0.24.1...secp256k1-0.24.2)

---
updated-dependencies:
- dependency-name: secp256k1
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-12-14 16:40:16 +02:00
1e38ffa5ad 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
2022-12-13 19:10:52 +02:00
4d718bbf33 s/foundry-rs/paradigmxyz 2022-12-07 00:00:45 -08:00
6c91322251 feat(eth-wire): derive serde traits for eth-wire types (#348)
* wip: start adding serde to stuff

* add serde traits to NewBlockHashes

* derive serde traits for the rest of the types

* derive serde traits for p2p subprotocol messages

* cargo fmt
2022-12-06 18:05:22 -08:00
925001e1ee move tokio utils to dev dep (#345) 2022-12-06 18:02:04 -08:00
4643f840d7 chore(deps): get rid of unused deps (#339) 2022-12-06 18:02:04 -08:00
f1e6639374 feat(net): authenticate sessions (#178)
* Switch stream type of ActiveSession to EthStream

 * Start `StatusBuilder` for initializing the `Status` message required
   for the handshake
 * Add `Hardfork` for `Status` default forkid
 * Add `MAINNET_GENESIS` constant

* finish `StatusBuilder`

* initialize eth streams in session

 * add status, hello, and fork filter to session manager
 * fix status builder example
 * add status and hello to network config
   * will probably remove

* removing status and hello from networkconfig

* move forkid to primitives

* change imports for forkid

* add hardfork to primitives

* remove hardfork and forkid from eth-wire

* fix remaining eth-wire forkid references

* put mainnet genesis in constants, remove NodeId

* replace NodeId with PeerId

 * the only NodeId remaining is inherited from enr
 * PeerId still needs to be documented
 * also run cargo fmt

* replace loop with iter().any()

* ignore missing docs for hardforks

* use correct PeerId for Discv4::bind example test

* document PeerId as secp256k1 public key

* cargo fmt

* temporarily allow too_many_arguments

 * the authenticate and start_pending_incoming_session methods have many
   arguments, we can reconsider the lint or fix the methods at a later
   point
2022-11-14 12:03:05 -05:00
5721262740 refactor(net): unify capability types (#168)
* refactor(net): unify capability types

* refactor(net): unify capability types
2022-11-07 18:04:17 +01:00
3c72a12aff feat(eth-wire): Implement p2p stream (#114)
* 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
2022-11-03 00:01:54 -07:00
8009d997c0 Implement ETH P2P (#81)
* 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>
2022-10-16 20:10:25 -07:00
a644318c32 feat(p2p): Include forkid file from apache licenced repo (#68)
* Start using reth-rlp
* Include apache licenced forkid file in primitives
* Move forkid to eth-wire
2022-10-14 16:52:59 +02:00