From 8950c4f63cf28fa23e1b056fda51216032f6d5eb Mon Sep 17 00:00:00 2001 From: Akhila Raju Date: Thu, 6 Jun 2019 15:18:02 -0400 Subject: [PATCH] Minor grammar fixes to Merkle Interval Tree (#233) --- packages/docs/src/spec/src/01-core/merkle-interval-tree.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/docs/src/spec/src/01-core/merkle-interval-tree.rst b/packages/docs/src/spec/src/01-core/merkle-interval-tree.rst index 20df5e52..14692637 100644 --- a/packages/docs/src/spec/src/01-core/merkle-interval-tree.rst +++ b/packages/docs/src/spec/src/01-core/merkle-interval-tree.rst @@ -48,10 +48,10 @@ A Merkle Index tree is generated from a list of `leaf nodes`_. Merkle Interval T An algorithm for generating the tree is described below. All lists used are zero-indexed. -The algorithm takes two inputs, a list of leaf nodes and hash function. +The algorithm takes two inputs, a list of leaf nodes and a hash function. 1. If the list of leaf nodes is empty, return an empty array. -2. Assert that the range described by ``start`` and ``end`` of each leaf node does not intersect with the range described by any other leaf node. If any ranges exist, throw an error. +2. Assert that the range described by ``start`` and ``end`` of each leaf node does not intersect with the range described by any other leaf node. If any intersecting ranges exist, throw an error. 3. Sort the list of leaf nodes by their ``start`` value. 4. Store the list of leaf nodes as the first layer of the tree. 5. Generate a corresponding sorted list of `internal nodes`_ from the leaf nodes by creating an internal for each leaf node such that: @@ -130,7 +130,7 @@ A pseudocode version of the above algorithm is given below: ************* Merkle Proofs ************* -Our tree generation process allows us to create an efficient **proof** that for a given leaf node and a given Merkle Interval Tree root node: +Our tree generation process allows us to create an efficient **proof** that for a given leaf node and a given Merkle Interval Tree root node such that: 1. The leaf node was contained in the tree that generated the root. 2. The range described by the leaf node intersects with no other ranges described by any other leaf node in the tree.