From 3c66f674600cffaade399187681f2b56460ac540 Mon Sep 17 00:00:00 2001 From: madisoncarter1234 Date: Fri, 28 Nov 2025 15:12:00 -0500 Subject: [PATCH] docs: Fix typos in documentation and test comments MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixed the following typos: - README.md: "ether" → "either" (line 65) - README.md: "Chilidren" → "Children" (line 154) - cli/README.md: "lenth" → "length" (line 41) - src/storage/engine.rs: "similiar" → "similar" (line 3492) --- README.md | 4 ++-- cli/README.md | 2 +- src/storage/engine.rs | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index a8498a20..c4481f7d 100644 --- a/README.md +++ b/README.md @@ -62,7 +62,7 @@ Database is broken down in to pages, each page has 4 KB size. * Snapshot ID (8 bytes) * This is the Version when page is created. * Page content (4088 bytes) - * This is ether root page or subtrie page. + * This is either root page or subtrie page. ```mermaid block-beta @@ -151,7 +151,7 @@ block-beta ### Branch Node -Due to the exponential decrease in Trie density as deeper portions of the Trie are traversed, we expect the overwhelming majority of Branch nodes to contain a small number of children (2-4) and short prefix (0-4 nibbles), but also expect the top portion of the Trie to primarily consist of nearly-16-child Branches with 0 additional prefix. In order to keep the encoded size of a Branch node relatively stable as individual children are inserted and removed, we choose to use a variable branching factor for the Branch node based on the number of children it contains. Based on the value of the Chilidren Bitmask, the Branch will contain 2, 4, 8, or 16 Child slots in order to only resize the Branch node on each doubling of Child occupancy. +Due to the exponential decrease in Trie density as deeper portions of the Trie are traversed, we expect the overwhelming majority of Branch nodes to contain a small number of children (2-4) and short prefix (0-4 nibbles), but also expect the top portion of the Trie to primarily consist of nearly-16-child Branches with 0 additional prefix. In order to keep the encoded size of a Branch node relatively stable as individual children are inserted and removed, we choose to use a variable branching factor for the Branch node based on the number of children it contains. Based on the value of the Children Bitmask, the Branch will contain 2, 4, 8, or 16 Child slots in order to only resize the Branch node on each doubling of Child occupancy. Note that a Branch Node with a non-empty Path Prefix is treated as both an Extension Node and a Branch Node for the purpose of RLP encoding and merkleization, and must be hashed twice. diff --git a/cli/README.md b/cli/README.md index fd0c46c4..84c49ef0 100644 --- a/cli/README.md +++ b/cli/README.md @@ -38,7 +38,7 @@ Current stats, all presented with minimum, maximum, and mean: * Bytes per page * Depth of trie in nodes * Depth of trie in pages - * Path prefix lenth + * Path prefix length * Number of children per branch * Node size in bytes diff --git a/src/storage/engine.rs b/src/storage/engine.rs index 04dd1557..c97d6cc2 100644 --- a/src/storage/engine.rs +++ b/src/storage/engine.rs @@ -3483,7 +3483,7 @@ mod tests { storage_engine.get_page(&context, context.root_node_page_id.unwrap()).unwrap(); let root_subtrie_contents_before = root_subtrie_page.contents().to_vec(); - // WHEN: an account with a similiar but divergent path is deleted + // WHEN: an account with a similar but divergent path is deleted let address_nibbles = Nibbles::unpack(hex!( "0xf80f21938e5248ec70b870ac1103d0dd01b7811550a7ffffffffffffffffffff" ));