Skip to content

Commit

Permalink
update merkledb readme to specify key length is in bits (#2840)
Browse files Browse the repository at this point in the history
  • Loading branch information
Dan Laine authored Mar 14, 2024
1 parent 12cd5ec commit 4e2d005
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions x/merkledb/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,7 @@ Specifically, we encode these values in the following way:
+----------------------------------------------------+
| Value (variable length bytes) (optional) |
+----------------------------------------------------+
| Key length (varint) |
| Key bit length (varint) |
+----------------------------------------------------+
| Key (variable length bytes) |
+----------------------------------------------------+
Expand All @@ -392,7 +392,7 @@ Where:
* `Value existence flag` is `1` if this node has a value, otherwise `0`.
* `Value length` is the length of the value, if it exists (i.e. if `Value existence flag` is `1`.) Otherwise not serialized.
* `Value` is the value, if it exists (i.e. if `Value existence flag` is `1`.) Otherwise not serialized.
* `Key length` is the number of nibbles in this node's key.
* `Key length` is the number of bits in this node's key.
* `Key` is the node's key.

Note that, as with the node serialization format, the `Child index` values aren't necessarily sequential, but they are unique and strictly increasing.
Expand Down

0 comments on commit 4e2d005

Please sign in to comment.