-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Split Peerset
into reputation store & ProtocolController
s
#13611
Conversation
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`
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 |
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 |
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
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
Peerset
intoProtocolController
andPeerStore
. EachProtocolController
instance is responsible for a specific notifications protocol, and should allow customization of connection logic by protocols in the future.PeerStore
is responsible for connection candidates and peer reputations.Resolves #13531.