go-ethereum/triedb
Jonny Rhea 8e8003acd3
triedb/pathdb: report nothing recoverable during state sync (#35400)
Restarting a node mid-snap-sync can crash-loop during startup chain
repair. On a restart mid-sync the pathdb is disabled (`waitSync`), so
repair rewinds the stateless head to genesis and asks `StateRecoverable`
if it can roll back there. `Recoverable` doesn't check `waitSync`, so it
reports genesis as recoverable, but `Recover` does and refuses with
`waiting for sync`, tripping a `log.Crit`. The flag is persisted, so the
node crash-loops on every restart.

CRIT Failed to recover state number=0 hash=37fcdc..6edf0b err="waiting
for sync"

The fix is to make `Recoverable` return false while a sync is running,
so it agrees with `Recover`. Repair then falls through to the existing
"wait state sync" path.
2026-07-23 14:26:01 +08:00
..
database trie: optimize memory allocation (#30932) 2025-03-25 14:59:44 +01:00
hashdb core, miner, tests: introduce codedb and simplify cachingDB (#33816) 2026-03-10 08:29:21 +01:00
internal triedb: reconcile stale storage roots in GenerateTrie, add cancel support (#34807) 2026-06-03 15:08:09 +08:00
pathdb triedb/pathdb: report nothing recoverable during state sync (#35400) 2026-07-23 14:26:01 +08:00
database.go triedb/pathdb: add AdoptSyncedState for snap/2 completion path (#34874) 2026-05-06 21:08:15 +08:00
generate.go eth, triedb, internal: add snap/2 sync progress (#35178) 2026-06-17 13:43:51 +08:00
generate_test.go eth, triedb, internal: add snap/2 sync progress (#35178) 2026-06-17 13:43:51 +08:00
history.go cmd, triedb: implement history inspection (#29267) 2024-03-22 20:12:10 +08:00
preimages.go all: remove the dependency from trie to triedb (#28824) 2024-02-13 14:49:53 +01:00
preimages_test.go triedb: add test suite for preimage store (#31574) 2025-05-05 14:01:53 +08:00
states.go all: update license comments and AUTHORS (#31133) 2025-02-05 23:01:17 +01:00