Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Add builder for unixfs dags #12
Add builder for unixfs dags #12
Changes from 10 commits
02af9c9
4e7521b
35e5ff9
390c8c8
9912974
dc5a134
8164344
2b1f66b
40f88ce
4acade0
8148a62
319d445
ee45835
a6359ad
67809f0
b3969b1
30bc1ad
5ef2170
ef5d36d
6a9bae0
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
it's all starting to come together with past work! :)
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.
reading comprehension check for me: did this not end up using any of the other types or code for dealing with sharding, which we already had for the read direction?
(Not necessarily offering judgement, just surprised if so, enough that I'm wanting to doublecheck my reading.)
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.
correct. it can potentially overlap the shard type here with the
_UnixFSHAMTShard
inhamt
, butthis would end up as the builder type rather than that type itself, and would need to do the full serialization here, since the structure in hamt expects a fully serialized pbnode substrate to exist that it's providing a view over.
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'm pretty sure you're missing a log2 somewhere here. There's a lot of calculation of log2 in the HAMT sharding code, and it's cause even thought we want 256 width, that only means 8-bits per item.
there are tests in the go-unixfs implementation -- how hard would it be to substantially copy them to very you have the same result?
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.
maybe I'm totally wrong -- that's part of why I'm wondering if we have a way to equivalence test this
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.
Added a couple tests. you were right on this one 😨