-
-
Notifications
You must be signed in to change notification settings - Fork 3k
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
IPNS: should work with case-insensitive identifiers (Base32) #5287
Comments
I think we'll have to wait for ed25519 IPNS keys, or do the same hackery as with CIDs. |
ed25519 IPNS keys are here. However, that doesn't help. We'll have to do the same CID hackery (or just switch to using CIDs). |
Missed the fact IPNS does not work in case-insensitive contexts right now. More: ipfs/kubo#5287
Let's switch to CIDs? @kyledrake this issue should potentially be part of the base32 task force |
Related discussion about PeerID in libp2p continues in libp2p/specs#138 |
I believe the MVP here is a scenario where:
@Stebalien What would be the smallest set of changes to support this type of interop in go-ipfs? |
That is, we'd use an entirely new multicodec.
That depends on how deeply we want to integrate this. If we only care about this for the subdomain feature, it would be pretty easy to redirect |
There is an ongoing work to get IPNS fast (notes from today's meeting: ipfs/team-mgmt#948). iiuc this means the immediate needs are:
|
I see a small UX problem around having a dedicated multicodec:
This issue will mostly go away when we switch to displaying PeerID in CIDv1 everywhere, but for now we need to account for the above edge case. @Stebalien Thoughts? |
Please consider using Tor rend spec v3 address encoding for PeerIDs |
@Zolmeister thank you for sharing. This issue is only about adding support for wrapping existing PeerIDs in CIDv1 to unlock web uses without huge refactoring (it does not change underlying way we construct PeerID). Discussion in libp2p/specs#139 is not blocked by this, feel free to continue it there 👍 |
Back to the issue at hand:
|
I've been looking at things we want to ship this in time for IPFS Camp.
@Stebalien will this be enough for HTTP Gateway support |
Sorry, completely missed this conversation. That's a valid concern and we may want to add a "hack it" redirect for now, or maybe a warning?
Bit late but the latest status is libp2p/go-libp2p-core#41 |
I am thinking the least amount of work/friction will be to
The issue will go away when we switch to CIDv1B32 everywhere, |
Yeah, I guess. Just... grrr. |
Tracking issue for peer IDs as cidv1b32: libp2p/specs#216 |
We are in the process of adding support for PeerID encoded as CIDv1 with Seems that even tho we use go-libp2p-core v0.3.0 which includes libp2p/go-libp2p-core#41 there are still places which assume Multihash instead of CID: $ ipfs name resolve -r /ipns/bafzbeiedwhhfhtte23hocn4k2bi4awpqay5sdhzqju7htk3y6sk63lvuae
Error: not a valid proquint string
$ ipfs resolve -r /ipns/bafzbeiedwhhfhtte23hocn4k2bi4awpqay5sdhzqju7htk3y6sk63lvuae
Error: not a valid proquint string I'll try to track them down and fix, as it is blocking me from writing tests for #6096 😬 Update: found, will fix in #6096 |
This adds support for resolving /ipns/<cidv1-libp2p-key> cc #5287 License: MIT Signed-off-by: Marcin Rataj <[email protected]>
This adds support for resolving /ipns/<cidv1-libp2p-key> cc #5287 License: MIT Signed-off-by: Marcin Rataj <[email protected]>
This adds support for resolving /ipns/<cidv1-libp2p-key> cc #5287 License: MIT Signed-off-by: Marcin Rataj <[email protected]>
This was fixed in #6096 and will ship with go-ipfs 0.5.0 (#7109) 🚀 When used in subdomain context, the HTTP Gateway will automatically convert case-sensitive identifier to base32 and redirect to URL with correct multicodec. Command line and RPC API provide handy error message when an invalid multicodec is used in CIDv1: # resolve Base58 PeerID
$ ipfs name resolve -r /ipns/QmY9DNm4UJxaTBB9FrhNkXQ75GaK43D8KhZtpJjmw8P7Sz
/ipfs/bafybeigdyrzt5sfp7udm7hu76uh7y26nf3efuylqabf3oclgtqy55fbzdi
# convert PeerID to CIDv1 (with invalid multicoded, to illustrate next step)
$ ipfs cid base32 QmY9DNm4UJxaTBB9FrhNkXQ75GaK43D8KhZtpJjmw8P7Sz
bafybeieru3k6wvdzsrsjcx33jund7ebawoqlyc7jpitmn7wd4cwveunolm
# resolve CIDv1 with dag-pb multicodec
$ ipfs name resolve -r /ipns/bafybeieru3k6wvdzsrsjcx33jund7ebawoqlyc7jpitmn7wd4cwveunolm
Error: peer ID represented as CIDv1 require libp2p-key multicodec: retry with /ipns/bafzbeieru3k6wvdzsrsjcx33jund7ebawoqlyc7jpitmn7wd4cwveunolm
# resolve CIDv1 with libp2p-key multicodec suggested in previous step
$ ipfs name resolve -r /ipns/bafzbeieru3k6wvdzsrsjcx33jund7ebawoqlyc7jpitmn7wd4cwveunolm
/ipfs/bafybeigdyrzt5sfp7udm7hu76uh7y26nf3efuylqabf3oclgtqy55fbzdi |
Version information:
0.4.16
Type:
bug
Description:
During the work related to ipfs/in-web-browsers#89 and https://github.com/ipfs/ipfs/issues/337 we've identified open problem with IPNS. We are unable to use current case-sensitive IPNS identifiers in case-insensitive URL contexts, namely:
keyId
– PeerID or ID of a key generated viaipfs key gen
Not sure what would be the best way to tackle this.
Adding only a multibase prefix? Switching all
keyId
to CIDv1 ?Part of ipfs/ipfs#337 (cc @kyledrake + @alanshaw for parity in js-ipfs)
Additional References:
/ipfs/
and at some point they will want to point at/ipns/
instead of/ipfs/
, which is blocked by this issueThe text was updated successfully, but these errors were encountered: