Skip to content

Commit 16c6887

Browse files
Update README.md
1 parent 04fb12c commit 16c6887

File tree

1 file changed

+17
-2
lines changed

1 file changed

+17
-2
lines changed

README.md

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,12 @@ console.log(JSON.stringify(brain, undefined, 2))
4747

4848
```
4949

50-
## PATRICIA Tries
50+
## Radix Tree
51+
A Radix Tree is a compressed version of a trie - see [this introduction](https://www.youtube.com/watch?v=E8ZGt2i3xkw)
52+
<img width="947" alt="Screenshot 2022-01-07 at 08 50 31" src="https://user-images.githubusercontent.com/43786652/148510487-e0868c68-409e-4d58-9e52-b7c7324ae041.png">
53+
54+
There are several variations of Radix Trees. In some cases there is no consistent naming / definition to be found (yet?).
55+
A rather famous variation of a Radix Tree is the PATRICIA Trie:
5156
**P** Practical
5257
**A** Algorithm
5358
**T** To
@@ -57,7 +62,17 @@ console.log(JSON.stringify(brain, undefined, 2))
5762
**I** In
5863
**A** Alphanumeric
5964

60-
PATRICIA Tries are Radix Trees with the [radix 2](https://cs.stackexchange.com/questions/63048/what-is-the-difference-between-radix-trees-and-patricia-tries). They became especially famous because in the Ethereum Blockchain pretty much everything (state trie, transaction trie, receipt trie, ...) is stored in PATRICIA Tries. For details I can recommend [this video](https://www.youtube.com/watch?v=OxofT39TJgg).
65+
PATRICIA Tries are Radix Trees with the [radix 2](https://cs.stackexchange.com/questions/63048/what-is-the-difference-between-radix-trees-and-patricia-tries).
66+
[Merkle PATRICIA Tries aka Merkle PATRICIA trees](https://www.skypack.dev/view/merkle-patricia-tree) became especially famous as in the Ethereum Blockchain pretty much everything (state trie, transaction trie, receipt trie, ...) is stored in those kinds of data structures. For details I can recommend [this video](https://www.youtube.com/watch?v=OxofT39TJgg). Keep in mind that (currently) some people use different words for the same thing and some people use the same word for different things in these contexts.
67+
68+
## Merkle PATRICIA Trie / Tree
69+
70+
```ts
71+
import merklePatriciaTree from 'https://cdn.skypack.dev/merkle-patricia-tree'
72+
73+
// For specific usage examples you might check https://www.skypack.dev/view/merkle-patricia-tree
74+
```
75+
6176

6277
### Usage Examples
6378
... Under Construction ...

0 commit comments

Comments
 (0)