Skip to content

Commit 8b89990

Browse files
authored
Update broken link (#1434)
1 parent 8fdb11d commit 8b89990

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

docs/programmers_guide/guide.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ Binary 32-byte (256-bit) string.
4040
By root here one means the Merkle root of the smart contract storage, organised into a tree. Non-contract accounts cannot have storage,
4141
therefore root makes sense only for smart contract accounts. For non-contract accounts, the root field is assumed to be equal to the
4242
Merkle root of an empty tree, which is hard-coded in the variable `EmptyRoot` in
43-
[trie/trie.go](../../trie/trie.go). For contract accounts, the root is computed using member function `Hash` of
44-
type `Trie` [trie/trie.go](../../trie/trie.go), once the storage of the contract has been organised into the tree by calling member functions
43+
[turbo/trie/trie.go](../../turbo/trie/trie.go). For contract accounts, the root is computed using member function `Hash` of
44+
type `Trie` [turbo/trie/trie.go](../../turbo/trie/trie.go), once the storage of the contract has been organised into the tree by calling member functions
4545
`Update` and `Delete` on the same type.
4646

4747
#### Code hash
@@ -112,22 +112,22 @@ Merkle Patricia tree hashing rules first remove redundant parts of each key with
112112
pairs so-called "leaf nodes". To produce the hash of a leaf node, one applies the hash function to the two-piece RLP (Recursive Length Prefix).
113113
The first piece is the representation of the non-redundant part of the key. And the second piece is the
114114
representation of the leaf value corresponding to the key, as shown in the member function `hashChildren` of the
115-
type `hasher` [trie/hasher.go](../../trie/hasher.go), under the `*shortNode` case.
115+
type `hasher` [turbo/trie/hasher.go](../../turbo/trie/hasher.go), under the `*shortNode` case.
116116

117117
Hashes of the elements within a prefix group are combined into so-called "branch nodes". They correspond to the
118-
types `duoNode` (for prefix groups with exactly two elements) and `fullNode` in the file [trie/node.go](../../trie/node.go).
118+
types `duoNode` (for prefix groups with exactly two elements) and `fullNode` in the file [turbo/trie/node.go](../../turbo/trie/node.go).
119119
To produce the hash of a branch node, one represents it as an array of 17 elements (17-th element is for the attached leaf,
120120
if exists).
121121
The positions in the array that do not have corresponding elements in the prefix group are filled with empty strings. This is
122-
shown in the member function `hashChildren` of the type `hasher` [trie/hasher.go](../../trie/hasher.go), under the `*duoNode` and
122+
shown in the member function `hashChildren` of the type `hasher` [turbo/trie/hasher.go](../../turbo/trie/hasher.go), under the `*duoNode` and
123123
`*fullNode` cases.
124124

125125
Sometimes, nested prefix groups have longer prefixes than 1-digit extension of their encompassing prefix group, as it is the case
126126
in the group of items `12, 13` or in the group of items `29, 30, 31`. Such cases give rise to so-called "extension nodes".
127127
However, the value in an extension node is always the representation of a prefix group, rather than a leaf. To produce the hash of an extension node,
128128
one applies the hash function to the two-piece RLP. The first piece is the representation of the non-redundant part of the key.
129129
The second part is the hash of the branch node representing the prefix group. This shown in the member function `hashChildren` of the
130-
type `hasher` [trie/hasher.go](../../trie/hasher.go), under the `*shortNode` case.
130+
type `hasher` [turbo/trie/hasher.go](../../turbo/trie/hasher.go), under the `*shortNode` case.
131131

132132
This is the illustration of resulting leaf nodes, branch nodes, and extension nodes for our example:
133133

@@ -255,7 +255,7 @@ HASH 1
255255
BRANCH 0123
256256
```
257257

258-
These opcodes are implemented by the type `HashBuilder` (implements the interface `structInfoReceiver`) in [trie/hashbuilder.go](../../trie/hashbuilder.go)
258+
These opcodes are implemented by the type `HashBuilder` (implements the interface `structInfoReceiver`) in [turbo/trie/hashbuilder.go](../../turbo/trie/hashbuilder.go)
259259

260260
### Multiproofs
261261

@@ -385,7 +385,7 @@ In the deeper recursive step, max common prefix is empty. Since the common prefi
385385
the common prefix with the succeeding key (they are both empty). The optional part of the step happens, opcode `BRANCH 0123`
386386
is emitted, and `groups` is trimmed to become empty. No recursive invocation follows.
387387

388-
The step of this algorithm is implemented by the function `GenStructStep` in [trie/gen_struct_step.go](../../trie/gen_struct_step.go).
388+
The step of this algorithm is implemented by the function `GenStructStep` in [turbo/trie/gen_struct_step.go](../../turbo/trie/gen_struct_step.go).
389389

390390
### Converting sequence of keys and value into a multiproof
391391

@@ -407,7 +407,7 @@ However, in order to make these choices efficiently, the set of keys being resol
407407
list. Then, at each point when the algorithm processes a key, it maintains references to two consecutive keys from
408408
that sorted list - one "LTE" (Less Than or Equal to the currently processed key), and another "GT" (Greater Than the
409409
currently processed key). If max common prefix is also prefix of either LTE or GT, then `BRANCH` opcode is emitted,
410-
otherwise, `BRANCHHASH` opcode is emitted. This is implemented by the type `ResolveSet` in [trie/resolve_set.go](../../trie/resolve_set.go)
410+
otherwise, `BRANCHHASH` opcode is emitted. This is implemented by the type `ResolveSet` in [turbo/trie/resolve_set.go](../../turbo/trie/resolve_set.go)
411411

412412
### Extension of the structure to support contracts with contract storage
413413
When it is required to construct tries containing accounts as well as contract storage, and contract code, the
@@ -501,7 +501,7 @@ Then delete this account (SELFDESTRUCT).
501501
will not process any incoming block that time. To protect against this attack:
502502
PlainState, HashedState and IntermediateTrieHash buckets have "incarnations". Account entity has field "Incarnation" -
503503
just a digit which increasing each SELFDESTRUCT or CREATE2 opcodes. Storage key formed by:
504-
`{account_key}{incarnation}{storage_hash}`. And [trie/trie_root.go](../../trie/trie_root.go) has logic - every time
504+
`{account_key}{incarnation}{storage_hash}`. And [turbo/trie/trie_root.go](../../turbo/trie/trie_root.go) has logic - every time
505505
when Account visited - we save it to `accAddrHashWithInc` variable and skip any Storage or IntermediateTrieHashes with another incarnation.
506506

507507
Transaction processing

turbo/trie/trie_root.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ Then delete this account (SELFDESTRUCT).
6161
will not process any incoming block that time. To protect against this attack:
6262
PlainState, HashedState and IntermediateTrieHash buckets have "incarnations". Account entity has field "Incarnation" -
6363
just a digit which increasing each SELFDESTRUCT or CREATE2 opcodes. Storage key formed by:
64-
`{account_key}{incarnation}{storage_hash}`. And [trie/trie_root.go](../../trie/trie_root.go) has logic - every time
64+
`{account_key}{incarnation}{storage_hash}`. And [turbo/trie/trie_root.go](../../turbo/trie/trie_root.go) has logic - every time
6565
when Account visited - we save it to `accAddrHashWithInc` variable and skip any Storage or IntermediateTrieHashes with another incarnation.
6666
*/
6767

0 commit comments

Comments
 (0)