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

Project Flare(decentralised Hole Punching) Phase1 Meta Issue #1039

Closed
23 tasks done
aarshkshah1992 opened this issue Jan 21, 2021 · 11 comments
Closed
23 tasks done

Project Flare(decentralised Hole Punching) Phase1 Meta Issue #1039

aarshkshah1992 opened this issue Jan 21, 2021 · 11 comments
Assignees

Comments

@aarshkshah1992
Copy link
Contributor

aarshkshah1992 commented Jan 21, 2021

This issue is to aggregate all the work and PRs we have open for taking Hole Punching to completion.

Done criteria: we recommend key consumers like go-ipfs and lotus enable it by default because the functionality works, is well tested, and has quality assertions in place to prevent regressions.


Solve Simultaneous connect in multi-stream for TCP hole Punching (Ready for Review)

go-multistream suffers from the simultaneous connect problem wherein it fails when two peers try to connect each other at the same time. This blocks hole punching. This is ONLY a problem for TCP and NOT for QUIC because QUIC does NOT use the multistream protocol for negotiating the security and stream negotiation protocols. The PRs below solve this problem using the method specd out in libp2p/specs#196.


Swarm & Transport changes for Hole-Punching


Emit event for NAT device type


Limited Relay Protocol


Hole-Punching Co-ordination via Relay Server


Integrate Limited Relays


QUIC Changes


AutoRelay


Documentation


Automated testing to prevent regressions

  • Basic project flare (hole punching) test  test-plans#21
    • 2022-11-07 note: this item is deemed out of scope since it's, unfortunately a casualty of a time when functionality released without ensuring we have accompanying end-to-end test coverage. Backfiling test coverage for important functionality (including hole punching) is on the libp2p/test-plans roadmap and also dependent on some work in Testground itself. The issue above will get tackled above as part of those efforts.

Other

The below is a documentation issue that we will do as a best effort.

@aarshkshah1992 aarshkshah1992 self-assigned this Jan 21, 2021
@aarshkshah1992 aarshkshah1992 changed the title Hole Punching Meta Issue QUIC & TCP Hole Punching Meta Issue Jan 21, 2021
@aarshkshah1992 aarshkshah1992 changed the title QUIC & TCP Hole Punching Meta Issue QUIC & TCP Hole Punching Phase1 Meta Issue Feb 17, 2021
@vyzo vyzo changed the title QUIC & TCP Hole Punching Phase1 Meta Issue Project Flare Phase1 Meta Issue Feb 17, 2021
@aarshkshah1992 aarshkshah1992 changed the title Project Flare Phase1 Meta Issue Project Flare(decentralised Hole Punching) Phase1 Meta Issue Feb 18, 2021
This was referenced Feb 19, 2021
@marten-seemann
Copy link
Contributor

Circuit v2

  • p2p-circuit v2 go-libp2p-circuit#125 implements the circuit v2 spec
    • It might need some work to reduce the attack surface.
  • Remove v1 circuit relay on the server side. The client has a built-in fallback to v1, and PL will continue to run v1 relays for a while.
  • Build logic (using autonat events) to start a v2 relay if the node is publicly accessible.

Tentative timeline: Get this ready for the go-ipfs v0.10 release.

Hole Punching

Tentative timeline: We should defer enabling this until a critical mass of nodes have upgraded and are running v2 relays.

AutoRelay

Once a critical mass of v2 relays has been deployed, rewrite the code to use v2 relays (reserve slots and refresh reservations).
The selection logic should be two-fold:

  • Use the DHT and find the closest peers in KAD space, reserve to 2 (or 3) relays from those candidates. Detection of v2 relay support is easy, we can simply wait for identify and see if the node supports the v2 hop protocol.
  • Provide an option to configure static v2 relays (without a default list! we want to stop running relays and be a point a centralization) for users who run their own relays.

@marten-seemann
Copy link
Contributor

Closing this issue. Relay v2 and circuit v2 were rolled out with v0.16.0.

@BigLep
Copy link
Contributor

BigLep commented Mar 10, 2022

@marten-seemann: I'm viewing the done criteria as meaning "we recommend key consumers like go-ipfs and lotus enable it by default".

I think we should review what that specifically means, but I know in the immediacy we need #1351 .

For being crisp here, can you please add anything to the checklists above that still needs to be done and remove the items that are no longer relevant (e.g., I saw you flag #1017 in #1122 as not relevant)?

To make sure I don't cause any extra churn, we can then have a quick sync to make sure sure we're on the same page. Sound good? Thanks for staying on this trail to its close.

@BigLep
Copy link
Contributor

BigLep commented Mar 17, 2022

@marten-seemann : I updated the issue description to include the issues that I believe are open and need to be closed before we call this done:

  1. discover relay v2s using AutoRelay #1351
  2. Add documentation about Project Flare (hole punching, Circuit Relay v2, NAT traveral) docs#110
  3. Basic project flare (hole punching) test  test-plans#21

I attempted to be clear in each issue about what's needed. Feel free to edit/expand.

#1017 was on the existing todo list. Do we need that or can it be removed?

@BigLep
Copy link
Contributor

BigLep commented Nov 7, 2022

@marten-seemann @p-shahi : I want to get this closed out. I know we have already agreed to defer the regression test. What is the priority of #1017 ? Should we complete that before marking this as done?

@p-shahi
Copy link
Member

p-shahi commented Nov 7, 2022

Looking at the issue, it seems the remaining work left is to document and add an example for UPnP.
If users are running into issues with hole punching and have requested docs/examples like this, then I say we treat this as high priority.
I'm not sure if that's the case however, so I suggest we close this issue and track 1017 as best effort

@p-shahi
Copy link
Member

p-shahi commented Nov 10, 2022

Moved #1017 to the Best Effort Track and marking this as complete

@p-shahi p-shahi closed this as completed Nov 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants