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

Support publishing self-records in LAN DHT even when WAN DHT is available. #7168

Open
Tracked by #10000
makew0rld opened this issue Apr 15, 2020 · 7 comments
Open
Tracked by #10000
Labels
kind/feature A new feature

Comments

@makew0rld
Copy link
Contributor

makew0rld commented Apr 15, 2020

As I mentioned in #7109, I am part of @tomeshnet, and we use IPFS on our experimental mesh network nodes. There are some new changes in the upcoming v0.5.0 release that will affect us, that I discussed with @Stebalien and @willscott in that issue, eventually leading me to create this feature request.

The only question I have now is whether there's a way to disable the setting that means nodes "will only publish records (provider and IPNS) to the WAN DHT". In a situation where a node is connected to the Internet and CJDNS, for example, we'd want them to still be publishing records to the LAN (CJDNS).
Or more specifically, we'd want them to publish any of their own records to the LAN, but not WAN records that a CJDNS-only node couldn't access.
-- me

@Stebalien informed me this is not possible, and so I'm asking if this can happen, through a config option, as well dynamically through an ipfs command.

To be clear, when this option is enabled on a node, then anytime a node is publishing records on the WAN DHT for blocks/IPNS addresses that it has, it should also publish those records on the LAN DHT. It should not publish records that point to WAN nodes.

The endgoal of this is that if you have node A that is connected to the Internet and a private mesh network like CJDNS, and A adds a file to IPFS, then B which is only connected through CJDNS, should be able to retrieve the file, because A published the record for the file on the LAN DHT that B was a part of.

@makew0rld
Copy link
Contributor Author

@Stebalien @willscott Do you think this could happen?

@willscott
Copy link
Contributor

The main question in my head is if there's a good heuristic (e.g. number of lan peers, diversity of address space they're in, or something else) that should prompt that behavior to happen automatically.

Expect the behavior here to change again fairly soon with regards to libp2p/go-libp2p-kad-dht#616 - There's certainly a few needs to do better than the current implementation with dealing with the reality of multiple active DHTs.

@makew0rld
Copy link
Contributor Author

Even if there is, I think it still makes sense to have this able as a config and command line option, so the user can decide as well.

@darkdrgn2k
Copy link

I will say that to some degree its a moot point too.

One issue with LAN ONLY based IPFS network is you may not be able to reach a BOOT STRAP node to start peering.

Although we have an out of band mechanism @tomeshnet to find neighboring nodes it only works if the out of band script is installed on every IPFS node on the LAN since it must reveal the node's ID to establish a peer.

I'm not sure if mDNS was ever fixed/working but unless it is or another mechanism is put in place a LAN ONLY IPFS network in the would be a non starter.

@makew0rld
Copy link
Contributor Author

In this case, LAN = not public Internet. It doesn't just mean link-local. For IPFS, all of CJDNS and Yggdrasil are considered "LAN", I've confirmed this with the developers in other threads.

@darkdrgn2k
Copy link

darkdrgn2k commented Apr 29, 2020

I don't know if this is the same in IPFS but with GIA the Yggdrasil's "client" network (200::/8) is not considered LAN. (this causes other problems)

If you cannot reach an IPFS bootstrap node, or don't have the IP/ID of one to peer with or boot strap yourself (ie tomesh stack for CJDNS where we added one) then a LAN node wont peer and therefore not need DHT.

@makew0rld
Copy link
Contributor Author

Yggdrasil is considered LAN in IPFS, see this issue.

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

No branches or pull requests

3 participants