Skip to content

Commit

Permalink
Minor grammar fixes to Merkle Interval Tree (#233)
Browse files Browse the repository at this point in the history
  • Loading branch information
Akhila Raju authored and smartcontracts committed Jun 6, 2019
1 parent 137ff7a commit 8950c4f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/docs/src/spec/src/01-core/merkle-interval-tree.rst
Expand Up @@ -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:
Expand Down Expand Up @@ -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.
Expand Down

0 comments on commit 8950c4f

Please sign in to comment.