Commit Graph

39 Commits

Author SHA1 Message Date
e897764ad4 chore(meta): manifest maintenance (#5353) 2023-11-08 19:53:50 +00:00
9ca44efe9f feat(bin): separate journald and file log filters, log debug to file by default (#5197) 2023-10-31 11:08:15 +00:00
e05dba69ce chore: rewrite all error messages for consistency (#5176)
Co-authored-by: Roman Krasiuk <rokrassyuk@gmail.com>
2023-10-25 20:12:03 +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
b85aa94033 docs: paradigmxzy -> paradigmxyz (#4837) 2023-09-28 14:27:30 +00:00
8f9d2908ca chore: add and fix more lints, improve docs (#4765) 2023-09-25 15:46:46 +00:00
28f5118048 chore: update dependencies with breaking changes (#4555) 2023-09-11 14:53:09 +00:00
8cdb097829 chore: simplify workspace = true usage (#3930) 2023-07-26 15:21:09 +00:00
0096739dbb doc: add reth logo to docs (#3317)
Co-authored-by: Oliver Nordbjerg <hi@notbjerg.me>
2023-06-26 15:41:11 +00:00
7ab8a7f3ec chore: use workspace version (#3240) 2023-06-19 17:29:15 +00:00
ea2fcee995 chore: use workspace dependencies (#3132) 2023-06-13 22:46:26 +00:00
01041b404f test: use free port (#3036) 2023-06-06 18:22:11 +00:00
171166e84a chore: add msrv to manifests, add and use workspace.package (#3006) 2023-06-06 03:45:44 +00: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
47b9738ede chore: fix some typos (#2025) 2023-03-29 14:49:50 +02:00
15d79cedad chore(deps): upgrade secp256k1+enr (#1715) 2023-03-15 11:15:55 +01:00
f979c6c1fb chore: reexport bytes & bump version to 1.4 (#1395) 2023-02-16 10:33:28 -08:00
b6c9886b09 chore: document parts of ECIES and MAC (#1260) 2023-02-10 01:14:53 +01:00
1f64d8e9d7 refactor: pull reth/common/rlp up to reth/rlp (#1146) 2023-02-02 13:54:13 -08:00
c4bafe809b fix: clippy warnings, or_fun_call and unnecessary_lazy_evaluations (#846) 2023-01-13 11:10:02 +01:00
d98f9fe507 move HasRemoteAddr trait to reth-net-common (#775) 2023-01-09 10:43:46 +02:00
31cb66902e fix: Fix typos (#773) 2023-01-09 01:43:51 +01:00
6407b5087e chore: use B160, B256 and U256 coming from revm and ruint (#676)
* use B256, B160 and U256 from revm

* fix U256 from_str

* use U256::ZERO

* use temporary commit for revm and interpreter

* more U256::ZERO

* more changes for revm/ruint types

* clippy

* change revm and revm-interpreter repo

* remove H160 wrap

* minor cleanup

* remove unused

* fix MIN_PROTOCOL_BASE_FEE
2023-01-04 11:11:48 +02:00
3a67809cb7 test: test ack encoding (#699) 2023-01-03 18:09:00 +02:00
a2849cd81e chore(net): improve ecies error for unreadable stream (#514)
* chore(net): improve ecies error for unreadable stream

* Update crates/net/ecies/src/error.rs

Co-authored-by: Bjerg <onbjerg@users.noreply.github.com>

Co-authored-by: Bjerg <onbjerg@users.noreply.github.com>
2022-12-19 19:07:19 +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
35a41a29f9 style: unify slice access and bytes (#437) 2022-12-14 16:26:08 +02:00
d5d876b286 fix(headers-stage): do not exit stage on downloader error (#439)
* fix: return ctrl to pipeline on header dl error

* chore: adjust log levels

* ecies: improve tag check error granularity

* chore: instrument read_ack/read_auth

Co-authored-by: Oliver Nordbjerg <hi@notbjerg.me>
2022-12-14 16:25:54 +02:00
4d718bbf33 s/foundry-rs/paradigmxyz 2022-12-07 00:00:45 -08:00
4643f840d7 chore(deps): get rid of unused deps (#339) 2022-12-06 18:02:04 -08:00
5e37ef8226 style(net): use pin_project on eceis stream (#338) 2022-12-06 18:02:04 -08:00
0b8d50127c refactor(net): box ecies error (#337) 2022-12-06 18:02:04 -08:00
75879b2027 chore(ecies): remove body size check (#328)
* remove body size check

* cargo fmt
2022-12-06 18:02:04 -08:00
92a7818512 feat: bodies stage (#190)
* chore: clean up `.gitignore`

* fix: make RO cursors `Send + Sync`

* feat(wip): bodies stage

* driveby: improve docs

* chore: don't panic if we're the first stage

* chore: use `Vec` for ommers

* feat: error handling in bodies downloader

* chore: remove stale comment

* chore: pascal-case stage id

* refactor: remove unused new fns

* refactor: distinguish downloaders with prefix

* refactor: move downloader errs to own module

* refactor: `stream_bodies` -> `bodies_stream`

* test: fix borked imports in header stage

* test: clean up header tests

* test: add basic body stage tests

* test: add 2 more body stage test skeletons

* test: move generator test utils to own module

* refactor: move proof functions to primitives crate

* feat: add block generator test utils

* test: more body stage tests

* chore: fix typo (`Cannonical*` -> `Canonical`)

* docs: document `bodies_to_download`

* test: more body stage tests

* test: more body stage tests

* refactor: clean up body stage tests a bit

* test: fix broken tests

* refactor: clean up body stage tests

* test: more body stage tests
2022-11-15 08:49:11 +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
2a8189d7c9 chore(db): Add tests and fuzz target to BlockNumHash (#130)
* add tests and fuzz target for BlockNumHash

* use block 1 for test_block_num_hash

* new clippy stds

* fmt
2022-10-25 01:23:10 -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
5dfe5ac29b feat(net): add Framed ECIES implementation (#80)
* feat(net): add ecies crate

* cargo fmt

* add hex-literal and proptest to dev-dependencies

 * adds std feature to reth-rlp

* document util

* document more

* chore: allow missing docs in ecies/algorith.rs

* feat(ecies): improve error handling

remove anyhow and strictly type all errors

* refactor(ecies): movem ingress/egress to lib.rs

* chore(ecies): allow missing docs in mac

* chore(ecies): cleanup utils

* refactor(ecies): move ECIES Codec to separate file

* refactor(ecies): rename proto to stream

* add test scaffold

* implement server/client read/write test

* chore: clippy / fmt

Co-authored-by: Georgios Konstantopoulos <me@gakonst.com>
2022-10-15 18:20:17 -07:00