Skip to content
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

Closed
Tracked by #1353
alrevuelta opened this issue Feb 17, 2023 · 5 comments · Fixed by #1609
Closed
Tracked by #1353

chore: improve relayConnectivityLoop to make sure in/out conns are relay conns #1566

alrevuelta opened this issue Feb 17, 2023 · 5 comments · Fixed by #1609
Assignees

Comments

@alrevuelta
Copy link
Contributor

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)
@alrevuelta
Copy link
Contributor Author

This should allow us to track relay connections.
vacp2p/nim-libp2p#866

@Menduist
Copy link
Contributor

@alrevuelta
Copy link
Contributor Author

Perhaps this can work as a temporal solution but its not just limited to relay peers. In the future we may want to track also store connections or other protocols, example. Also with the current exposed variables, afaik we can't get the direction of the connection.

@jm-clius
Copy link
Contributor

Note: May require some underlying changes in submodule. Iceboxed for now.

@jm-clius jm-clius moved this to Icebox in Waku Mar 20, 2023
@alrevuelta
Copy link
Contributor Author

This PR is almost ready and will unblock this vacp2p/nim-libp2p#878

@alrevuelta alrevuelta added this to the Release 0.17.0 milestone Apr 4, 2023
@alrevuelta alrevuelta self-assigned this Apr 4, 2023
@jm-clius jm-clius moved this from Icebox to In Progress in Waku Apr 4, 2023
@github-project-automation github-project-automation bot moved this from In Progress to Done in Waku Apr 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants