From 44e488b5da8bd35e3721d2d3f0b6246e8d4859cb Mon Sep 17 00:00:00 2001 From: Paul Frazee Date: Mon, 19 Feb 2018 17:42:40 -0600 Subject: Describe why node index is included in hash --- proposals/0000-hypercore.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'proposals') diff --git a/proposals/0000-hypercore.md b/proposals/0000-hypercore.md index d6c7696..ea13ae1 100644 --- a/proposals/0000-hypercore.md +++ b/proposals/0000-hypercore.md @@ -171,7 +171,7 @@ The nodes in this tree would be calculated as follows: 10 = h(chunk5) ``` -In the Hypercore feed, we only want one active root. Therefore, when there are multiple roots we hash all the roots together again. We also include a big endian uint64 binary representation of the corresponding node index (TODO: why?). At most there will be `log2(number of data blocks)`. +In the Hypercore feed, we only want one active root. Therefore, when there are multiple roots we hash all the roots together again. We also include a big endian uint64 binary representation of the corresponding node index to ensure that the hash describes the tree structure and not just the underlying data. At most there will be `log2(number of data blocks)`. ``` root = h(uint64be(#9) + 9 + uint64be(#3) + 3) -- cgit v1.2.3