go-ethereum/eth/protocols/snap
rjl493456442 7122ecc3eb
Some checks are pending
/ Linux Build (push) Waiting to run
/ Linux Build (arm) (push) Waiting to run
/ Keeper Build (push) Waiting to run
/ Windows Build (push) Waiting to run
/ Docker Image (push) Waiting to run
eth/protocols/snap: remove uncovered states before resuming (#35159)
This PR fixes an issue where flat states are continuously persisted
during downloadState, while the sync journal is only persisted at the
end of Sync.

As a result, an unclean shutdown can leave the on-disk flat state ahead
of the journal markers. Some persisted entries may be stale (storage
slots that should have been deleted), and these dangling entries are not
detected or fixed by subsequent state downloads.

To address this, this PR introduces a cleanup step before state
downloading begins. It removes all state entries that are not covered by
the persisted journal markers.
2026-06-17 13:44:12 +08:00
..
bal_apply.go eth/downloader, eth/protocols/snap: freeze pivot once state is downloaded (#35155) 2026-06-15 16:09:41 +08:00
bal_apply_test.go eth/protocols/snap: remove uncovered states before resuming (#35159) 2026-06-17 13:44:12 +08:00
discovery.go core, eth: split eth package, implement snap protocol (#21482) 2020-12-14 10:27:15 +01:00
gentrie.go eth/protocols/snap: cleanup dangling account trie nodes due to incomplete storage (#30258) 2024-08-12 10:43:54 +02:00
gentrie_test.go common, eth: remove duplicate test cases (#32624) 2025-09-19 17:20:44 -06:00
handler.go eth/downloader, eth/protocols/snap: freeze pivot once state is downloaded (#35155) 2026-06-15 16:09:41 +08:00
handler_fuzzing_test.go core, eth/protocols/snap: Snap/2 Protocol + BAL Serving (#34083) 2026-04-03 14:10:32 +08:00
handler_test.go core/types/bal: update the BAL definition to the latest spec (#34799) 2026-04-26 23:32:39 +08:00
handlers.go core, eth/protocols/snap, eth/downloader: snap/2 sync logic (#34626) 2026-06-11 14:45:07 +08:00
metrics.go eth/protocols/snap: add healing and syncing metrics (#32258) 2025-07-24 16:43:04 +08:00
peer.go core, eth/protocols/snap, eth/downloader: snap/2 sync logic (#34626) 2026-06-11 14:45:07 +08:00
progress_test.go eth/downloader, eth/protocols/snap: freeze pivot once state is downloaded (#35155) 2026-06-15 16:09:41 +08:00
protocol.go eth/downloader, eth/protocols/snap: freeze pivot once state is downloaded (#35155) 2026-06-15 16:09:41 +08:00
range.go eth/protocols/snap: optimize incHash (#32748) 2025-10-10 13:48:25 +08:00
range_test.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.go core, eth/protocols/snap, eth/downloader: snap/2 sync logic (#34626) 2026-06-11 14:45:07 +08:00
sync_test.go core, eth/protocols/snap, eth/downloader: snap/2 sync logic (#34626) 2026-06-11 14:45:07 +08:00
syncer.go eth, triedb, internal: add snap/2 sync progress (#35178) 2026-06-17 13:43:51 +08:00
syncv2.go eth/protocols/snap: remove uncovered states before resuming (#35159) 2026-06-17 13:44:12 +08:00
syncv2_test.go eth/protocols/snap: remove uncovered states before resuming (#35159) 2026-06-17 13:44:12 +08:00