lighthouse-pulse/beacon_node/network/src
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_processor Check lateness of block before requeuing it (#4208) 2023-04-19 04:23:20 +00:00
service Support for Ipv6 (#4046) 2023-03-14 01:13:34 +00:00
subnet_service Separate BN for block proposals (#4182) 2023-04-26 01:12:36 +00:00
sync Maintain trusted peers (#4159) 2023-05-03 04:12:10 +00:00
error.rs Rename eth2_libp2p to lighthouse_network (#2702) 2021-10-19 00:30:39 +00:00
lib.rs Separate committee subscriptions queue (#3508) 2022-08-30 05:47:31 +00:00
metrics.rs Clean capella (#4019) 2023-03-01 03:19:02 +00:00
nat.rs Support for Ipv6 (#4046) 2023-03-14 01:13:34 +00:00
persisted_dht.rs Rename eth2_libp2p to lighthouse_network (#2702) 2021-10-19 00:30:39 +00:00
router.rs Remove Router/Processor Code (#4002) 2023-03-15 01:27:47 +00:00
service.rs Remove Router/Processor Code (#4002) 2023-03-15 01:27:47 +00:00
status.rs enable 4844 at epoch 3 2022-09-18 12:13:03 +02:00