Commit Graph

192 Commits

Author SHA1 Message Date
4936d467c9 test(sync): stage test suite (#204)
* test(sync): stage test suite

* cleanup txindex tests

* nit

* start revamping bodies testing

* revamp body testing

* add comments to suite tests

* fmt

* cleanup dup code

* cleanup insert_headers helper fn

* fix tests

* linter

* switch mutex to atomic

* cleanup

* revert

* test: make unwind runner return value instead of channel

* test: make execute runner return value instead of channel

* Revert "test: make execute runner return value instead of channel"

This reverts commit f8608654f2e4cf97f60ce6aa95c28009f71d5331.

Co-authored-by: Georgios Konstantopoulos <me@gakonst.com>
2022-11-18 17:57:29 -08:00
ae8f7a2dd6 meta: rename dev dependency package (#225)
* meta: remove unused reth-rlp test package

* meta: rename dev dependency
2022-11-18 13:03:18 -08:00
1767d375de feat(net): add broadcast message variants (#224) 2022-11-18 20:22:29 +01:00
ebd27b6025 feat(net): add disconnect function (#223) 2022-11-18 16:26:49 +01:00
b4098b9558 chore(net): add disconnect reason (#222) 2022-11-17 15:48:50 +01:00
84ef65dfb7 ci: disable patch checks for codecov 2022-11-16 13:43:23 -08:00
842ad8fb9c test(txpool-mock): convert u128 value to u256 2022-11-16 12:18:06 -08:00
331a2dbe8f fix(net): add None disconnect reason on PoS p2p violation 2022-11-16 12:16:28 -08:00
ee7140f91e refactor(net): add dedicated transaction event channel (#214) 2022-11-16 21:06:53 +01:00
09ba65fa75 feat(net): add NetworkMode to enforce POS rules (#215) 2022-11-16 11:42:58 -08:00
814640cccd chore(net): add helper access functions for wrapped stream (#216) 2022-11-16 11:11:47 -08:00
3ffc0da7c8 feat(net): add disconnect reason (#218) 2022-11-16 11:11:34 -08:00
09c5c3449e feat(executor): transaction and receipts verification (#195)
* transaction verification

* Add providers to interfaces

* add receipt check in executor verify

* Removed receipts, added bloom

* post merge header checks

* fmt clippy

* gas price type removal

* rm leftover

* move consts to contstant.rs
2022-11-16 11:10:36 -08:00
75a6d06301 refactor(net): separate Sink and Stream (#217) 2022-11-16 11:10:11 -08:00
bb83d8a528 Revert "chore(txpool): use stabilized pop_last (#213)" (#221)
This reverts commit bdf41d39a8.
2022-11-16 19:41:24 +01:00
11404adf6c chore(txpool): remove hash generics (#211) 2022-11-16 12:19:30 +01:00
bdf41d39a8 chore(txpool): use stabilized pop_last (#213) 2022-11-16 12:19:15 +01:00
6b336c62fb feat: add blog propagation handlers (#205) 2022-11-15 23:33:03 +01:00
f8fddcdfa4 feat(p2p): integrate txpool in p2p (#208) 2022-11-15 22:27:41 +01:00
f0388e4032 refactor: move BlockHashOrNumber to primitives (#203) 2022-11-15 09:44:07 -08:00
391a509443 feat: add FromRecoveredTransaction conversion trait (#207) 2022-11-15 16:24:13 +01:00
b60ced1de1 feat: add missing message handling (#200)
* feat: add missing message handling

* refactor: new block message handling

* feat: add events and commands for transaction handling

* more work in transactions

* chore: silence warnings
2022-11-15 10:34:28 +01: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
651eed1086 chore(txpool): add PoolError::hash function (#202) 2022-11-14 20:35:08 +01:00
14e97b2c43 chore(txpool): add external transaction helper function (#201) 2022-11-14 20:34:15 +01: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
5ca2cab97f refactor: move RequestError from network to interfaces p2p (#197) 2022-11-13 09:46:38 +01:00
139efee599 feat(net): impl peer management (#194) 2022-11-12 08:41:15 +01:00
9575eb89fb ci: fix workflow concurrency control (#191) 2022-11-11 07:46:32 +01:00
2754315e68 chore: omner -> ommer (#192)
* chore: omner -> ommer

* chore: missmatch -> mismatch

* chore: other typos
2022-11-11 07:46:09 +01:00
c13898e199 ci: make codecov less noisy (#193) 2022-11-11 07:45:43 +01:00
1db9a5aed4 ci: NEXTEST_EXPERIMENTAL_FILTER_EXPR env var no longer required (#188) 2022-11-10 22:30:19 +01:00
c43d752929 feat(net): more request handling (#186)
* feat(net): more request handling

* rm uneccessary checks

* rm box
2022-11-10 21:24:47 +01:00
dd4878c0e3 fix: remove broken client feature for pubsub (#189) 2022-11-10 20:12:32 +01:00
a77018fe03 chore: bump git deps in Cargo.lock (#187) 2022-11-10 19:57:11 +01:00
fd6a7cb628 WIP: feat: ipc support (#144)
* feat: ipc support

* copy futures

* feat: port ipc implementation

* cleanup

* add test

* fix clippy

* add request test
2022-11-10 19:47:00 +01:00
fc9b6f35e7 feat(test): add TestApi type (#183) 2022-11-10 13:17:36 -05:00
d4aabe4751 fix(eth-wire): fix usage of sink API in P2PStream (#184)
* fix(eth-wire): fix usage of sink API in P2PStream

* add error checks for sink buffer inserts
2022-11-09 19:06:27 -05:00
9e35d58b05 feat(primitive): Signer recovery (#179)
* feat(consensus): Signer recovery and tx validation

* Signature hash and use seckp256k1 over k256

* use deref_more for transactions

* cleanup and fix for eip1559 hash

* fix hash calculation on decoding
2022-11-09 18:11:32 +01:00
836ad6aaee feat(net): add request/response message types (#176)
* feat(net): add request/response message types

* chore: rustfmt
2022-11-08 17:52:17 +01:00
b9700791c8 feat(db): transaction value type (#175) 2022-11-08 16:56:13 +01:00
7ecbe01741 feat(provider): Add StorageProvider impl, table changes (#172)
* feat(provider): Add StorageProvider impl, table changes

* unwind header numbers by walker (#174)

* readme, fmt

* fix tests

* Update crates/interfaces/src/provider/db_provider/storage.rs

Co-authored-by: Roman Krasiuk <rokrassyuk@gmail.com>

* Update crates/interfaces/src/provider/db_provider/storage.rs

Co-authored-by: Roman Krasiuk <rokrassyuk@gmail.com>

Co-authored-by: Roman Krasiuk <rokrassyuk@gmail.com>
2022-11-08 15:55:45 +01:00
1408309b74 feat(net): add active session type (#169)
* refactor(net): unify capability types

* refactor(net): unify capability types

* feat(net): add active session type
2022-11-07 23:15:38 +01:00
86ffb4756d feat(bin): simple reth node command (#158)
* feat(bin): simple reth node command

* use silent flag

* small chore
2022-11-07 12:10:09 -08:00
caad026c70 refactor: rename HeaderLocked to SealedHeader (#173) 2022-11-07 21:06:53 +01:00
099d3cee9a meta(dep): ignore c files (#171) 2022-11-07 19:59:46 +01: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
e870a4ce13 refactor(txpool): use tx hash for on new block update (#170)
* refactor(txpool): use tx hash for updates

* chore: rustfmt
2022-11-07 14:50:36 +01:00
b7cdfbf4f9 feat(net): network scaffolding (#110)
* feat(net): network scaffolding
2022-11-07 09:27:08 +01:00
9c40f8265b test(sync): headers stage test runner (#163)
* refactor headers stage tests

* inline unwind util functions
2022-11-04 08:15:34 -07:00