-
Notifications
You must be signed in to change notification settings - Fork 42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feat/peer manager #596
Feat/peer manager #596
Conversation
Jenkins BuildsClick to see older builds (50)
|
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.
Nice PR!
|
||
// TODO: Move all the protocol IDs to a common location. | ||
// WakuRelayIDv200 is protocol ID for Waku v2 relay protocol | ||
const WakuRelayIDv200 = protocol.ID("/vac/waku/relay/2.0.0") |
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.
this constant can be obtained from relay
package
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.
If i do that, it was causing some circular import issue.
I think we will have to move all protocol constants to a common file so that they can be imported wherever we want.
if inRelayPeers.Len() > int(pm.InRelayPeersTarget) { | ||
//Start disconnecting peers, based on what? | ||
//For now, just disconnect most recently connected peers | ||
//TODO: Need to have more intelligent way of doing this, maybe peer scores. |
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 like the idea of using peer score for choosing which peer to remove!
Using peerstore's supportedProtocols method Co-authored-by: richΛrd <[email protected]>
Review comment, use context to pause connectivity loop during node shutdown. Co-authored-by: richΛrd <[email protected]>
Introduce peer manager as per #621
Tested pruning of incoming relay peer connections based on configuration.
Tested outRelay Peers limit based on configuration.
Not sure if this will impact service peer connectivity, since that has not yet been tested.
If so, then will implement service slots next which should take care of that.