go-ethereum/eth/protocols/snap
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
..
discovery.go core, eth: split eth package, implement snap protocol (#21482) 2020-12-14 10:27:15 +01:00
gentrie_test.go core, eth/protocols/snap, trie: fix cause for snap-sync corruption, implement gentrie (#29313) 2024-04-16 09:05:36 +02:00
gentrie.go core, eth/protocols/snap, trie: fix cause for snap-sync corruption, implement gentrie (#29313) 2024-04-16 09:05:36 +02:00
handler_fuzzing_test.go core: move genesis alloc types to core/types (#29003) 2024-02-16 19:05:33 +01:00
handler.go eth/protocols/snap: fix snap sync failure on empty storage range (#28306) 2023-10-13 09:08:26 +02:00
metrics.go core, eth/protocols/snap, trie: fix cause for snap-sync corruption, implement gentrie (#29313) 2024-04-16 09:05:36 +02:00
peer.go core,eth,internal: fix typo (#29024) 2024-02-20 19:42:48 +08:00
progress_test.go eth/protocols/snap: skip retrieval for completed storages (#29378) 2024-04-10 12:02:45 +03:00
protocol.go core/state/snapshot, core/types, eth: move account definition to type (#27323) 2023-06-06 11:17:39 +03:00
range_test.go eth/protocols/snap: fix snap sync failure on empty storage range (#28306) 2023-10-13 09:08:26 +02:00
range.go eth/protocols/snap: fix snap sync failure on empty storage range (#28306) 2023-10-13 09:08:26 +02:00
sort_test.go core, les, eth: port snap sync changes (#24898) 2022-07-15 14:55:51 +03:00
sync_test.go all: fix mismatched names in comments (#29348) 2024-03-26 21:01:28 +01:00
sync.go core, eth/protocols/snap, trie: fix cause for snap-sync corruption, implement gentrie (#29313) 2024-04-16 09:05:36 +02:00
tracker.go eth/protocols, prp/tracker: add support for req/rep rtt tracking (#22608) 2021-04-22 11:42:46 +03:00