IPFS, nft.storage and most other ipfs providers default and recommend using CIDv1. In contrast, most recently (September 2022.) minted NFT's on cardano still use CIDv0: tarc citizen lagani r troublecats pegasus van.keulen cardano whale cardanoog mutation nation fluffy cardani hosky
Why recent NFT projects tend to choose CIDv0 instead of CIDv1 for ipfs link?
I am aware CIDv0 will be 46 chars long, while CIDv1 (if sha256 is used) will be 59 chars long so it is a bit cheaper (0.000044A * 13 = 0.000572A per NFT minted) to store it on chain. Also uri protocol+cid
for CIDv0 (ipfs://Qm...
) will be 7+46=53
chars while for CIDv1 (ipfs://baf...
) will be 7+59=66
chars which exceeds 64 byte/char limit for bytes/string fields of metadata schema. This is not a problem because cip25 allows encoding image
uri's as arrays (["ipfs://", "cid_part1", "cid_part2", ...]
). Now if we used CIDv0 and in 10 years ipfs clients deprecate CIDv0 and decide to support only CIDv1, then we will have to compute CIDv1 manually from CIDv0 (or use some redirect system) and show the user CIDv1 link. Wouldn't that be confusing for the user? User will see his NFT metadata link starts with ipfs://Qm...
but browser shows them ipfs://baf...
.
Anyway, I see most NFT projects on cardano today still use CIDv0 so I guess they don't think this is an issue - but I am not sure it isn't.