From caf6a6102bcbe0ca4fa8a7d1cf2b2e9eddfebe09 Mon Sep 17 00:00:00 2001 From: Cayle Sharrock Date: Thu, 14 Sep 2023 05:15:14 +0100 Subject: [PATCH] Apply suggestions from code review --- src/RFC-0141_Sparse_Merkle_Trees.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/RFC-0141_Sparse_Merkle_Trees.md b/src/RFC-0141_Sparse_Merkle_Trees.md index 3b5c9e0..fbc7ad0 100644 --- a/src/RFC-0141_Sparse_Merkle_Trees.md +++ b/src/RFC-0141_Sparse_Merkle_Trees.md @@ -160,21 +160,21 @@ If we insert the nodes at * C: 11100000 (224 in decimal) * D: 11110000 (240 in decimal) -you will notice that the first two diverge at the first bit, while the first and last pairs differ at the -fourth bit. This results in a SMT that looks like this: +you will notice that the first two diverge at the fourth bit, while the first and last pairs differ at the +first bit. This results in a SMT that looks like this:
             ┌──────┐
       ┌─────┤ root ├─────┐
       │     └──────┘     │
-     ┌┴┐                ┌┴┐1
+     ┌┴┐0               ┌┴┐1
   ┌──┤ ├──┐          ┌──┤ ├───┐
   │  └─┘  │          │  └─┘   │
- ┌┴┐     ┌┴┐        ┌┴┐10    ┌┴┐11
+ ┌┴┐00   ┌┴┐01      ┌┴┐10    ┌┴┐11
  │0│  ┌──┤ ├──┐     │0│    ┌─┤ ├─┐
  └─┘  │  └─┘  │     └─┘    │ └─┘ │
-     ┌┴┐     ┌┴┐       110┌┴┐   ┌┴┐111
+     ┌┴┐010  ┌┴┐011     110┌┴┐   ┌┴┐111
    ┌─┤ ├─┐   │0│          │0│ ┌─┤ ├─┐
    │ └─┘ │   └─┘          └─┘ │ └─┘ │
   ┌┴┐   ┌┴┐                  ┌┴┐   ┌┴┐
@@ -342,7 +342,7 @@ where
 * `height` is the height of the branch in the tree, where the root node is height 0.
 * `key_prefix` is the common prefix that the key of _every_ descendent node of this branch will begin with. 
   `key_prefix` is `KEY_LENGTH_BYTES` long, and every bit after the prefix MUST be set to zero. This means that key 
-  prefixes are not unique. For example, every key prefix for the left-mode path down the tree will always have a 
+  prefixes are not unique. For example, every key prefix for the left-most path down the tree will always have a 
   prefix of `[0; 32]`. The height parameter helps disambiguate this.
 * `left_child_hash` and `right_child_hash` are the hashes of the left and right child noes respectively, and have 
   length `KEY_LENGTH_BYTES`.