go-ethereum/trie
rjl493456442 35e0525bf4 core, eth/protocols/snap, trie: fix cause for snap-sync corruption, implement gentrie (#29313)
This pull request defines a gentrie for snap sync purpose.

The stackTrie is used to generate the merkle tree nodes upon receiving a state batch. Several additional options have been added into stackTrie to handle incomplete states (either missing states before or after).

In this pull request, these options have been relocated from stackTrie to genTrie, which serves as a wrapper for stackTrie specifically for snap sync purposes.

Further, the logic for managing incomplete state has been enhanced in this change. Originally, there are two cases handled:

-    boundary node filtering
-    internal (covered by extension node) node clearing

This changes adds one more:

- Clearing leftover nodes on the boundaries.

This feature is necessary if there are leftover trie nodes in database, otherwise node inconsistency may break the state healing.
2024-04-17 07:22:00 +02:00
..
testutil all: implement path-based state scheme (#25963) 2023-08-01 15:17:32 +03:00
trienode cmd, core, trie: verkle-capable `geth init` (#28270) 2023-11-14 13:09:40 +01:00
triestate all: activate pbss as experimental feature (#26274) 2023-08-10 22:21:36 +03:00
utils cmd, core, trie: verkle-capable `geth init` (#28270) 2023-11-14 13:09:40 +01:00
committer.go all: remove the dependency from trie to triedb (#28824) 2024-02-13 14:49:53 +01:00
database_test.go all: remove the dependency from trie to triedb (#28824) 2024-02-13 14:49:53 +01:00
encoding.go trie: reduce allocs in recHash (#27770) 2023-08-18 22:41:19 +02:00
encoding_test.go trie: reduce allocs in recHash (#27770) 2023-08-18 22:41:19 +02:00
errors.go cmd, core/state, eth, tests, trie: improve state reader (#27428) 2023-06-20 15:31:45 -04:00
hasher.go trie: spelling - fix comments in hasher (#28507) 2023-11-14 14:27:07 +01:00
iterator.go ethdb/memorydb, trie: reduced allocations (#28473) 2023-11-15 16:20:34 +01:00
iterator_test.go all: remove the dependency from trie to triedb (#28824) 2024-02-13 14:49:53 +01:00
node.go core, trie: rework trie database (#26813) 2023-04-24 10:38:52 +03:00
node_enc.go core, trie: rework trie database (#26813) 2023-04-24 10:38:52 +03:00
node_test.go trie: improve node rlp decoding performance (#25357) 2022-08-19 00:39:47 +02:00
proof.go all: fix typos in comments (#28881) 2024-02-05 22:16:32 +01:00
proof_test.go all: remove the dependency from trie to triedb (#28824) 2024-02-13 14:49:53 +01:00
secure_trie.go all: remove the dependency from trie to triedb (#28824) 2024-02-13 14:49:53 +01:00
secure_trie_test.go all: remove the dependency from trie to triedb (#28824) 2024-02-13 14:49:53 +01:00
stacktrie.go core, eth/protocols/snap, trie: fix cause for snap-sync corruption, implement gentrie (#29313) 2024-04-17 07:22:00 +02:00
stacktrie_fuzzer_test.go core, eth/protocols/snap, trie: fix cause for snap-sync corruption, implement gentrie (#29313) 2024-04-17 07:22:00 +02:00
stacktrie_test.go core, eth/protocols/snap, trie: fix cause for snap-sync corruption, implement gentrie (#29313) 2024-04-17 07:22:00 +02:00
sync.go trie: remove inconsistent trie nodes during sync in path mode (#28595) 2023-12-08 14:28:23 +01:00
sync_test.go all: remove the dependency from trie to triedb (#28824) 2024-02-13 14:49:53 +01:00
tracer.go all: implement path-based state scheme (#25963) 2023-08-01 15:17:32 +03:00
tracer_test.go all: remove the dependency from trie to triedb (#28824) 2024-02-13 14:49:53 +01:00
trie.go all: remove the dependency from trie to triedb (#28824) 2024-02-13 14:49:53 +01:00
trie_id.go cmd, core, eth, les, light: track deleted nodes (#25757) 2022-09-27 10:01:02 +02:00
trie_reader.go all: remove the dependency from trie to triedb (#28824) 2024-02-13 14:49:53 +01:00
trie_test.go core, eth/protocols/snap, trie: fix cause for snap-sync corruption, implement gentrie (#29313) 2024-04-17 07:22:00 +02:00
verkle.go all: remove the dependency from trie to triedb (#28824) 2024-02-13 14:49:53 +01:00
verkle_test.go all: remove the dependency from trie to triedb (#28824) 2024-02-13 14:49:53 +01:00