aboutsummaryrefslogtreecommitdiffstats
path: root/proposals
diff options
context:
space:
mode:
authorPaul Frazee <pfrazee@gmail.com>2018-02-19 17:42:40 -0600
committerPaul Frazee <pfrazee@gmail.com>2018-02-19 17:42:40 -0600
commit44e488b5da8bd35e3721d2d3f0b6246e8d4859cb (patch)
tree9e4efec6a4a4f9fa5bc1332cf6bd218b05e305e6 /proposals
parent56c1b9e35ce264651cc56d6f83f0bfc7b2c146ea (diff)
downloaddat-deps-44e488b5da8bd35e3721d2d3f0b6246e8d4859cb.tar.gz
dat-deps-44e488b5da8bd35e3721d2d3f0b6246e8d4859cb.zip
Describe why node index is included in hash
Diffstat (limited to 'proposals')
-rw-r--r--proposals/0000-hypercore.md2
1 files changed, 1 insertions, 1 deletions
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)