-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Split Peerset into reputation store & ProtocolControllers
#13611
Conversation
altonen
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did a first pass. There are some problems we need to address, especially regarding Peer. I hope we can get rid of it and just match on peer state and then perform the correct action.
Co-authored-by: Aaro Altonen <[email protected]>
…(_)` & `NotConnected`
altonen
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is going in the right direction. Some of code duplication should be removed if possible
Co-authored-by: Aaro Altonen <[email protected]>
|
@altonen I've reworked peer management using ideas from your prototype. Apart from a couple of places where I had to call |
altonen
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is looking good already. alloc_slots() can be improved but could you write some tests to confirm this implementation works as expected?
Sure, that was my plan. |
Co-authored-by: Aaro Altonen <[email protected]>
|
The PR is ready for review. Relaxing requirements on possible messages in |
|
We definitely need a burn-in for this PR. |
Versi burn-in would be nice |
altonen
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM but let's merge it only after the burn-in is done
melekes
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Co-authored-by: Anton <[email protected]>
)" This reverts commit b9c9522.

The connection logic (connect/drop/accept/reject) is extracted from
PeersetintoProtocolControllerandPeerStore. EachProtocolControllerinstance is responsible for a specific notifications protocol, and should allow customization of connection logic by protocols in the future.PeerStoreis responsible for connection candidates and peer reputations.Resolves #13531.