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

Reliable AutoNat #777

Open
1 task
jacobheun opened this issue Jan 24, 2020 · 2 comments
Open
1 task

Reliable AutoNat #777

jacobheun opened this issue Jan 24, 2020 · 2 comments
Assignees
Labels
Epic kind/enhancement A net-new feature or improvement to an existing feature
Milestone

Comments

@jacobheun
Copy link
Contributor

jacobheun commented Jan 24, 2020

Design notes

The AutoNAT service was written before libp2p had an event system and hasn't seen much love since. If we're going to rely on AutoNAT to reliably detect NATed nodes, we'll need to shore it up a bit:

  • Instead of waiting timeouts, we should re-test when our addresses change. Re-check our NAT status when addresses change go-libp2p-autonat#34
  • Address all the issues in libp2p/go-libp2p-autonat.
  • Turn on a rate-limited AutoNAT service on all (DHT?) nodes by default. This is especially important for when we start persisting the routing table to disk and bootstrapping off that persisted routing table: we're unlikely to randomly run into an AutoNAT service node.
  • We should try to advertise fewer junk addresses, either by confirming our addresses with AutoNAT or some other means.

Testing mechanics

This will likely involve quite a bit of manual testing and testing on real NATs.

Success Criteria

  • AutoNAT is fast. That is, I can tell if I'm behind a nat within seconds of starting.
  • AutoNAT can't be used as a mild DoS service (can't be tricked into connecting to other IP addresses).
  • We can comfortably enable AutoNAT on all DHT servers without worrying about overloading them.
  • AutoNAT can reliably determine that a node is dialable (i.e., reduce false positive NATs).

TODO:

@jacobheun jacobheun added the kind/enhancement A net-new feature or improvement to an existing feature label Jan 24, 2020
@jacobheun jacobheun added this to the Working Kademlia milestone Jan 24, 2020
@jacobheun jacobheun added the Epic label Jan 24, 2020
@willscott
Copy link
Contributor

first wave of functional changes have landed in libp2p/go-libp2p-autonat#41 and libp2p/go-libp2p-autonat-svc#45

Next up is a refactor to make the interface to autonat a bit cleaner, and then cutting a release of that package.

@willscott
Copy link
Contributor

Refactor of the interface and faster responsiveness has landed in libp2p/go-libp2p-autonat#65 / v0.2.3.

Remaining work is primarily around minimizing 'bad addresses', and getting the autonat logic in sync with the ObservedAddressManager. That's tracked in #900

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Epic kind/enhancement A net-new feature or improvement to an existing feature
Projects
None yet
Development

No branches or pull requests

2 participants