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

feat: introduce the dual WAN/LAN DHT #7127

Merged
merged 5 commits into from Apr 14, 2020
Merged

feat: introduce the dual WAN/LAN DHT #7127

merged 5 commits into from Apr 14, 2020

Conversation

Stebalien
Copy link
Member

@Stebalien Stebalien commented Apr 9, 2020

And only join the WAN DHT if we're publicly reachable.

TODO:

  • Enable AutoNATService by default on all DHT nodes?
  • Add more tests.

Otherwise, we'd need to wait a delay on start for nodes to start becoming
servers.
@Stebalien
Copy link
Member Author

Testing Plan:

  1. Make a network of 50 nodes with loopback addresses, and a network of 50 nodes with WAN addresses.
  2. Add one node to both network.
  3. Verify that the node on both networks can find a peer they're not already connected two on both networks.

The test should use the "mock" network and should live in the "integration" test folder. We can model it after https://github.com/ipfs/go-ipfs/blob/5ecf44a88217f46472aa535a54153edc2e2bede6/test/integration/three_legged_cat_test.go#L67-L150.

Gotchas:

  • The mocknet doesn't make any effort to pick the right source/target IP when creating a fake connection. That should be fine in this case as long as only the test node lives on both networks. All other nodes only live on one or the other.

@willscott think you could pick this up?

@willscott
Copy link
Contributor

integration test to merge into this branch in #7151

Then improve the tests such that they actually work.
@Stebalien
Copy link
Member Author

I'm going to merge this for now given that we now have a test PR and we're not going to ship a release without this.

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.

None yet

2 participants