Skip to content
This repository has been archived by the owner on Mar 10, 2020. It is now read-only.

[WIP] refactor: use CIDv1 and encode with base32 by default #38

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

alanshaw
Copy link
Contributor

@alanshaw alanshaw commented Feb 7, 2019

BREAKING CHANGE: CIDs created by this module will default to v1 and will be base32 encoded by default.

refs ipfs/js-ipfs#1440

@achingbrain I could use your advice on the wisdom of this particular change. I think it's fine, I just wanted to confirm. It's used by these tests:

    ✓ results in the same hash as a sharded directory created by the importer when adding a new file (49ms)
    ✓ results in the same hash as a sharded directory created by the importer when creating a new subshard (75ms)
    ✓ results in the same hash as a sharded directory created by the importer when adding a file to a subshard (50ms)
    ✓ results in the same hash as a sharded directory created by the importer when adding a file to a subshard of a subshard (851ms)

I've added rawLeaves: false because switching to CIDv1 enables it by default in unixfs-importer but MFS explicitly disables it, hence we have to explicitly set it to false when calling unixfs-importer in order to get the same hash.

Depends on:

License: MIT
Signed-off-by: Alan Shaw <alan.shaw@protocol.ai>
@ghost ghost assigned alanshaw Feb 7, 2019
@ghost ghost added the in progress label Feb 7, 2019
@alanshaw alanshaw changed the title refactor: use CIDv1 and encode with base32 by default [WIP] refactor: use CIDv1 and encode with base32 by default Feb 7, 2019
@momack2 momack2 added this to In Progress in ipfs/js-ipfs May 10, 2019
@momack2 momack2 added this to In Progress in ipfs/js-waffle May 10, 2019
@hsanjuan hsanjuan removed this from In Progress in ipfs/js-ipfs Apr 27, 2020
@hsanjuan hsanjuan removed this from In Progress in ipfs/js-waffle Apr 27, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant