-
Notifications
You must be signed in to change notification settings - Fork 0
feat: switch config to orient routing around the routing system names #1
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -1,34 +1,28 @@ | ||||||||||||||||||||||
| { | ||||||||||||||||||||||
| "AutoConfigVersion": 2025072301, | ||||||||||||||||||||||
| "AutoConfigSchema": 3, | ||||||||||||||||||||||
| "Bootstrap": [ | ||||||||||||||||||||||
| "/dnsaddr/bootstrap.libp2p.io/p2p/QmNnooDu7bfjPFoTZYxMNLWUQJyrVwtbZg5gBMjTezGAJN", | ||||||||||||||||||||||
| "/dnsaddr/bootstrap.libp2p.io/p2p/QmQCU2EcMqAqQPR2i9bChDtGNJchTbq5TbXJJ16u19uLTa", | ||||||||||||||||||||||
| "/dnsaddr/bootstrap.libp2p.io/p2p/QmbLHAnMoJPWSCR5Zhtx6BHJX9KiKNN6tpvbUcqanj75Nb", | ||||||||||||||||||||||
| "/dnsaddr/bootstrap.libp2p.io/p2p/QmcZf59bWwK5XFi76CZX8cbJ4BhTzzA3gU1ZjYZcYW3dwt", | ||||||||||||||||||||||
| "/dnsaddr/va1.bootstrap.libp2p.io/p2p/12D3KooWKnDdG3iXw9eTFijk3EWSunZcFi54Zka4wmtqtt6rPxc8", | ||||||||||||||||||||||
| "/ip4/104.131.131.82/tcp/4001/p2p/QmaCpDMGvV2BGHeYERUEnRQAwe3N8SzbUtfsmvsqQLuvuJ", | ||||||||||||||||||||||
| "/ip4/104.131.131.82/udp/4001/quic-v1/p2p/QmaCpDMGvV2BGHeYERUEnRQAwe3N8SzbUtfsmvsqQLuvuJ" | ||||||||||||||||||||||
| ], | ||||||||||||||||||||||
| "AutoConfigVersion": 2025072401, | ||||||||||||||||||||||
| "AutoConfigSchema": 4, | ||||||||||||||||||||||
aschmahmann marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||||||||||||||
| "DNSResolvers": { | ||||||||||||||||||||||
| "eth.": [ | ||||||||||||||||||||||
| "https://dns.eth.limo/dns-query", | ||||||||||||||||||||||
| "https://dns.eth.link/dns-query" | ||||||||||||||||||||||
| ] | ||||||||||||||||||||||
| }, | ||||||||||||||||||||||
| "DelegatedRouters": { | ||||||||||||||||||||||
| "mainnet-for-nodes-with-dht": [ | ||||||||||||||||||||||
| "https://cid.contact/routing/v1/providers" | ||||||||||||||||||||||
| ], | ||||||||||||||||||||||
| "mainnet-for-nodes-without-dht": [ | ||||||||||||||||||||||
| "https://delegated-ipfs.dev/routing/v1/providers", | ||||||||||||||||||||||
| "https://delegated-ipfs.dev/routing/v1/peers", | ||||||||||||||||||||||
| "https://delegated-ipfs.dev/routing/v1/ipns" | ||||||||||||||||||||||
| ] | ||||||||||||||||||||||
| }, | ||||||||||||||||||||||
| "DelegatedPublishers": { | ||||||||||||||||||||||
| "mainnet-for-ipns-publishers-with-http": [ | ||||||||||||||||||||||
| "https://delegated-ipfs.dev/routing/v1/ipns" | ||||||||||||||||||||||
| ] | ||||||||||||||||||||||
| "Routing" : { | ||||||||||||||||||||||
| "Systems" : [ "AminoDHT", "IPNI"], | ||||||||||||||||||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The concept of these long tags like "mainnet-for-nodes-with/out-dht" or "mainnet-for-ipns-publishers-with-http" seems both overly verbose and not extensible in ways that just don't have to be the case. What happens if some system (e.g. IPNI) is something you could interact with directly or via delegated routing, what does the implementation do? It seems like we'd have to bump config versions and code in ways that seem unnecessary. This approach basically let's clients say: Do I have an <AminoDHT / IPNI / ...> implementation already? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Agree on names of "profiles": can be adjusted, they are verbose to make initial discussion easier. But the framing of "profiles" around swarm type, like "Mainnet-for-X", and not specific routing system like "AminoDHT" or "IPNI" is intentional. Imo this is how people think about their nodes: members of specific swarm, or specific subset of swarm, and not chery-picking specific routing system by hand. After some prototyping I've formulated an opinion that forcing end users to pick routing system by hand defeats the purpose of AutoConfig. We need higher level profiles that reflect real world needs (Kubo daemon vs inbrowser.link), and minimize the choices consumers of People who want to make low level choices will not use AutoConfig.
We have such system. It is DHT. And we have two profiles to reflect the difference in how Kubo vs inbrowser.link access it. Isn't the intention of AutoConfig to be practical, and it is more likely we will need to add more delegated routing endpoints than deal with a hypothetical new routing system that is DHT-like and that can be talked to in two ways?
Let me flip the question: what if a new routing system No client will start using Kubo and other clients will need update their code to look for entries with So what did AutoConfig archieve? We end up in the same state as today, where adding new endpoint to defaults requires a new Kubo release. I think my position boils down to "naming routing systems == bad" and "we need to agree on names of profiles instead, profiles that have There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
I think you've misunderstood my proposal with the system names. Say you have a kubo node and get a list of 3 systems From another comment of yours:
The systems are grouped here. Every system listed is a system clients consuming (this) autoconfig should be using, whether directly or via a delegated router.
Per the above it will get auto-added (just swap
Right, and if there was a second system (e.g.
I'd hope that if we ever end up in a position where there's an additional routing system that it can be talked to beyond relying on a (specific / authorized) proxy. I think I understand how what you thought this proposal was was overkill. However, I don't see how moving from an unbounded number of profile names for implementers to know about to a list of system names that implementers don't need to understand if they don't want to makes this harder / more complicated. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thank you for clearing up my misconceptions. I agree if we frame config around systems, it will be easier for clients to decide which ones to delegate, and also we no longer need to have overly prescriptive profiles. @aschmahmann take a look at my attempt to remove need for profiles (they become more like a hint), but also remove need for inventing capabilities (keeping URL paths as indicator of that is supported): |
||||||||||||||||||||||
| "DelegatedRouters" : { | ||||||||||||||||||||||
| "https://cid.contact" : ["IPNI"], | ||||||||||||||||||||||
| "https://delegated-ipfs.dev" : ["AminoDHT", "IPNI"] | ||||||||||||||||||||||
|
Comment on lines
+13
to
+14
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I get the idea of disambiguating which functions we're planning to use on a given endpoint by just interpreting /v1/peers as peers vs the kubo config find-peers tag, although that ends up then introducing a separate DelegatedPublishers because of the HTTP PUT vs GET. Is this really better than get-ipns vs put-ipns though? In this example, I've removed the tags entirely to discuss. The downside is that one of the following would happen:
While I'd like 3 to be real, I agree that these are all not great outcomes and we'd probably be better off having some more data in the config. How about:
Suggested change
We could disambiguate on end-point but it seems like we'd lose the System tags and still end up needing something special (e.g. also adding delegated publishers). This is a little more verbose, but feedback definitely welcome There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. IMO separating reads from writes, and then using original URLs with paths is better than inventing another complex JSON representation. I tried the approach you suggest here, but it felt virtually same complexity as
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Clarified in the
I don't have a strong opinion on if we swap the words and decide to have two lean into effectively HTTP GET vs PUT. If you don't like You could reorganize them differently (e.g. a list of URLs), but I can see that if that's more complicated or not depends on resolving the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thx, see a variant in |
||||||||||||||||||||||
| }, | ||||||||||||||||||||||
| "AminoDHT" : { | ||||||||||||||||||||||
| "Boostrap" : [ | ||||||||||||||||||||||
|
Comment on lines
+16
to
+17
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The Bootstrap nodes are really only intended as Bootstrap nodes for the Amino DHT, I'm not sure we have much evidence around non-Amino DHT usage. I recall there was a CJDNS variant of the Amino DHT that's classified by kubo as a "LAN" DHT, but I don't know if it's in use anymore or if it's a distinction worth making. We could've also left the Bootstrappers top level and called them DHTBootstrappers or AminoDHTBootstrappers, but I figured leaving space for per-system configuration seemed reasonable. As for how someone might handle configuring say kubo with a CJDNS DHT using an AutoConfig endpoint:
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Semantics, but we probably want to avoid "Amino" name in contexts of DHT other than Mainnet WAN one. If Amino DHT is an instance of IPFS Kademlia DHT used by the IPFS Mainnet (ipfs/specs#497):
..then every private swarm is "non-Amino DHT usage" (an instance of IPFS Kademlia DHT). I would keep this field as There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
I agree, but am confused where you think we're disagreeing. The specific system here in the ipfs-mainnet config is for Amino though. Similarly, all of your suggested profile names had the word "mainnet...dht" in there which is just Amino, right? We could certainly talk about a generic libp2p-dht type to let people use this to configure custom DHTs (e.g. Amino + a CJDNS variety), but your example didn't have that and it seems easy enough to describe at the config layer by just adding a type.
Interesting.... maybe a "please connect to me, but no reason why is given" field is useful. People have certainly abused it in kubo for all sorts of things. My inclination is that when possible it's much better to know why you're making a connection. For example, when people have abused this for Bitswap (and hypothetically for Relays the story is similar) it tends to blow up in their faces because the connection will get closed at some point and then never reopen. This led to the separate "Peering" config in kubo which similarly is a pretty low level approach that's reliant on implementation details to the point that when we reduced Bitswap broadcast we had to leave a mechanism to explicitly broadcast to Peered peers. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I've been thinking about it, and if we have PoC in: |
||||||||||||||||||||||
| "/dnsaddr/bootstrap.libp2p.io/p2p/QmNnooDu7bfjPFoTZYxMNLWUQJyrVwtbZg5gBMjTezGAJN", | ||||||||||||||||||||||
| "/dnsaddr/bootstrap.libp2p.io/p2p/QmQCU2EcMqAqQPR2i9bChDtGNJchTbq5TbXJJ16u19uLTa", | ||||||||||||||||||||||
| "/dnsaddr/bootstrap.libp2p.io/p2p/QmbLHAnMoJPWSCR5Zhtx6BHJX9KiKNN6tpvbUcqanj75Nb", | ||||||||||||||||||||||
| "/dnsaddr/bootstrap.libp2p.io/p2p/QmcZf59bWwK5XFi76CZX8cbJ4BhTzzA3gU1ZjYZcYW3dwt", | ||||||||||||||||||||||
| "/dnsaddr/va1.bootstrap.libp2p.io/p2p/12D3KooWKnDdG3iXw9eTFijk3EWSunZcFi54Zka4wmtqtt6rPxc8", | ||||||||||||||||||||||
| "/ip4/104.131.131.82/tcp/4001/p2p/QmaCpDMGvV2BGHeYERUEnRQAwe3N8SzbUtfsmvsqQLuvuJ", | ||||||||||||||||||||||
| "/ip4/104.131.131.82/udp/4001/quic-v1/p2p/QmaCpDMGvV2BGHeYERUEnRQAwe3N8SzbUtfsmvsqQLuvuJ" | ||||||||||||||||||||||
| ] | ||||||||||||||||||||||
| } | ||||||||||||||||||||||
| } | ||||||||||||||||||||||
| } | ||||||||||||||||||||||
Uh oh!
There was an error while loading. Please reload this page.