-
Notifications
You must be signed in to change notification settings - Fork 159
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
Change default discovery configuration of iroh-net endpoint #2753
Comments
One reason for not wanting discovery publish and resolve enabled by default: when I write short iroh apps, I almost constantly have a client/server responsibility spilt. See sendme, dumbpipe, the workshop examples, and this new thing I wrote yesterday. You have short-lived ephemeral "client" nodes that do not ever need to be resolved, and long lived "server" role nodes that do need to be resolved, but rarely need to do any resolutions themselves. Having the ability to resolve things enabled when unused is no big deal, but having publishing enabled for ephemeral nodes that do not need it is a bit of a waste: it spams our dns server and/or the DHT with resolution info that is never going to be used. |
The strongest objection seems to be against enabling local-swarm-discovery by default because this broadcasts your NodeId on every network you happen to be on. The DNS discovery on the other hand is not that much different from using the relays: it normally only publishes the NodeId together with the RelayUrl and not much more. (Note that the |
@matheus23 s privacy objection regarding local-swarm-discovery is very valid. My objection regarding short-lived nodes is more that I don't want our poor dns server to store millions of completely useless mappings for short-lived ephemeral nodes, and I don't want the iroh-net endpoint to do http requests that are never going to be needed. Having a single line in the builder to enable full publish/resolve discovery does not seem to much of an ask, especially since in 100% of all iroh-net based things I have written so far I never needed full discovery. E.g. here is the thing I wrote yesterday. Client that does not need to publish https://github.com/rklaehn/frosty/blob/master/src/main.rs#L319 |
Here is a possible solution: #2775 |
Related to the discussion we had on discord:
https://discord.com/channels/949724860232392765/960896793195974708/1289232008979157115
When you create an iroh-net endpoint and want to be able to dial by raw node ids or by short tickets, you usually want to enable some kind of discovery. Enabling full discovery is pretty verbose and confusing. See below
So possible options would be:
A) have discovery publish and resolve enabled by default, but provide a way to disable/manually configure it
B) have a builder helper method to enable discovery publish and subscribe that does not have as much ceremony as above. In addition have builder methods to enable just publish and just resolve
C) leave things as is but document things better
The text was updated successfully, but these errors were encountered: