Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
IPIP-337: Delegated Content Routing HTTP API #337
IPIP-337: Delegated Content Routing HTTP API #337
Changes from 27 commits
1d9ec9c
65d178b
4c024dd
0acdb01
f7b4437
13d695c
e3e744a
451b1e9
27d23e8
a9984a9
fce070f
fff68c3
11f4ca5
39c467e
87ff0ac
96d55d0
4264a2d
0f49dcf
7238e63
e823d9e
19fff93
1aac44c
acc397b
325ca1e
9c47a31
512bc05
655b1f2
d343189
573417e
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do we do for "unidentified libp2p protocol, maybe" which is what we get from the DHT? The DHT returns a set of peerIDs (and sometimes addresses) for a given peer but does not guarantee anything about the data transfer protocol supported (if any).
Note: that provider records are used for IPNS-over-PubSub. So a protocol name could be invented for that, but in any event provider records are in use today for more than just Bitswap anyway so defining "Bitswap" as "some libp2p protocol" doesn't seem like a particularly good idea.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Continued in #377
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How does the use of Schema interact with systems like IPNI supporting arbitrary user protocols without requiring PRs and spec changes to IPNI and deployments like cid.contact?
For example, IMO it's reasonable that IPNI nodes should be able to have some code that looks roughly like:
Is there some generic schema label that's supposed to be used for opaque blobs?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Continued in #377
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just want to flag that
transfer
parameter is a hardcoded list of pre-vetted strings, which is making future changes extremely difficult:Feels like gatekeeping system which makes it impossible to experiment with novel transfer protocols.
Last year I suggested to not invent own strings, avoid transport protocol codes from
table.csv
.Since
transfer
is not implemented yet, I suggest removing it, or adding escape hatch for third-party protocols not specified in this document.If we want to keep it, need to ensure we are not gatekeeping:
Option A
Ensure clients can talk the same version of bitswap by reusing strings from libp2p identify's protocols list:
We could update spec and say that every value that starts with
/
should be interpreted as libp2p protocol prefix:transfer=/ipfs/bitswap
would return all peers that speak any version of bitswap.Option B
Alternative, is to just accept number, and allow people to use codes from reserved private range
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IMO using the numbers from the global table feels pretty bad for experimentation as well. The existing IPNI implementation doesn't support them and they require some gatekeeping anyway. For the time being I've put up ipni/specs#6.
It seems like we could reasonably integrate this with something like the
/
proposal.Unfortunately, this type of query isn't supported in IPNI today and if it did it'd probably be with some specific semantics (e.g. adding a field to the "BitswapMetadata" section that's a list of protocolIDs) or a similar thing for GraphSync, unless they're going to reserve a new number every time they modify the protocol).
If we started leveraging named-record in addition to (or instead of) numbers in the global table we could just query against those. Basically, this would mean that the query could be fulfilled using custom logic per-number, or just using the
named-record
wrapper.Since the general policy is not to merge specs without implementations we should remove and then re-add later with the implementation, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IPNI imposes no restriction on the protocol ID in metadata; this can be any number and treated as arbitrary bytes by the indexers.
Happy to capture an issue on this if this is needed?
It'd probably be varint prefix matching.
i'm sorry i am struggling to see how using names instead of numbers would make a difference in this case. Surely we can do the same with numbers?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the consensus is to remove this, but the idea was that these are treated by this spec as opaque strings used for filtering, and the servers have no requirement to enforce any particular values (unless they want/need to). But happy to have this conversation another day, since we never implemented this anyway.