go-ethereum/eth/protocols/snap
rjl493456442 1be5da2330
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: redo the snap sync if the bal is unavailable (#35181)
This PR introduces a new condition that if the local node falls behind
too much and the required BAL for catching up is very likely to be
unavailable, the entire snap sync will be restarting from scratch.

As the defined BAL retention window is weak-subjective-period which is
calculated dynamically. A more conservative threshold is used (90K
blocks) for robustness.

Apart from that, the BAL catchup will be divided into several spans and
apply one by one. It's essential to prevent the potential out-of-memory
panic of placing the entire BAL set in memory.
2026-06-17 09:57:08 +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/downloader, eth/protocols/snap: freeze pivot once state is downloaded (#35155) 2026-06-15 16:09:41 +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/downloader, eth/protocols/snap: freeze pivot once state is downloaded (#35155) 2026-06-15 16:09:41 +08:00
syncv2.go eth/protocols/snap: redo the snap sync if the bal is unavailable (#35181) 2026-06-17 09:57:08 +08:00
syncv2_test.go eth/protocols/snap: redo the snap sync if the bal is unavailable (#35181) 2026-06-17 09:57:08 +08:00