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: cid agnostic blockstore .get and .has #184

Merged
merged 5 commits into from Dec 7, 2018
Merged

Conversation

alanshaw
Copy link
Member

@alanshaw alanshaw commented Dec 6, 2018

This changes the blockstore to check for a CID of the other version (if applicable) when getting data or checking for existence.

If content is found for the other version of a CID then we put that block in the store under the passed CID. This causes some duplication.

When we migrate to using multihash as key instead of CID these duplicates will be purged.

FYI this is the same strategy that go-ipfs uses currently: ipfs/kubo#5285

depends on multiformats/js-cid#71

Allows us to pass these interop tests:

screenshot 2018-12-07 at 02 31 53

License: MIT
Signed-off-by: Alan Shaw <alan.shaw@protocol.ai>
@ghost ghost assigned alanshaw Dec 6, 2018
@ghost ghost added the status/in-progress In progress label Dec 6, 2018
License: MIT
Signed-off-by: Alan Shaw <alan.shaw@protocol.ai>
License: MIT
Signed-off-by: Alan Shaw <alan.shaw@protocol.ai>
License: MIT
Signed-off-by: Alan Shaw <alan.shaw@protocol.ai>
@alanshaw alanshaw changed the title [WIP] feat: cid agnostic get [WIP] feat: cid agnostic blockstore .get and .has Dec 7, 2018
@alanshaw alanshaw changed the title [WIP] feat: cid agnostic blockstore .get and .has feat: cid agnostic blockstore .get and .has Dec 7, 2018
License: MIT
Signed-off-by: Alan Shaw <alan.shaw@protocol.ai>
Copy link
Contributor

@jacobheun jacobheun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes look good. CI failure is due to a nominal code coverage percentage drop

@jacobheun jacobheun merged commit 18cca08 into master Dec 7, 2018
@ghost ghost removed the status/in-progress In progress label Dec 7, 2018
@jacobheun jacobheun deleted the feat/cid-agnostic-get branch December 7, 2018 16:43
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.

None yet

2 participants