Commit c31d813f43f46685b99765569f61cd875ad1d379
refine typos
Mahnush Movahedi authored on 12/21/2017, 11:08:36 PMGitHub committed on 12/21/2017, 11:08:36 PM
Parent: abf4bacf2c5b7c291e72cc6ea10066e31f23080f
Files changed
docs/spec.md | changed |
docs/spec.md | |||
---|---|---|---|
@@ -1,18 +1,17 @@ | |||
1 | -This documnet provides the structure of the Dfinities Radix Tree which is a type of the Merkle tree.(https://ipfs.io/ipns/QmdJiuMWp2FxyaerfLrtdLF6Nr1EWpL7dPAxA9oKSPYYgV/wiki/Radix_tree.html). | ||
2 | -Our radix tree data structure consists of Nodes. | ||
1 … | +This documnet provides the structure of the Dfinity's Radix Tree.(https://ipfs.io/ipns/QmdJiuMWp2FxyaerfLrtdLF6Nr1EWpL7dPAxA9oKSPYYgV/wiki/Radix_tree.html). | ||
2 … | +Our radix tree data structure stores the key-valus; the tree nsists of Nodes that contains the value and the key is the path to the node in the tree. | ||
3 | 3 … | ||
4 | 4 … | ## Node | |
5 | -Each node has a type and contains at the most four elements | ||
5 … | +Each node has a type and contains at most four elements: | ||
6 | 6 … | "extension", "left branch", "right branch" and "value". | |
7 | 7 … | ||
8 | 8 … | ``` | |
9 | 9 … | node : = TYPE | EXTENSION | LBRANCH | RBRANCH | VALUE | |
10 | 10 … | ``` | |
11 | 11 … | ||
12 | 12 … | ### Type | |
13 | -Contains a byte that the last 4 bits are used to signify which elements a node contains. | ||
14 | -The bit field is defined a the following. The first 4 bits are paded to zero while in storage. These bits are reserved as insicators of type when sending the nodes to other clients which we will describe later. | ||
13 … | +The type feild contains a byte. The first 4 bits are paded to zero while the Node is stored in the tree. These bits are reserved as insicators of type when sending the nodes to other clients which we will describe later. The last 4 bits are used to signify which elements a node contains. The bit field is defined a the following | ||
15 | 14 … | ||
16 | 15 … | ``` | |
17 | 16 … | Type := 0 | 0 | 0 | 0 | HasEXTENSION | HasLBRANCH | HasRBRANCH | HasVALUE | |
18 | 17 … | ``` |
Built with git-ssb-web