Commit Graph

73 Commits

Author SHA1 Message Date
8f9d2908ca chore: add and fix more lints, improve docs (#4765) 2023-09-25 15:46:46 +00:00
4aa3ebdbdd chore: fix doc lints (#4639) 2023-09-18 17:08:35 +00:00
660ea0c937 perf: limit number of new batch of dials (#4530) 2023-09-11 18:35:50 +00:00
6ae6c9e71b perf: increase refill slots interval (#4528) 2023-09-08 16:33:02 +00:00
0477f97773 chore: change best unconnected condition (#4527) 2023-09-08 15:28:00 +00:00
b46101afb5 feat(cli): add max peer args (#4024) 2023-08-01 18:44:39 +00:00
77faa04ca6 feat: remove peers after several unsuccessful attempts (#3780) 2023-07-14 18:50:59 +00:00
1c796f24fc chore: rustfmt (#3532) 2023-07-02 12:51:43 +02:00
d2c68edf23 feat: rework logs (#2988) 2023-06-05 17:43:14 +00:00
3b37e83070 chore: make reth config serde default (#2879) 2023-05-29 11:42:14 +00:00
d146bb86f6 chore(clippy): make clippy happy (#2475) 2023-04-30 11:40:43 +02:00
93d3bd9dcd feat(net): fix peer backoffs to not interfere with reputation (#2422) 2023-04-27 15:53:12 +02:00
bf7960c87a fix(peers): rank dial candidates by reputation only (#2407) 2023-04-26 14:08:20 +02:00
21ebfee461 feat(p2p): add reputation management features (#2389) 2023-04-25 14:18:53 +02:00
581e9ffcc4 fix: poll_tick does not register waker if ready (#2276) 2023-04-16 16:45:57 -04:00
3779a225fb fix: remove peers after incoming connection closed (#2245) 2023-04-14 11:42:49 -04:00
c0a17d655b feat(net): reward connected peers over time (#2102) 2023-04-04 14:26:58 +02:00
41b1b3c769 perf(net): cap backoff duration and only apply to severe backoff kinds (#2022) 2023-03-29 18:14:43 -04:00
47b9738ede chore: fix some typos (#2025) 2023-03-29 14:49:50 +02:00
1b52fe90c8 feat: do not ban non-global IPs (#1549) 2023-02-24 18:21:02 -05:00
760f76ab86 fix(net): set tracked peers metric by value (#1420) 2023-02-16 13:27:40 -08:00
cd1afccf52 revert: "Revert "cli: integrate TaskExecutor" (#1329)" (#1336) 2023-02-14 15:50:19 +01:00
48d121dc54 Revert "cli: integrate TaskExecutor" (#1329) 2023-02-13 19:28:19 -08:00
5997103078 cli: integrate TaskExecutor (#1314) 2023-02-13 14:24:18 -08:00
3a13a399da test(net): speedup network tests (#1269) 2023-02-10 12:54:09 +01:00
4df228a87e feat(cli): add persistent peers (#1167)
Co-authored-by: lambdaclass-user <github@lambdaclass.com>
Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>
Co-authored-by: Georgios Konstantopoulos <me@gakonst.com>
2023-02-08 19:36:06 +01:00
dab1f4f497 feat(net): add shutdown network signal (#1011)
Co-authored-by: lambdaclass-user <github@lambdaclass.com>
2023-02-04 12:28:13 -08:00
cafbb0f14c perf(net): increase default capacity for incoming messages (#1158) 2023-02-04 01:59:01 -05:00
5c32ad01c9 refactor: add Peers trait und decouple rpc from NetworkHandle (#1100) 2023-01-31 10:32:45 -08:00
be70f810e9 test: Modify can_serde_config_test (#1048)
Co-authored-by: lambdaclass-user <github@lambdaclass.com>
Co-authored-by: xqft <estefano.bargas@fing.edu.uy>
2023-01-30 19:48:17 -08:00
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
d55b389754 test: added unban_peer() test (#1039)
Co-authored-by: lambdaclass-user <github@lambdaclass.com>
2023-01-25 17:08:32 +01:00
0666e29427 feat: move ReputationChangeKind to network-api (#1035) 2023-01-25 13:17:26 +01:00
aadc21cf30 fix(net): reset backoff counter on graceful disconnect (#918) 2023-01-18 11:43:26 -05:00
16ce828e27 feat(net) Increase the timeout for peers that are to be backed off repeatedly (#828)
Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>
2023-01-14 12:22:15 +01:00
e3dbaf686e feat: include optional ForkId in Discovery (#863) 2023-01-13 13:30:08 +01:00
2e95ed4b6e fix: make config serialize as toml (#811) 2023-01-11 13:36:41 +01:00
55bc2591e6 fix(net): handle outgoing connection error correctly (#798) 2023-01-10 21:30:17 +01:00
babf73612f feat(net): add granular backoff durations (#729)
* feat(net): add granular backoff durations

* update backoff durations
2023-01-05 14:09:38 +02:00
e4bd5b4fe9 feat(net): add NetworkMetrics (#708)
* Added NetworkMetrics

* update docs

* add more metrics and make naming consistent

* add active inbound and outbound connection metrics
2023-01-05 10:17:57 +01:00
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
346d50ebf4 feat: test trusted peers functionality (#687)
* Add test for trusted_peer prioritization

* Add test for connect_trusted_nodes_only flag
2023-01-02 18:36:50 +01:00
efac887e30 chore: add serde feature to network crate (#653)
* Add serde feature and support for PeersConfig

* Add Duration fields and Weights

* Add serde for ConnectionInfo field
2023-01-01 18:27:55 +02:00
ed55c2bf2b docs(net): update best_unconnected docs (#670) 2023-01-01 17:16:30 +02:00
1f6a9436ac feat(net): enforce trusted_nodes_only setting (#660)
* Add PeerKind and enforce trusted_only setting

* Don't remove trusted peer on graceful close

* Don't remove trusted nodes on PeerCommand::Remove

* Rename PeerKind::NonTrusted to Basic

* Move PeerKind::is_trusted to Peer impl

* Add trusted peer prioritization
2023-01-01 12:14:10 +01:00
76e76bb651 feat: add trusted nodes configuration (#569)
* Add preferred nodes to config

* Add preferred nodes on boot

* Add flag in config for trusted only mode

* Add preferred nodes configuration to config

* Fix comment

* Add preferred nodes to config file

* Rename preferred_nodes to trusted_nodes

* Change preferred to trusted

I renamed preferred_nodes to trusted_nodes in various places.
Seems I missed quite a bit of them.

* Pull trusted_only from config

* Rename DiscoveryConfig to PeersConfig

* Fix last commit

Now actually renamed DiscoveryConfig

* Rename trusted_only to connect_trusted_nodes_only

* Add helper function

* Use HashSet for boot_nodes and trusted_nodes

* Change trusted nodes functions in ConfigBuilder

* Move trusted peers from discv4 to network config

* Add trusted nodes to peers on Manager creation

* Use NodeRecord in trusted_nodes config

* Fix comment

* Move trusted_nodes config to PeersConfig

* Add trusted nodes directly to peers

* Move network_config to Config impl

* Move start_network to NetworkConfig impl
2022-12-28 21:48:11 +01:00
ebd686a407 refactor(net): rename and restructure wire error types (#614) 2022-12-26 16:33:59 +02:00
8779000460 test(net): add test for dropped pending no response (#613) 2022-12-26 15:51:14 +02:00
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
5affa67805 refactor(net): unify closed incoming session handling (#600) 2022-12-24 12:38:21 +01:00