-
Notifications
You must be signed in to change notification settings - Fork 232
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
Migration to CIDv1 (default base32) #247
Comments
cc myself |
@kyledrake can you give an update on the status of this migration in the next IPFS All Hands? |
I will be unavailable for the call unfortunately, I'm moving tomorrow. @lidel do you think you could give a quick update? It doesn't need to be complicated, just a quick summary of progress based on the referenced issues on 337. |
@kyledrake @lidel @diasdavid I am the most qualified to give this update for |
js-ipfs v0.33.0 and go-ipfs v0.4.18 shipped with some relevant changes:
The newly added # cidv0(b58) → cidv1(b32)
$ ipfs cid base32 QmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR
bafybeigdyrzt5sfp7udm7hu76uh7y26nf3efuylqabf3oclgtqy55fbzdi
# cidv1(b58) → cidv1(b32)
$ ipfs cid base32 zb2rhk6GMPQF3hfzwXTaNYFLKomMeC6UXdUt6jZKPpeVirLtV
bafkreigh2akiscaildcqabsyg3dfr6chu3fgpregiymsck7e7aqa4s52zy |
@kyledrake can you compile a status update on this whole endeavour? How far are we from shipping it? Will there be a big launch? |
@daviddias The referenced issues here show the current state of things pretty well. We're making good progress on better base32 support and are definitely at a point where we want to decide if we're comfortable with planning for a switch. I would like an opinion from @alanshaw and @kevina on whether they think they're at a point where we would be comfortable migrating to base32, and if there's any blockers or issues on the technical side of things that would make them uncomfortable with switching until resolving. Then we can move to setting dates for transition, getting out announcements, etc. |
Is there a timeline for when to expect this work to be finalized? What's the plan for the launch? How will the users be informed? Any caveats to the migration? |
@daviddias We're getting closer to the finish line, so now is a good time to start discussing a rough timeline/plan. 1) Release go-ipfs, js-ipfs, ipfs-companion versions with optional cidv1-base32 supportjs-ipfs is going to get there with the 0.34 release (ipfs/js-ipfs#1721), and @alanshaw has set 0.36 as the version with default cidv1-base32 as a rough plan (ipfs/js-ipfs#1721 (comment)), which I'm OK with. Absolutely incredible work by the js-ipfs team here! go-ipfs has a pull request pending (ipfs/kubo#5789) that will bring go-ipfs up to speed. I'm really excited to see this merged and finally put my hshca hack to rest. @kevina has done a ton of work on this (and had to re-do a lot of that work for various reasons) so kudos to him and everyone else at go-ipfs that has put a lot of good work into this. I'm not sure what the timeline looks like for getting this in go-ipfs yet, @kevina @Stebalien is this something you foresee getting merged into master soon? I'll let @lidel give us an update on ipfs-companion, it will be better than mine. Tracker issue for ipfs-companion is ipfs/ipfs-companion#527 Dates: No hard dates for these releases, but I would like to see them released within the next month if it's not too inconvenient. Most of the work is done here. Step 3 happens after we get releases of js-ipfs, go-ipfs, ipfs-companion which have the (optional, with arguments) support. Step 2 can be done in parallel: 2) Prepare the gateway for subdomains (*.dweb.link)This will also be a good point to encourage users to start using the subdomains instead of the ipfs.io gateway, *.ipfs.dweb.link and *.ipns.dweb.link (cc @eefahy @mburns), getting content/apps on their own security origin. But we'll need to make sure whatever we choose works well with ipfs-companion (we good here @lidel?) The main missing pieces right now:
Dates: would be nice to see this done within the next month as well. 3) Blog post with new cidv1-base32 informationWe will write a blog post indicating that we will be switching to cidv1-base32, why we are making this change, and how users can start using it now with optional arguments. This will get people more comfortable working with it, show them the new gateway URLs they can (really should!) use, and give them time to prepare. We absolutely need to release both go-ipfs and js-ipfs (also ipfs-companion?) at the same time with the new default support, so a set date will eventually be needed. Dates: I will publish this very soon after the optional support releases are made. 2-4 days to complete. 4) Update documentation to reflect use of cidv1-base32When we release with the new defaults, we are going to have a lot of documentation across the organization that references the old output. We will need to prepare the documentation to reflect these changes when we do the release, particularly the docs portal. Dates: Work will begin soon after optional support releases are made. Rough, hardly educated guess is 2 weeks of work. 5) Release go-ipfs, js-ipfs, ipfs-companion, documentation versions with cidv1-base32 supportWe release everything at the same time, and add to a blog post announcing switch to cidv1-base32 and re-hashing a lot of what was stated in the first blog post. Dates: Let's call this "proposed rough plan". Feel free to add any suggestions/missing info. |
Adding a missing piece from my writeup: go-ipfs 0.4.18 shipped with some
So if used this way, you could technically start using cidv1-base32 with go-ipfs already (for a lot of common uses). More info from the blog post: https://blog.ipfs.io/53-go-ipfs-0-4-18/#cidv1-base32-migration |
ipfs-companion detects When js-ipfs/go-ipfs backends switch their defaults to cidv1b32, ipfs-companion will support it automatically. Ad. preparing gateway for subdomains, there is an open question about how ipfs-companion should handle redirects of CID-in-Subdomain and DNSLink websites: ipfs/ipfs-companion#667 ← would appreciate feedback on proposed solution. |
Heads up that @lidel is now the coordinator for this work. |
🏆
|
PSA: Switching CIDv1 to Base32We are in the process of switching text representation of CIDv1 from Base58btc to Base32. Note: This is only about changing the default text representation of CIDv1. |
PSA: Adding support for CIDv1 in IPNSWe are adding a new multicodec to unlock PeerID/KeyID-in-CIDv1 in subdomains:
More details in multiformats/multicodec#130 & ipfs/kubo#5287 |
There is the issue that ipfs URLs are currently case-sensitive with base58 hashes, but this has been recognized as a problem: https://github.com/ipfs/ipfs/issues/337 QUrl also converts addresses to lowercase. So we can't currently load base58 hashes into QUrl; consequently switched load(QUrl) to load(QString) for now. Maybe it can be reverted when they switch to base32 hashes.
Cool update: Cloudflare officially supports CIDv1B32 in subdomains: Example: https://bafybeiemxf5abjwjbikoz4mc3a3dla6ual3jsgpdr4cjr3oz3evfyavhwq.cf-ipfs.com/wiki/ |
PSA: Opened RFC (change to libp2p SPEC) to switch default text representation of PeerIDs to CID and make Base32 the default mutlibase: libp2p/specs#209 |
I am transferring this issue to ipfs/specs as we want to clean up this repo. Progress in Go (the missing part) can be followed here: ipfs/kubo#4143 |
📣 PSA: go-ipfs 0.5.0 will bring native support for PeerIDs as CIDv1 & CID-in-subdomainTL;DR Support for PeerIDs as CIDv1 (ipfs/kubo#5287) and native support for CID-in-subdomain (AKA subdomain gateways) landed in go-ipfs (ipfs/kubo#6096) and will ship with go-ipfs 0.5.0 (ipfs/kubo#7109) HTTP GatewayWhen subdomain gateway is used as a path one, go-ipfs will automatically convert case-sensitive identifiers to base32 and redirect to a subdomain URL. For example, given a subdomain gateway enabled on
When Instructions how to run a subdomain gateway can be found in CLI / RPC APICommand 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 |
🕸️ 🕷️ 🎩 brushing off the dust
|
go-ipfs 0.12 shipped the blockstore migration from full CID to Multihash keys. Finally, we can do the thing! 🙀Started poking at go-ipfs to produce CIDv1 by default – tracking remaining work in ipfs/kubo#4143 (comment) |
Lowercase identifiers are required in order to work with legacy URI, web browser security (sub)origins and the experimental Protocol Handler API. So we are moving to finish support for CIDv1 across the ecosystem, and use it as default (while still supporting CIDv0/Multihash).
There are some complications related to this switch, such as refactoring the blockstore to use multihashes instead of cid identifiers. A number of temporary solutions were proposed that would have made the change simpler with the current design, however it was decided that since this is going to be a significant update, we should focus on a full CIDv1 migration with one identifier change.
This is the parent issue for all issues related to migration to CIDv1 with default base32 (type 'b'). This issue closes when CIDv1b32 is enabled by default for new versions of go-ipfs, js-ipfs, and ipfs-companion.
@kevina @magik6k @lidel @whyrusleeping @diasdavid @alanshaw @olizilla @kyledrake @lgierth @mikeal
Berlin Jul 2018 developer meeting notes:
ipfs-inactive/developer-meetings#39
Initial proposal:
ipfs/kubo#4143
🐦 Bird's-eye view (WIP by @lidel)
Located here: https://gist.github.com/lidel/ceef96f60f30308e3c07be95182c4c88 (most likely out-of-date!)
The text was updated successfully, but these errors were encountered: