-
Notifications
You must be signed in to change notification settings - Fork 161
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(iroh-resolver): create a balanced tree dag #198
Conversation
ac101cd
to
d949b40
Compare
ae09aa0
to
660034a
Compare
tests failing because: "We cannot run this job using the selected resource class. Please check your configuration and try again."? |
Ignore mac tests for now, I have to figure it out seems like some permission issue with the runners. |
e795f39
to
2747871
Compare
e4555ba
to
916bc9e
Compare
916bc9e
to
66b9d5b
Compare
When adding content to iroh, create a balanced tree. Our balanced tree implementation takes a stream of chunks (`BytesMut`) and returns a stream of Bytes of the encoded nodes of the dag, and their associated Cids. `(Cid, Bytes)` The implementation emits the node as soon as it has been created. All the leaves of the tree are encoded as unixfs `Raw` nodes. All the stems & the root of the tree are encoded as unixfs `File` nodes. We've put effort into having our nodes be as similar to kubo as possible, but we have intentionally differed in a few ways: - all of our "stem" nodes have `name: None`. In kubo, the parents of leaf nodes have the go equivalent of `name: Some("".to_string())`. - the `tsize` of our links is the cumulative size of the encoded tree associated with that link. The definition of `tsize` seems to be unfixed, and can mean different things depending on the implementation.
66b9d5b
to
e131e0e
Compare
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.
A-OK!
When adding content to iroh, create a balanced tree.
Our balanced tree implementation takes a stream of
chunks (
BytesMut
) and returns a stream of Bytesof the encoded nodes of the dag, and their associated Cids.
(Cid, Bytes)
The implementation emits the node as soon as it has
been created.
All the leaves of the tree are encoded as unixfs
Raw
nodes. All the stems & the root of the tree are encoded
as unixfs
File
nodes.We've put effort into having our nodes be as similar to
kubo as possible, but we have intentionally differed in
a few ways:
name: None
. In kubo, theparents of leaf nodes have the go equivalent of
name: Some("".to_string())
.tsize
of our links is the cumulative size ofthe encoded tree associated with that link. The definition
of
tsize
seems to be unfixed, and can mean different thingsdepending on the implementation.