Commit Graph

71 Commits

Author SHA1 Message Date
Delweng
b93e70c429 feat(net/peer): add peer with udp socket (#9156)
Signed-off-by: jsvisa <delweng@gmail.com>
2024-06-29 09:02:09 +00:00
Matthias Seitz
2852893a7d chore: rename network-types to network-peers (#8699) 2024-06-09 13:13:46 +00:00
Thomas Coratger
2b4fa96065 add explicit_iter_loop clippy lint (#8570)
Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>
2024-06-03 18:14:50 +00:00
Thomas Coratger
b686872716 add explicit_into_iter_loop clippy lint (#8569) 2024-06-03 17:44:44 +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
Matthias Seitz
de4e0ba041 chore: rm reth-interfaces from network (#8435) 2024-05-28 16:11:08 +00:00
Waylon Jepsen
31b6bdd13c wip: lru changes (#7484)
Co-authored-by: Emilia Hane <elsaemiliaevahane@gmail.com>
2024-05-17 01:31:47 +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
Delweng
7b3e418950 feat(net/manager): apply trust-nodes-only for incoming nodes (#7177)
Signed-off-by: jsvisa <delweng@gmail.com>
2024-03-18 10:51:14 +00:00
Matthias Seitz
11dc546d10 feat: support trusted peer ids without address (#7155) 2024-03-16 15:06:53 +00:00
DaniPopes
3c028e5ef4 chore: fix typos (#7049) 2024-03-08 14:23:37 +00:00
Dan Cline
a554c1fbf8 chore: remove unused genesis_hash in NetworkState and NetworkManager (#6704) 2024-02-21 12:03:04 +00:00
Fabian Zeiher
df4774c709 fix: randomly sample peers in NetworkState::announce_new_block() for block propagation (#5930) 2024-01-10 15:14:17 +00:00
DaniPopes
b1b059fe9b chore: clean up lints (#5881) 2023-12-28 16:23:50 +00:00
DaniPopes
f8ceda9ea8 chore: reduce size of common types (#5304) 2023-11-06 12:45:20 +00:00
Alexey Shekhirin
9ca44efe9f feat(bin): separate journald and file log filters, log debug to file by default (#5197) 2023-10-31 11:08:15 +00:00
Matthias Seitz
f782a33310 chore: downgrade debug! to trace! (#5186) 2023-10-26 09:13:26 +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
cac4049a08 chore: relax network blockreader trait bounds (#4079) 2023-08-05 16:00:05 +02:00
Supernovahs.eth
6d1e8a2ecc feat:new discovered node record event stream (#3707)
Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>
2023-07-17 09:42:28 +00:00
Matthias Seitz
4c7f980c77 chore: add network example (#3753) 2023-07-13 15:26:02 +00:00
joshieDo
054f30f43c chore: rename Block*Provider for Block*Reader (#3385) 2023-06-26 14:13:45 +00:00
Matthias Seitz
10b97b29af chore: downgrade error and warn traces to debug (#2541) 2023-05-03 15:53:05 +02:00
Dan Cline
b28c40223e chore: move block body to primitives (#1874) 2023-03-20 21:14:23 -07:00
Matthias Seitz
7c9b212b4a chore: relax Arc requirement for provider (#1429) 2023-02-17 14:40:20 +01:00
Matthias Seitz
5c32ad01c9 refactor: add Peers trait und decouple rpc from NetworkHandle (#1100) 2023-01-31 10:32:45 -08:00
Bjerg
87306f2892 ci: ensure docs build (#1073)
Co-authored-by: xqft <estefano.bargas@fing.edu.uy>
Co-authored-by: lambdaclass-user <github@lambdaclass.com>
2023-01-27 18:49:22 +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
Sanket Shanbhag
5c80bc9122 fix: validate fork_id before adding peer from discovery (#871) 2023-01-13 18:30:34 +01: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
Sanket Shanbhag
e3dbaf686e feat: include optional ForkId in Discovery (#863) 2023-01-13 13:30:08 +01:00
Aurélien
65bc3cb7b8 RPC Admin namespace implementation (#685)
* AdminApi first draft

* Implement add_trusted_peer and remove_trusted_peer

* Fix tests

* Refactoring NetworkHandle peer related methods

* Refactoring add_discovered_node in PeersManager

* Change record type from String to NodeRecord

* Adding NetworkHandleMessage::RemovePeer command
2023-01-03 14:02:05 +01:00
Matthias Seitz
3ab6c278e8 fix(net): improve error propagation (#620)
* fix(net): improve error propagation

* refactor: unify on closed session

* add noop helpers

* add noop helpers

* test setup

* test: add dropped connection test

* rename mock --> test-utils
2022-12-29 16:05:56 +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
Sanket Shanbhag
73e12341c4 feat(net): Make PeerManager emit peerevents for admin rpc (#602)
* Make PeerManager emit peerevents for admin rpc

* Fix tests to include new peer events
2022-12-25 10:00:10 +01:00
Matthias Seitz
5affa67805 refactor(net): unify closed incoming session handling (#600) 2022-12-24 12:38:21 +01:00
Matthias Seitz
cb58759e66 feat(net): validate discovered enr forkid (#586) 2022-12-23 12:15:07 +01:00
Matthias Seitz
7a13cf6688 feat(net): add ForkTransition type (#542) 2022-12-20 18:01:54 +01:00
Matthias Seitz
aac078a132 fix(net): add already connected check (#521)
* fix(net): add already connected check

* fix: get events before adding peer
2022-12-19 18:03:10 +01: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
Dan Cline
635203759b feat(discv4): support eth entries (#447)
* add ENRRequest and ENRResponse messages

 * todo: encode and decode impls

* scaffold enrrequest and enrresponse msgs

* implement encodable and decodable for enr

* cargo fmt

* impl sending enr requests

* silence clippy for now

* add todos for enrrequest and response in mocks

* make payload length fold more explicit

* feat: add enr support to ping pong

* integrate enr

* add update methods

* add enr handling

* feat: add enr handling

* integrate fork id

* fix: set frontier forkid

* disable eip868 by default

* address comments

Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>
2022-12-16 14:14:19 +02: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
mempirate
c23c65fc3b feat(net): draft for sending status updates through NetworkHandle (#436)
* feat(net): draft for sending status updates through `NetworkHandle`

* feat(net): draft for sending status updates through `NetworkHandle`

* fix(net): remove unused import

* feat(net): implement getters for status update sender half

* docs(net): document methods

* chore: cargo fmt

* feat(net): move status updating logic to NetworkManager and NetworkHandle

* feat(net): move status updating logic to NetworkManager and NetworkHandle

* fix(net): fix headers stage testing

* fix: derive default

* fix: remove StatusUpdate struct

Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>
2022-12-15 08:59:28 +01:00
Matthias Seitz
43f6bb9127 feat(net): integrate discovery banlist (#442)
* feat(net): integrate discovery banlist

* fix typos
2022-12-14 19:47:11 +02:00