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

chore: deprecate remaining dht query command #9690

Closed
wants to merge 1 commit into from

Conversation

lidel
Copy link
Member

@lidel lidel commented Mar 2, 2023

We've already deprecated all other ipfs dht commands, let's do the same here so it is in "Deprecated" section at https://docs.ipfs.tech/reference/kubo/rpc/ and users are discouraged to build things that rely on it.

We can always un-deprecate it.

we've already deprecated all other `ipfs dht` commands,
let's do the same here so users dont think it is special
or maintained
@lidel lidel requested review from guseggert and Jorropo March 2, 2023 17:09
@aschmahmann
Copy link
Contributor

aschmahmann commented Mar 2, 2023

Why is this being deprecated when there are no alternatives (maybe you can kind of use one of the other commands incremental outputs but that seems kind of hacky)? Sure, it's a plumbing command users really shouldn't have to use but isn't that true of most of the DHT/routing commands?

@lidel
Copy link
Member Author

lidel commented Mar 2, 2023

We don't plan to remove it.

This PR is only about setting expectations, discouraging people from building things on ipfs dht APIs until we have time to clean them up. There is work remaining making ipfs routing and ipfs dht separate, and being able to runipfs routing against a specific router.

Having only this one in other place than the rest looks like a sore thumb:

2023-03-02-232109_193x82_scrot

In my mind this is similar to what we did with ipfs object: deprecating it but keeping it around until we have #4801 #4782, and/or betetr way to do basic patch (MFS is not a solution).

@aschmahmann
Copy link
Contributor

You can, although "query" is fairly specific to DHT implementation internals. It doesn't really mean anything if you use it on say IPNI.

@guseggert
Copy link
Contributor

This is a broader problem: we have generalized Kubo content routing but we still need implementation-specific tools such as "ipfs stats dht" (see #9482) and "ipfs dht query".

Broadly I see two paths: we can double down on this generalization, or simplify and remove the custom config stuff (give the ability to specify delegated routing endpoints, and that's it). In the latter case if users want something more sophisticated, they'd build their own binary from libipfs. We have a lot of work to do on the UX for that latter case, I don't think it's very good right now. But if we can cover the most common scenarios with a simplified config then that seems like a good path forward. If there's a long tail of custom scenarios users currently need, then I'd prefer the general approach because I don't want to pull the rug out from under them without a good path forward.

@guseggert
Copy link
Contributor

If we want to stick with the generalization, then, as a starting point for discussion, I propose that we:

  • Add the ability to poke at specific routers in the routing config
  • Move everything to use routing config
    • So that even in the default case, "custom" is used under the hood and the routers have names and can be poked at individually

"Poking at specific routers" might look something like this:

ipfs routing --router <name> findpeer <peerID>
ipfs routing --router <name> findprovs <key>
ipfs routing --router <name> get <key>
ipfs routing --router <name> provide <key>
ipfs routing --router <name> put <key> <value-file>

ipfs routing --router <name> closestpeers <peerID>  # equivalent to current "query" command

If you leave off --router <name> then it uses the top-level router from the config.

If a method isn't implemented then it results in an error, so that non-DHTs return an error for closestpeers. Delegated routing impls may not impl all methods either like "provide", which is fine, that also would return an error.

@guseggert
Copy link
Contributor

I don't think it makes sense to leave this sitting here since it's going to require a bunch of other work beforehand, we can't just turn this off. So I have opened this issue, we can track progress there: #9730

@guseggert guseggert closed this Mar 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants