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

Add a transport code to indicate content is provided via Trustless HTTP Gateway #321

Merged
merged 4 commits into from
Apr 18, 2023

Conversation

willscott
Copy link
Contributor

per the trustless gateway spec

The exact semantics of this spec are evolving, but might as well reserve a code that we can use for indicating the existence of an HTTP endpoint for index providers.

@willscott willscott requested review from masih and rvagg March 30, 2023 14:50
table.csv Outdated
@@ -143,6 +143,7 @@ car-index-sorted, serialization, 0x0400, draft, CARv2
car-multihash-index-sorted, serialization, 0x0401, draft, CARv2 MultihashIndexSorted index format
transport-bitswap, transport, 0x0900, draft, Bitswap datatransfer
transport-graphsync-filecoinv1, transport, 0x0910, draft, Filecoin graphsync datatransfer
transport-gateway-trustless, transport, 0x0920, draft, HTTP car datatransfer
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With "gateway" in the name, am i right to assume this is for car transfer over IPFS HTTP gateway?
If so, would it make sense to include ipfs in the name?

Suggested change
transport-gateway-trustless, transport, 0x0920, draft, HTTP car datatransfer
transport-ipfs-gateway-trustless, transport, 0x0920, draft, HTTP IPFS Gateway CAR datatransfer

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, if we view this namespace as having a very broad audience, making the assumption that "gateway" bears the singular meaning we think it does isn't appropriate
+1

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why would you restrict this to CAR?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@masih - i would be okay including ipfs here if there aren't objections

@rvagg - some more specific features could be passed in metadata about the transport - in the same way we specify characteristics for graphsync we could potentially allow advertisements of http support further specify what subset of the gateway specification is supported. That said, I'd hope that as we get to a single definition from https://specs.ipfs.tech/http-gateways/path-gateway/#ref-trustless-gateway we might be able to converge to an expected set of semantics for what is expected from an http transport.

@aschmahmann - do you mean versus also including single blocks, or versus also including unverifiable responses?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do you mean versus also including single blocks, or versus also including unverifiable responses?

I meant single blocks

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note: I would prefer knowing what this thing actually is before we merge it as it seems like there are a bunch of unknowns as to what this actually means/how it will be used and the point of the shared table is to enable interoperability (if it wasn't then people could just have system-specific enums and call it a day).

If the desire of the crowd here is to merge this PR before there are any definitions I'd like to request that the entry be removed from the table should it arise that this entry turns out to be abandoned or there is no definition of it in X (maybe 3 or as high as 6?) months.

No we haven't held other entries to this bar (especially the really old ones), but it'd be nice if we could do better going forward here and it doesn't seem like a huge ask that more than the people involved in this PR would be able to figure out what is meant by a the code being added to the table.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can change the comment to
HTTP IPFS Gateway trustless datatransfer
is there other wording at this stage you would propose / prefer?

I'm happy to re-visit in 3-6 months to
(a) remove if we aren't using it
(b) revising wording to reflect / point to the specification we've ended up with

@rvagg
Copy link
Member

rvagg commented Mar 31, 2023

how will this code end up getting used in the network chatter?

@willscott
Copy link
Contributor Author

how will this code end up getting used in the network chatter?

my expectation is that this will be used in the same context as transport-bitswap and transport-filecoin-graphsync-v1 - it will be a code understood in context routing contexts to indicate that this publisher can provide data over http.

@rvagg
Copy link
Member

rvagg commented Apr 6, 2023

The only remaining hold-up here is the use of "gateway" unadorned, since that has a specific meaning for us but not all audiences of this table, ipfs-gateway would seem to be the appropriate way to solve that. Other than that it's good to go I think. I don't know about the comments about "CAR" but since that's in the description, it can be easily changed later if necessary.

@hannahhoward
Copy link

I'd support adding IPFS -- @willscott ?

@willscott willscott requested a review from vmx as a code owner April 6, 2023 13:22
@willscott
Copy link
Contributor Author

updated name to be less ambiguous

@willscott
Copy link
Contributor Author

I've updated the comment per @aschmahmann 's request. @rvagg i don't think we're waiting for anything else here and I believe you're the one with relevant approval powers

@rvagg rvagg merged commit 582f6a8 into master Apr 18, 2023
@rvagg rvagg deleted the feat/transport-gateway-trustless branch April 18, 2023 01:40
willscott added a commit to multiformats/go-multicodec that referenced this pull request Apr 19, 2023
lidel

This comment was marked as duplicate.

@@ -143,6 +143,7 @@ car-index-sorted, serialization, 0x0400, draft, CARv
car-multihash-index-sorted, serialization, 0x0401, draft, CARv2 MultihashIndexSorted index format
transport-bitswap, transport, 0x0900, draft, Bitswap datatransfer
transport-graphsync-filecoinv1, transport, 0x0910, draft, Filecoin graphsync datatransfer
transport-ipfs-gateway-http, transport, 0x0920, draft, HTTP IPFS Gateway trustless datatransfer
Copy link
Member

@lidel lidel Apr 19, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💭 This terribly long string will most likely be sent with every IPNI roundtrip, which is not the best,

Due to the way IPNI implemented /routing/v1 API, we use string that can change at atny time, and not the number: ipfs/specs#377

I'd be strongly recommending moving to number instead of string. We've seen strings in this table change multiple times in the past ( /ipfs//p2p, then /ipns-ns/ipns etc) -- cc @masih @willscott to be aware of how brittle this string is

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ℹ️ the cid.contact find response https://github.com/ipni/specs/blob/main/schemas/v1/openapi.yaml#L120 does use compact number versions

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IPNI metadata always uses the varint numerical value.

Copy link
Member

@lidel lidel Apr 21, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sgtm, I've opened ipfs/specs#403 for explicitly supporting hex codes on /routing/v1, and using strings only for "ossified" things.

@lidel
Copy link
Member

lidel commented Apr 19, 2023

Another comment is that trustless gateway basic primitive is a block, not a CAR. CAR is only means of sending more than a single block - important distinction, because there is no trustless gateway without application/vnd.ipld.raw

@lidel lidel changed the title Add a transport code to indicate content is provided via car Add a transport code to indicate content is provided via Trustkless HTTP Gateway Apr 19, 2023
@lidel lidel changed the title Add a transport code to indicate content is provided via Trustkless HTTP Gateway Add a transport code to indicate content is provided via Truthless HTTP Gateway Apr 19, 2023
@lidel lidel changed the title Add a transport code to indicate content is provided via Truthless HTTP Gateway Add a transport code to indicate content is provided via Trustless HTTP Gateway Apr 21, 2023
masih added a commit to ipni/go-libipni that referenced this pull request Apr 24, 2023
Add SDK to aid parsing IPNI metadata that represents IPFS Gateway HTTP
transport protocol.

Relates to:
 - multiformats/multicodec#321

Fixes #21
masih added a commit to ipni/go-libipni that referenced this pull request Apr 24, 2023
Add SDK to aid parsing IPNI metadata that represents IPFS Gateway HTTP
transport protocol.

Relates to:
 - multiformats/multicodec#321

Fixes #21
masih added a commit to ipni/go-libipni that referenced this pull request Apr 25, 2023
Add SDK to aid parsing IPNI metadata that represents IPFS Gateway HTTP
transport protocol.

Relates to:
 - multiformats/multicodec#321

Fixes #21
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 this pull request may close these issues.

6 participants