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

Use ipld-prime based go-merkledag #7931

Closed
wants to merge 2 commits into from

Conversation

hannahhoward
Copy link
Contributor

@hannahhoward hannahhoward commented Feb 20, 2021

This is a build of IPFS that uses a copy of go-merkledag that is mostly built on go-ipld-prime.

Note that this does not:

  • attempt to modify any of Core API (there are methods that expect oldschool IPLD-format nodes)
  • address the way nodes are parsed in for IPFS DAG Put (which is heavily tied to go-ipld-format)
  • attempt to do anything other than incorporate the branch of go-merkledag and get the tests to pass

License: MIT
Signed-off-by: hannahhoward hannah@hannahhoward.net

Notes

  • I have disabled most sharness test of the git IPLD plugin, as we need to build an ipld-prime base decoder for this to work
  • There is one remaining sharness test that is failing. I believe this is because our current Decode function in go-ipld-legacy uses Link.Load, because we don't have access to the underlying multicodec table, meaning this is the only way to load links. However, I believe that Link.Load's current implementation requires a rehash of the bytes against the CID. The specific sharness test in question actually modifies the on disk bytes while leaving datastore.HashOnRead off. This means the bytes in this case do not match the CID, I think, causing link.load to fail. I think. In any case, it's an open question of whether loading should always rehash the bytes, given the performance penalty particularly if they are from a trusted source like the local datastore. This question is best left open for when LinkSystem is introduced (merging in go-ipld-prime soon, I think).

License: MIT
Signed-off-by: hannahhoward <hannah@hannahhoward.net>
License: MIT
Signed-off-by: hannahhoward <hannah@hannahhoward.net>
@@ -20,16 +20,16 @@ test_dag_git() {
find objects -type f -exec ipfs dag put --format=git --input-enc=zlib {} \; -exec echo \; > hashes
'

test_expect_success "successfully get added objects" '
test_expect_failure "successfully get added objects" '
Copy link
Contributor

Choose a reason for hiding this comment

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

should we keep these failing until we fix the underlying issues?

@hannahhoward
Copy link
Contributor Author

closed in favor of #7976

@hacdias hacdias deleted the feat/use-prime-merkledag branch May 9, 2023 11:00
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.

2 participants