-
-
Notifications
You must be signed in to change notification settings - Fork 3k
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: update the dht to fix yggdrasil #7186
Conversation
Specifically: 1. Don't add peers with IPv6 addresses outside the 2000::/3 range to the WAN DHT. These peers are not on the public internet. 2. Do add these peers to the LAN DHT. Really, that's the "catch all other" DHT.
d019270
to
144306f
Compare
@willscott could you investigate this? The error looks real. |
the gotest failure makes sense - the wan-lan integration test is using WAN IPs in |
Let's do that. |
wan-lan DHT fix pushed. may need to also track down the failure in go-ipfs-http-client
|
I believe we need a sleep. I think this is happening because we're waiting until identify to add peers to our routing table. |
The http-client test is unfortunately over in https://github.com/ipfs/interface-go-ipfs-core/blob/master/tests/dht.go |
Which has a breaking change, which is why I haven't updated it :(. |
3d9ef49
to
68372ba
Compare
Apparently, the test change still wasn't enough. I wonder if we need to sleep before adding/providing as well. |
But I'm going to merge this for now. |
This may need to revert as the HTTP API DHT test is failing since it went in. I added |
This was already a problem before this patch so I agree. The node putting the record could be using the WAN DHT while the other node is using the LAN DHT? Could you keep looking into this? |
I tested against a modified ipfs binary where the dual code was modified to:
I'm suspecting either that the peers are not connected at the point that the DHT is getting exercised (and/or that the The call to Looking at the Swarm().Peers of the nodes, they are swarm connected, and the lan protocol DHT is visible between them. |
It looks that like the error case in The DualDHT probably should play some ctx games to intercept these events as another side effect of the queries. Opening an issue in kad-dht to track |
Specifically: