go-ethereum/core/overlay
binary-mesh 0a04487cd8 core/overlay: prevent silent transition state restart on decode failure
When gob.Decode fails in LoadTransitionState, the function previously
returned nil, which triggered the fallback path that creates a fresh
TransitionState{Ended: isVerkle}. On a verkle-enabled node, this would
incorrectly mark the transition as complete, potentially causing the
node to use BinaryTrie for a partially-transitioned state.

Instead of returning nil, return a non-nil TransitionState with both
Started and Ended set to false. This ensures:
- InTransition() returns false (no partial transition in progress)
- Transitioned() returns false (transition has not completed)
- The fallback path is not triggered, preventing incorrect state

The root hash is also logged in the error message to aid debugging
corruption incidents.
2026-04-16 11:47:34 +03:00
..
state_transition.go core/overlay: prevent silent transition state restart on decode failure 2026-04-16 11:47:34 +03:00