dat-ecosystem-archive / DEPs

Dat Enhancement Proposals. Contains all specs for the Dat protocol, including drafts. [ DEPRECATED - see https://github.com/hypercore-protocol/hypercore-proposals for similar functionality. More info on active projects and modules at https://dat-ecosystem.org/ ]
https://dat-ecosystem.github.io/DEPs
166 stars 17 forks source link

Clarify the maximum number of roots sentence. #16

Closed bcomnes closed 6 years ago

bcomnes commented 6 years ago

This sentence is slightly unclear, and slightly contradictory to the statement preceding it. Adding a few extra words of clarification improves its intention.

bnewbold commented 6 years ago

On a closer reading, i'm not too hot on the "In the Hypercore feed, we only want one active root" phrasing. Maybe the whole paragraph:

"To encode in the Hypercore feed, we want to refer to all the roots together using a single fixed-size hash. Therefore, when there are multiple roots, we re-hash all the individual root hashes together into a single hash value. At most there will be log2(number of data blocks) such individual root hashes to re-hash."

@pfrazee, thoughts?

pfrazee commented 6 years ago

@bnewbold yeah I think that's a good improvement

bcomnes commented 6 years ago

Agreed, justifying why we want a single fixed size hash is +1.

"To encode in the Hypercore feed" Is ambiguous. Encoded in the merkle tree forever? Encoded by convention until there are a different set of roots?

bcomnes commented 6 years ago

"We always want a way to refer to a single fixed-size hash of the hypercore feed. Therefore, when there are multiple roots, we re-hash all the individual root hashes together into a single hash value. At most there will be log2(number of data blocks) such individual root hashes to re-hash."

Something like that, plus clarification on where that fixed size hash is stored / encoded? Is my understanding correct in that this hash doesn't ever end up in the feed?

bnewbold commented 6 years ago

Merged PR #29, which was a variant on this.

bnewbold commented 6 years ago

Thank you @bcomnes!