Skip to content

add backwards compatibility for doctur with legacy behavior#3457

Merged
MarcoPolo merged 3 commits intolibp2p:masterfrom
jpserrat:jpserrat/add-dctur-backwards-compatibility
Jan 29, 2026
Merged

add backwards compatibility for doctur with legacy behavior#3457
MarcoPolo merged 3 commits intolibp2p:masterfrom
jpserrat:jpserrat/add-dctur-backwards-compatibility

Conversation

@jpserrat
Copy link
Contributor

Adding dctur backward compatibility with legacy behavior:

  • holepuncher (svc in the new code) now switch to client on third retry.

@jpserrat
Copy link
Contributor Author

@MarcoPolo I've added the switch in holepuncher. Just a few points:

  • I didn't add a random time for the switch, I didn't understand why it is needed. Can you elaborate?
  • I've added the switch only on the server (holepuncher.go) as suggested on the issue, but for both clients we have to also add this on svc.go. I was think of making a peer store to track peer attempt and switch after some attempts. Do you have any suggestions?

@MarcoPolo MarcoPolo linked an issue Jan 29, 2026 that may be closed by this pull request
@MarcoPolo MarcoPolo force-pushed the jpserrat/add-dctur-backwards-compatibility branch from 9810c01 to e4539ae Compare January 29, 2026 21:16
@MarcoPolo MarcoPolo merged commit 7f5ce40 into libp2p:master Jan 29, 2026
8 of 9 checks passed
@MarcoPolo
Copy link
Collaborator

Thank you @jpserrat!

@jpserrat jpserrat deleted the jpserrat/add-dctur-backwards-compatibility branch January 30, 2026 08:29
@jpserrat
Copy link
Contributor Author

Thank you @MarcoPolo!

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 this pull request may close these issues.

Fix dcutr roles in holepunching

2 participants