Re:Bao: A verified streaming tool based on BLAKE3
by oconnor663 on Friday January 17, 2020 @10:21AM
(#22075313)
It's the set of parent nodes on the path from the root to the chunk(s), plus the chunks themselves. Parent nodes contain the hashes / chaining values of their two children, so you could also think of this as including sibling hashes. For example, consider this tree representing a 4 KiB file:
Say we build a slice containing only chunk2. The contents of that slice will be:
[4096][root][parent1][chunk2]
The parent node parent1 is [hash of chunk1][hash of chunk2], and the root node is [hash of parent1][hash of parent2]. The 8-byte total length on the front (4096) is the same as in the full encoding; it defines the structure of the tree, so the decoder knows how many parent nodes to expect.
Re:Bao: A verified streaming tool based on BLAKE3
by rakoo on Friday January 17, 2020 @01:08PM
(#22077363)
Ok so the intermediary nodes are the concatenation of the children, that's what I missed. Thanks a lot for the details, and even more for the rest of your work !
For more details: https://github.com/oconnor663/bao/blob/master/docs/spec.md
This is my first time looking at the Dat protocol. Thanks for pointing that out.