Open kevina opened 6 years ago
This is great, thank you for setting this up. LMK if you need anything from me.
Issues that I currently need feedback on from the core developers:
(subscribing)
(subscribing)
Kind request 🙏 - there's a button on the right you can press to subscribe - commenting "(subscribing)" sends me and everyone else mentioned or participating a notification.
Some relevant updates from Golang Core Dev Team Weekly Sync 2019-02-11:
Base32/CIDv1
[..]
@eingenito - Need to consider next steps and who/when this can be picked up. @stebalien indicates that the next work to be done is converting the blockstore to use raw multihashes (Issue, WIP). This is a complicated task that needs some context for whoever picks it up.
Q: What's the relative priority of this task compared to others on this list?
A: Most important next milestone is storing/fetching [raw] multihashes in the DHT in libp2p.
Idea: Use https://github.com/kstenerud/safe-encoding as a better alternative for safe encoding
On technical merits alone, those encoding schemes look superior (and the order-preserving property looks quite nice). Unfortunately,
Discussion that lead us to picking Base32 as the new default can be found in https://github.com/ipfs/go-ipfs/issues/4143#issuecomment-322630426:
[..] chose RFC because it's a standard, it's been around a while, nginx-misc-module supports it, and it probably has the widest support across all programming languages.
The only reason I would chose the RFC one is because it is a standard and more likely to have an implementation available as part of the language.
@DonaldTsang encodings you linked look really interesting. I believe picking RFC one is still a good choice when it comes to being the new default, but we surely can add order-preserving ones as alternative encodings. Thank you for opening https://github.com/multiformats/multibase/issues/51, let's discuss them there.
Important:
what is the workaround to get the base32 hash of an file?
@DaniellMesquita you can convert any CID to CIDv1 in Base32 via:
ipfs cid base32 <cidv0>
You can also make a request to a subdomain gateway, eg. https://dweb.link/ipfs/<cid>
, and you will be redirected to a subdomain with DNS-safe base32 or base36 CID:
https://dweb.link/ipfs/QmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR → https://bafybeigdyrzt5sfp7udm7hu76uh7y26nf3efuylqabf3oclgtqy55fbzdi.ipfs.dweb.link/
@lidel, ok, but how to get the base32/CIDv1 of an local file like in ipfs add -q --only-hash
? Using pipelines with both commands?
Ok, the pipelines command to get the CIDv1 of an file is: ipfs add -q --only-hash <file.extension> | ipfs cid base32
ipfs add --cid=version=1
should default to base32 output.
@hsanjuan, this command isn't compatible with the purpose of only getting the CID of an given file, instead of adding it to IPFS.
lidel told me before that the flag to get CIDv1/base32 is --cid-version 1
probably instead of the --cid=version=1
you're mentioning.
Then, maybe ipfs add -q --cid-version 1 --only-hash
is the command to just get the CIDv1 of an file.
@lidel, So, its ipfs add -q --cid-version 1 --only-hash?
Is it bad to produce an different merkletree/DAG? Then, how to keep compatibility?
via: https://github.com/ipfs/go-ipfs/issues/7852#issuecomment-760468451
This issue is to form a migration plan to base32 CIDv1 specific to go-ipfs. It is separate from #4143 which was more of a discussion or https://github.com/ipfs/ipfs/issues/337 which is more of a meta issue for all of go-ipfs, js-ipfs, and ipfs-companion.
Phase 1
ipfs add
to return CIDs in alternative base #5233 p.r #5464Phase 2 -- full migration.
cc @whyrusleeping @Stebalien @lidel @magik6k @kyledrake.