Skip to content
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

feat: default MFS to CIDv1 #2527

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft

Conversation

whizzzkid
Copy link
Contributor

Fixes: #2361

@lidel lidel force-pushed the feat/migrate-cid-v0-to-cid-v1 branch from 1d12cb0 to 5870a24 Compare March 27, 2024 16:06
@lidel lidel changed the title feat: ⬆️ Upgrade to cid-v1 feat: default MFS to CIDv1 Mar 27, 2024
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 })
Copy link
Member

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.

Copy link
Member

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Adding a file/folder from disk should use CIDv1 by default.
4 participants