-
Notifications
You must be signed in to change notification settings - Fork 54
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
chore: improve relayConnectivityLoop to make sure in/out conns are relay conns #1566
Comments
This should allow us to track relay connections. |
Also see nimbus code for scoring Which computes the number of peers in a mesh & numbers of peers subbed to a topic And useful libp2p metrics |
Perhaps this can work as a temporal solution but its not just limited to |
Note: May require some underlying changes in submodule. Iceboxed for now. |
This PR is almost ready and will unblock this vacp2p/nim-libp2p#878 |
Background
Right now we have a
relayConnectivityLoop
that is meant to ensure the node is connected to a target amount of relay nodes. For example, we want nwaku to have always eg 10 relay node connections, and this loop tries to keep them.In order to count this, we currently use
switch.connectedPeers()
(both inbound and outbound) to count the number of connections, but this is not accurate, since this will return "connections in general" not just using the relay protocol.This means that the current estimation of "how many relay nodes are we connected to" is not accurate. With the current exposed variables and methods in nim-libp2p there is not clear easy way of accesing this information.
Acceptance criteria
relayConnectivityLoop
truly tracks the amount of relay connections (not connections in general)The text was updated successfully, but these errors were encountered: