go-ethereum/core/state/snapshot
rjl493456442 d3c4466edd
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-16 09:05:36 +02:00
..
context.go core/state/snapshot: detect and clean up dangling storage snapshot in generation (#24811) 2022-05-23 13:26:22 +03:00
conversion.go core, eth/protocols/snap, trie: fix cause for snap-sync corruption, implement gentrie (#29313) 2024-04-16 09:05:36 +02:00
difflayer.go all: remove dependency on golang.org/exp (#29314) 2024-03-25 07:50:18 +01:00
difflayer_test.go all: remove deprecated uses of math.rand (#26710) 2023-02-16 14:36:58 -05:00
disklayer.go all: remove the dependency from trie to triedb (#28824) 2024-02-13 14:49:53 +01:00
disklayer_test.go all: fix typos in comments (#28881) 2024-02-05 22:16:32 +01:00
generate.go all: remove the dependency from trie to triedb (#28824) 2024-02-13 14:49:53 +01:00
generate_test.go all: remove the dependency from trie to triedb (#28824) 2024-02-13 14:49:53 +01:00
holdable_iterator.go all: update license headers and AUTHORS from git history (#24947) 2022-05-24 20:39:40 +02:00
holdable_iterator_test.go all: update license headers and AUTHORS from git history (#24947) 2022-05-24 20:39:40 +02:00
iterator.go core: fix typo in iterator.go (#23502) 2021-08-31 10:21:42 +02:00
iterator_binary.go snapshot, trie: fixed typos, mostly in snapshot pkg (#22133) 2021-01-07 08:36:21 +02:00
iterator_fast.go all: remove dependency on golang.org/exp (#29314) 2024-03-25 07:50:18 +01:00
iterator_test.go all: remove deprecated uses of math.rand (#26710) 2023-02-16 14:36:58 -05:00
journal.go all: remove the dependency from trie to triedb (#28824) 2024-02-13 14:49:53 +01:00
metrics.go all: fix spelling mistakes (#25961) 2022-10-11 09:37:00 +02:00
snapshot.go tests: fix goroutine leak related to state snapshot generation (#28974) 2024-02-14 17:02:56 +01:00
snapshot_test.go all: use uint256 in state (#28598) 2024-01-23 14:51:58 +01:00
utils.go core/state/snapshot, core/types, eth: move account definition to type (#27323) 2023-06-06 11:17:39 +03:00