Remove Banned connection state from peer database#4493
Remove Banned connection state from peer database#4493jmcph4 wants to merge 8 commits intosigp:unstablefrom jmcph4:2772-remove-banned-conn-state
Banned connection state from peer database#4493Conversation
divagant-martian
left a comment
There was a problem hiding this comment.
while this obviously compiles and indeed removes the PeerConnectionState::Banned, it's not fully untangling score and connection state, since NewConnectionState::Banned and NewConnectionState::Unbanned still exist.
Tests are failing because of this in part. NewConnectionState::Banned is adding banned peers and their ips, and later checks are removing them
| score: Score, | ||
| /// Time at which peer was banned | ||
| #[serde(skip)] | ||
| banned_since: Option<Instant>, |
There was a problem hiding this comment.
I'm not sure this is the best way to keep track of this. Banned peers exist outside the PeerInfo, this keeps the possibility of inconsistency between that tracking and the inner one
I was thinking about this over the weekend and I don't get why lighthouse/beacon_node/lighthouse_network/src/peer_manager/peerdb.rs Lines 1110 to 1139 in 0d6530a Eager for your insight -- perhaps I'm oversimplifying it! |
|
So this was added by age back in #2660. It took me a bit to understand why it made sense again. The main difference is that the |
Issue Addressed
#2772
Proposed Changes
banned_sincefield toPeerInfotype, capturing the time at which a peer was bannedbanned_sincebanned_since_mutPeerConnectionStatus::BannedstateScoreState::BannedvariantAdditional Info
N/A