ipfs-webui icon indicating copy to clipboard operation
ipfs-webui copied to clipboard

Settings: normalize CIDs to CIDv1 in base32

Open andrasfuchs opened this issue 3 years ago • 2 comments

I use IPFS Desktop 0.17.0 and go-ipfs 0.10.0 on Windows 11.

Is your feature request related to a problem? Please describe. IPFS Desktop displays and uses CIDv0 at the moment, which is case-sensitive and considered legacy (see issue #4143 on go-ipfs).

The older format doesn't work with the more recent gateways. image

It would be also great to have an option to convert all the CIDv0 entries in our repos to CIDv1 with one command.

Describe the solution you'd like I'd like to see the new CIDv1 (starting with bafy) instead of the CIDv0 (starting with Qm) that we have now.

Describe alternatives you've considered I'm not sure, but it's probably possible somehow to get go-ipfs to work with CIDv1s.

Additional context Here are some screenshots where we have only CIDv0s in IPFS Desktop:

Files page: image

"Share link", "Copy CID" and "Inspect" commands: image

Explore page: image

andrasfuchs avatar Nov 24 '21 13:11 andrasfuchs

It would be also great to have an option to convert all the CIDv0 entries in our repos to CIDv1 with one command.

We have datastore migration planned for go-ipfs 0.12, and we will switch to CIDv1 as the new default in release after that.

:point_right: I think what remains here is having ipfs-webui normalize all pre-existing legacy CIDv0 to be displayed as CIDv1 Base32 with dag-pb codec, so it does not cause issues when copied to web browser or used in DNS label.

:bulb: Perhaps we could have a Force CIDv1 multibase checkbox on the Settings screen and make it force-normalize every CID to CIDv1? It should be fine to have it enabled by default, as it is better UX enabling people to use old CIDs in safer CIDv1 form that works in URLs and browsers.

Not sure how useful, but we could also have option to specify base (making base32 the default, but allowing people to change it to any base supported in ipfs cid bases).

If anyone wants to implement that, PR welcome, will be happy to review and ship it :+1:

lidel avatar Nov 24 '21 16:11 lidel

go-ipfs (kubo) is at 0.17 now, so I suspect that CIDv1 is now the default. This issue is ready for someone to pick up. 👍

TinyTb avatar Nov 30 '22 15:11 TinyTb