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
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions table.csv
Original file line number Diff line number Diff line change
Expand Up @@ -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.

multidid, multiformat, 0x0d1d, draft, Compact encoding for Decentralized Identifers
sha2-256-trunc254-padded, multihash, 0x1012, permanent, SHA2-256 with the two most significant bits from the last byte zeroed (as via a mask with 0b00111111) - used for proving trees as in Filecoin
sha2-224, multihash, 0x1013, permanent, aka SHA-224; as specified by FIPS 180-4.
Expand Down