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

Fix dcutr roles in holepunching #3171

Open
MarcoPolo opened this issue Feb 5, 2025 · 0 comments · May be fixed by #3044
Open

Fix dcutr roles in holepunching #3171

MarcoPolo opened this issue Feb 5, 2025 · 0 comments · May be fixed by #3044

Comments

@MarcoPolo
Copy link
Collaborator

We did the opposite thing of what the spec says to do. This meant that we would fail to hole-punch with rust nodes because both sides would attempt to be the dialer.

The spec is a bit confusing since roles get flipped in the middle. But essentially:

  1. A connects to B.
  2. B initiates the /libp2p/dcutr protocol.
  3. After synchronizing, A and B dial each other. A is the client and B is the server.

This means the side handling the stream is the client, and the side initiating the stream should be the server.

#3044 exposes a flag to enable the spec behavior, but it is default set to legacy behavior. There are no backwards compatible migrations in that PR.

To close this issue we should implement a backwards compatible change. One suggestion by Sukun is:

On the side that in the new code will be the Server, can we add a random wait time after which the server will switch the role to Client and initiate the security negotiation?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant