lighthouse/beacon_node
Age Manning 616bee6757 Maintain trusted peers (#4159)
## Issue Addressed
#4150 

## Proposed Changes

Maintain trusted peers in the pruning logic. ~~In principle the changes here are not necessary as a trusted peer has a max score (100) and all other peers can have at most 0 (because we don't implement positive scores). This means that we should never prune trusted peers unless we have more trusted peers than the target peer count.~~

This change shifts this logic to explicitly never prune trusted peers which I expect is the intuitive behaviour. 

~~I suspect the issue in #4150 arises when a trusted peer disconnects from us for one reason or another and then we remove that peer from our peerdb as it becomes stale. When it re-connects at some large time later, it is no longer a trusted peer.~~

Currently we do disconnect trusted peers, and this PR corrects this to maintain trusted peers in the pruning logic.

As suggested in #4150 we maintain trusted peers in the db and thus we remember them even if they disconnect from us.
2023-05-03 04:12:10 +00:00
..
beacon_chain Split common crates out into their own repos (#3890) 2023-04-28 01:15:40 +00:00
builder_client Set user agent on requests to builder (#4199) 2023-04-18 02:47:36 +00:00
client remove dup log (#4155) 2023-04-03 03:02:58 +00:00
eth1 Split common crates out into their own repos (#3890) 2023-04-28 01:15:40 +00:00
execution_layer Split common crates out into their own repos (#3890) 2023-04-28 01:15:40 +00:00
genesis Split common crates out into their own repos (#3890) 2023-04-28 01:15:40 +00:00
http_api Split common crates out into their own repos (#3890) 2023-04-28 01:15:40 +00:00
http_metrics Add content-type header to metrics server response (#3970) 2023-02-28 02:20:50 +00:00
lighthouse_network Maintain trusted peers (#4159) 2023-05-03 04:12:10 +00:00
network Maintain trusted peers (#4159) 2023-05-03 04:12:10 +00:00
operation_pool Split common crates out into their own repos (#3890) 2023-04-28 01:15:40 +00:00
src Maintain trusted peers (#4159) 2023-05-03 04:12:10 +00:00
store Split common crates out into their own repos (#3890) 2023-04-28 01:15:40 +00:00
tests Appease Clippy 1.68 and refactor http_api (#4068) 2023-03-13 01:40:03 +00:00
timer Use async code when interacting with EL (#3244) 2022-07-03 05:36:50 +00:00
Cargo.toml Release v4.1.0 (#4191) 2023-04-20 00:51:38 +00:00