Skip to content

Conversation

@eomti-wm
Copy link
Contributor

Fix sync recovery after abnormal termination

Summary

Enables state recovery for blocks with missing state tries (e.g., after kill -9) by falling back to sidechain insertion logic instead of discarding them.

Details

  • Problem: ErrPrunedAncestor caused by missing state after abnormal shutdown triggered immediate block discard, permanently blocking sync.
  • Fix: Removed the discard logic to allow insertSideChain() to handle these cases.
  • Result: insertSideChain() detects the need for reorg and executes its internal state recovery logic, allowing the node to heal the chain state automatically.

@eomti-wm eomti-wm self-assigned this Dec 12, 2025
@eomti-wm eomti-wm added the bug Something isn't working label Dec 12, 2025
@eomti-wm eomti-wm merged commit adf7258 into dev Dec 12, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants