js-ipfs needs to be able to work with cidv1b32 addresses, for both creation and retrieval.
new IPFS({}) or as option to commands like ipfs add to output base32 cidv1Eventually we want to do a synchronized release with go-ipfs and default to cidv1b32, but for now let's start with getting the basic support in
https://github.com/ipfs/ipfs/issues/337
@alanshaw
My rough plan for this is:
For the first part of 1 there will need to be changes to multiple APIs to add a --cid-base option (or similar name - I've had no resistance to this so far) that allows the output to be encoded using base32. e.g. files.add, files.stat, files.ls, dag.put...I will post a definitive list when I have gone through them.
For the second part of 1 the local checks might be easy enough to implement. In terms of finding content that isn't local, I'd assume we'd wantlist both versions of the CID, and race them. When we get a response we'd unwant the other...? Something like that.
I will write interop tests for the second part of 1 to ensure js-ipfs and go-ipfs can get content from each other using different CID versions. I'll also PR interface-ipfs-core to document the --cid-base option in the relevant commands.
Release sync we need to sync up 2 js-ipfs/go-ipfs releases for steps 1 and 2 so that when IPFS gets these new super powers we can all still fetch content from each other. Happyness ensues and double rainbows appear.
Does this sound reasonable? Please leave your thoughts, feedback or just +1 if all good!
@whyrusleeping @Stebalien @kevina @magik6k @diasdavid @achingbrain
I don't like cid-base because its the first query string argument name (HTTP-API) with a dash (I think). There is already mhtype for multihash type. How about cbtype for cid base type,
I think --cid-base is fine, it's descriptive and fits with the --cid-version arg we already have in a few places.
For the go-ipfs side of (1) see https://github.com/ipfs/go-ipfs/pull/5285.
@alanshaw Is there a different meta issue for this other than this issue? Was wondering if there were any updates here this issue is missing.
No this is it. Updates are:
--cid-base option PR is now here https://github.com/ipfs/js-ipfs/pull/1552 - is currently still WIPI haven't been able to work on anything more 馃槩
Congratz on #1560 and releasing it! :)
Update:
The CID tool was shipped with JS IPFS 0.33
JS IPFS 0.34 will include the two items from (1) ASAP:
Tracking PRs for (2):
Closing this as cidv1 support has already been added. Blockstore work for multihashes is being tracked at https://github.com/ipfs/js-ipfs/issues/2415
@jacobheun It doesn't look like the global --upgrade-cidv0-in-output flag has been added to jsipfs, and I can't seem to find a ticket tracking that. Just bringing it up in case it risks slipping.
Most helpful comment
Update:
The CID tool was shipped with JS IPFS 0.33
JS IPFS 0.34 will include the two items from (1) ASAP: