-
Couldn't load subscription status.
- Fork 897
feat: default MFS to CIDv1 #2527
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
base: main
Are you sure you want to change the base?
Conversation
1d12cb0 to
5870a24
Compare
| logger.info('[enable-cid-v1]: Enabling CID version 1 for files') | ||
| try { | ||
| // @ts-expect-error - ipfsd.api is not typed properly | ||
| await ipfsd.api.files.chcid('/', { cidVersion: 1 }) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In addition to this, should also set Import.* in config to apply CIDv1 to files imported via context menu in Windows Explorer's right-click context menu (which uses ipfs add).
See thoughts in ipfs/kubo#4143 (comment) – my current thinking is that we want to avoid breaking existing users, and in next verison of Kubo we will explicitly save defaults in Import on repo creation.
IPFS Desktop could follow this philosophy (or just wait for Kubo) – initialize new users with CIDv1 and store that in Import.*, and for old users who have Import.CidVersion=0 or unset give them context menu for switching to CIDv1, which would switch + set Import.CidVersion=1 and other values.
This way we won't break anyone, but still be able to move forward.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i'd much rather just pull in settings directly from kubo and have things work there if we can
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I think we need a fix in Kubo. It should respect Import.* especially Import.CidVersion when a new MFS root is created. (TODO: fill issue once im at PC)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@lidel Did you end up opening an issue for this?
Fixes: #2361