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

Switch unknown providers at /routing/v1/providers to peer schema #147

Closed
lidel opened this issue Aug 25, 2023 · 4 comments · Fixed by #148
Closed

Switch unknown providers at /routing/v1/providers to peer schema #147

lidel opened this issue Aug 25, 2023 · 4 comments · Fixed by #148

Comments

@lidel
Copy link

lidel commented Aug 25, 2023

Currently, cid.contact returns all HTTP nft.storage announcements like this (example):

{
  "Protocol":"unknown",
  "Schema":"unknown",
  "ID":"QmUA9D3H7HeCYsirB3KmPSvZh3dNXMZas6Lwgr4fv1HTTp",
  "Addrs":["/dns4/dag.w3s.link/tcp/443/https"]
}

The problem is that results with "Schema":"unknown" are being ignored by boxo client (conformed in ipfs/boxo#422 (comment)), and we would like Kubo and other users of boxo client library to access ID and Addrs information present there (+ setting standard for doing the same in JS in Helia).

@masih would it be possible to change to Schema: "peer" (from IPIP-417) for these /routing/v1/providers responses?

All we need is:

{
- "Protocol":"unknown",
- "Schema":"unknown",
+ "Schema":"peer",
  "ID":"QmUA9D3H7HeCYsirB3KmPSvZh3dNXMZas6Lwgr4fv1HTTp",
  "Addrs":["/dns4/dag.w3s.link/tcp/443/https"]
}
@masih
Copy link
Member

masih commented Aug 25, 2023

Of course 👍 OK to action this next week?

@lidel
Copy link
Author

lidel commented Aug 25, 2023

@masih yes, any time in next 2 weeks will be 👍

gammazero added a commit that referenced this issue Aug 26, 2023
The /routing/v1/providers/ endpoint now reports unknown schema as "peer", and omits the Protocol.

Testing was manual testing using example in issue.

Fixes #147
@masih
Copy link
Member

masih commented Aug 28, 2023

@lidel Question: is there anything to coordinate on in terms of breaking changes? Cc @gammazero

@lidel
Copy link
Author

lidel commented Aug 31, 2023

@masih no, afaik the change is that Kubo 0.22 is ignoring unknown results, and Kubo 0.23 will start supporting peer results.

Switching from unknown to peer will enable Kubo to see them and act on them.
This is prerequisite for future Kubo to be able to do HTTP retrieval when /https multiaddr is present (which will reduce costs for groups like dotStorage).

gammazero added a commit that referenced this issue Jan 18, 2024
The /routing/v1/providers/ endpoint now reports unknown schema as "peer", and omits the Protocol.

Testing was manual testing using example in issue.

Fixes #147
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants