Commit Graph

62 Commits

Author SHA1 Message Date
Matthias Seitz
83b2fb9b41 feat: add SealedBlock in reth-primitives-traits (#13735) 2025-01-15 01:12:43 +00:00
Dan Cline
1f6b7d1239 feat: wire network primitives to remaining components (#13143) 2024-12-04 22:51:19 +00:00
Matthias Seitz
f12d7a9264 chore: use ethereum-forks types directly (#12702) 2024-11-20 11:15:48 +00:00
Arsenii Kulikov
aece53ae88 feat: make downloaders and clients generic over block parts (#12469)
Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>
2024-11-12 15:13:21 +00:00
Arsenii Kulikov
24b3e63ab3 feat: make Consensus trait generic over block parts (#12451) 2024-11-11 16:35:01 +00:00
Håvard Anda Estensen
ae9b13f4a1 net: replace reth-primitive imports (#11023) 2024-09-19 08:29:01 +00:00
Thomas Coratger
69e5a8587b clippy: add manual_is_variant_and clippy lint (#10556) 2024-08-27 10:04:19 +00:00
Emilia Hane
d12f0ab815 Move PeersHandleProvider to new module reth_network_api::test_utils (#10060) 2024-08-05 08:46:49 +00:00
Emilia Hane
b10517b3bf chore(net): extract NetworkHandle methods for launching node to traits (#9966) 2024-08-01 16:44:23 +00:00
Emilia Hane
78703b5729 Move reputation types from reth-network-api to reth-network-types (#9914)
Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>
2024-07-31 20:08:38 +00:00
Matthias Seitz
2852893a7d chore: rename network-types to network-peers (#8699) 2024-06-09 13:13:46 +00:00
Thomas Coratger
e02b935e94 add match_same_arms clippy lint (#8549) 2024-06-03 17:42:25 +00:00
Thomas Coratger
7c17c6e469 add doc_markdown clippy lint (#8552)
Co-authored-by: Alexey Shekhirin <a.shekhirin@gmail.com>
Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>
2024-06-03 13:21:45 +00:00
Thomas Coratger
3d3f52b2a4 Add missing_const_for_fn clippy lint (#8498) 2024-05-30 09:50:03 +00:00
Thomas Coratger
19c529e8df add use_self clippy lint (#8325) 2024-05-29 13:14:14 +00:00
Matthias Seitz
de4e0ba041 chore: rm reth-interfaces from network (#8435) 2024-05-28 16:11:08 +00:00
Roman Krasiuk
aef1bcc435 chore: make clippy happy (#8068) 2024-05-03 10:18:41 +00:00
Andrzej Sulkowski
cc4a418ddf refactor: extract peer types to net/types (#7912)
Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>
2024-04-27 04:18:59 +00:00
Matthias Seitz
33e7e0208f fix: derank peers that responded with bad data (#7854)
Co-authored-by: Oliver Nordbjerg <onbjerg@users.noreply.github.com>
2024-04-25 12:25:54 +00:00
DaniPopes
9ca813aee2 chore: remove some unnecessary calls to unwrap/expect (#6727) 2024-02-22 16:36:08 +00:00
Dan Cline
79452eadaf chore: make clippy happy (#6666) 2024-02-19 06:31:47 +00:00
DaniPopes
b1b059fe9b chore: clean up lints (#5881) 2023-12-28 16:23:50 +00:00
Bjerg
6af8e0f7ea chore: use new aquamarine macro (#5785) 2023-12-15 14:49:01 +00:00
DaniPopes
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
DaniPopes
8f9d2908ca chore: add and fix more lints, improve docs (#4765) 2023-09-25 15:46:46 +00:00
Matthias Seitz
a5dbbe4187 fix: don't starve high priority requests (#2660) 2023-05-13 13:18:24 -04:00
Dan Cline
b28c40223e chore: move block body to primitives (#1874) 2023-03-20 21:14:23 -07:00
François Garillot
075544e889 refactor: various cleanups (#1833)
Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>
2023-03-18 14:13:09 +01:00
Matthias Seitz
54744b3e6b fix(net): always reset peer state on response (#1179) 2023-02-06 00:53:00 -08:00
Matthias Seitz
28cb91c6b4 perf(net): use qualified types for headers client future (#1115) 2023-02-01 13:12:48 +01:00
Aurélien
c5bc272057 fix: report reputation changes correctly (#1086)
Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>
2023-01-31 11:05:13 -08:00
Aurélien
e2ac4d3f3c feat: convert HeadersClient BodiesClient futures into associated types (#1063) 2023-01-30 01:25:15 -08:00
Aurélien
0666e29427 feat: move ReputationChangeKind to network-api (#1035) 2023-01-25 13:17:26 +01:00
Matthias Seitz
a24048a237 refactor: deprecate downloader trait (#959) 2023-01-24 13:38:11 +01:00
Matthias Seitz
d32710e1ea chore: make FetchClient Cloneable (#970) 2023-01-22 12:27:06 -08:00
Matthias Seitz
009d2056f9 fix: mark response correctly (#966) 2023-01-22 16:48:04 +01:00
Aurélien
583426bb95 Prevent follow-up requests if a response is likely bad (#946) 2023-01-21 20:13:20 -08:00
Ikechukwu Ahiara Marvellous
ac9f26fcab Extend HeadersClient, BodiesClient with a priority argument (#935)
Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>
2023-01-20 14:20:46 +01:00
Matthias Seitz
a1dfafe331 docs: additional response handling docs (#917) 2023-01-18 11:33:56 -05:00
Matthias Seitz
79fad91ca0 feat(net): integrate num active peers in downloader (#900)
Co-authored-by: Roman Krasiuk <rokrassyuk@gmail.com>
2023-01-17 01:31:52 -08:00
Tomás
a5bdfe54dd feat(net): prioritize requesting peers with low latency (#835)
Co-authored-by: lambdaclass-user <github@lambdaclass.com>
2023-01-13 16:01:39 +01:00
Dimitris Apostolou
31cb66902e fix: Fix typos (#773) 2023-01-09 01:43:51 +01:00
Sanket Shanbhag
1b5bc5e1f7 Rotate peers when fetching (#743) 2023-01-06 12:21:42 +01:00
Bjerg
ade1ea4216 refactor: clean up StateFetcher::next_peer (#738)
* refactor: clean up `StateFetcher::next_peer`

The `&mut Peer` is unused, so we do not need to
return it.

* chore: idiomatic rust
2023-01-05 23:38:31 +01:00
Matthias Seitz
d9d0ba14c4 docs: add outgoing request diagram (#630) 2022-12-28 20:36:53 +01:00
Andrew Kirillov
d4d8a8c882 Moves code walkthrough book chapters to docs (#629)
* replaced template blocks with code blocks in stages chapter

* replaced template blocks with code blocks in network chapter

* moved book sections to docs

* fix indentation in recover_signer codeblock

* remove unnecessary TODO comment in network.md
2022-12-28 10:24:39 +01:00
Andrew Kirillov
a51fa4fd63 docs(book): start book chapter for network crate (#445)
* WIP FOR DRAFT PR

* WIP draft, walking through usage in pipeline

* diving deeper into instantiation of NetworkHandle & FetchClient

* WIP network management task & eth requests task done (ish)

* address pr comments: networkmanager as standalone task, networkconfig as main entrypoint for setup

* complete draft of the  crate docs

* restructured, starts w/ expl of

* added more snippets/anchors

* using ignore flag on code blocks, brief explanation of  struct

* typos addressed
2022-12-27 14:53:15 -08:00
Matthias Seitz
c1f124d3e3 feat(net): temporarily ban bad peers (#492)
* feat(net): temporarily ban bad peers

* use half duration interval

* Update crates/net/network/src/peers/manager.rs

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

* fix bad test

Co-authored-by: Bjerg <onbjerg@users.noreply.github.com>
2022-12-16 18:22:25 +01:00
Roman Krasiuk
daaf039fbf feat(sync): state transition indexes (#449)
* introduce state transitions and revert/modify block bodies table

* init refactor

* revamp transaction iteration based on bodies and add state transition mappings

* change expected return on empty db execution

* interim commit

* fix body downloader & stage

* refactor(bodies/dl): make fetch bodies fn more clear

* chore: disable unused vars/fns temporarily until exec is back

* chore: fmt

* test: fix tests

* use transitions in execution stage

* clarify empty unwind test

* remove last_tx_index fn

* rename fn and var names

* fix full block response comment

* rename fetcher`s get_block_body to get_block_bodies

* Update crates/stages/src/db.rs

Co-authored-by: Georgios Konstantopoulos <me@gakonst.com>

* fmt

* fix index overlap check error

* uncomment eth chain command

* fix doc comment

* typos

* cleanup

* any_last_tx_index -> last_tx_index

Co-authored-by: Georgios Konstantopoulos <me@gakonst.com>
Co-authored-by: Oliver Nordbjerg <hi@notbjerg.me>
2022-12-16 08:37:49 -08:00
Roman Krasiuk
22dc50e5f6 feat(sync): download peer penalization (#427)
* feat(sync): download peer penalization

* peer penalization

* add tracing on penalization

* add trace on request

* rename consensus back

* clippy

* fix tests

* nit: download result

* nit: fix comment

* rename penalize() to report_bad_message() and move DownloadError

Co-authored-by: Georgios Konstantopoulos <me@gakonst.com>
2022-12-15 10:42:18 +02:00