From 54de883f4c4fa1307c1fbc09dc21cb05648e50e6 Mon Sep 17 00:00:00 2001 From: Kritsada Dechawattana Date: Wed, 11 Dec 2024 16:55:09 +0700 Subject: [PATCH] refactor: correct example trie structure --- .../data-structures-and-encoding/patricia-merkle-trie/index.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/public/content/developers/docs/data-structures-and-encoding/patricia-merkle-trie/index.md b/public/content/developers/docs/data-structures-and-encoding/patricia-merkle-trie/index.md index b49d806937c..d7fe9e0e9c1 100644 --- a/public/content/developers/docs/data-structures-and-encoding/patricia-merkle-trie/index.md +++ b/public/content/developers/docs/data-structures-and-encoding/patricia-merkle-trie/index.md @@ -179,8 +179,7 @@ Now, we build such a trie with the following key/value pairs in the underlying D rootHash: [ <16>, hashA ] hashA: [ <>, <>, <>, <>, hashB, <>, <>, <>, [ <20 6f 72 73 65>, 'stallion' ], <>, <>, <>, <>, <>, <>, <>, <> ] hashB: [ <00 6f>, hashC ] - hashC: [ <>, <>, <>, <>, <>, <>, hashD, <>, <>, <>, <>, <>, <>, <>, <>, <>, 'verb' ] - hashD: [ <17>, [ <>, <>, <>, <>, <>, <>, [ <35>, 'coins' ], <>, <>, <>, <>, <>, <>, <>, <>, <>, 'puppy' ] ] + hashC: [ <>, <>, <>, <>, <>, <>, [ <17>, [ <>, <>, <>, <>, <>, <>, [ <35>, 'coins' ], <>, <>, <>, <>, <>, <>, <>, <>, <>, 'puppy' ] ], <>, <>, <>, <>, <>, <>, <>, <>, <>, 'verb' ] ``` When one node is referenced inside another node, what is included is `H(rlp.encode(node))`, where `H(x) = keccak256(x) if len(x) >= 32 else x` and `rlp.encode` is the [RLP](/developers/docs/data-structures-and-encoding/rlp) encoding function.