erhant 0135049710 fix(chain_state, sequencer, storage): rebuild the two-tier state on restart
- persist a final-tier snapshot (state + meta) atomically with the follow update that advanced it; on boot, anchor `final` on it and replay stored blocks above it as `head`, so a post-restart orphan of a not-yet-finalized block still reverts instead of silently diverging
- correlate orphan/finalize events by block hash: restored head entries carry hash-derived sentinel MsgIds (the real ones are not persisted)
- a finalized block chaining on an unfinalized head entry finalizes that prefix (finality is prefix-monotone)
- warn on (and keep ignoring) a same-height adopted competitor that arrives without its orphan sibling — an SDK-contract breach worth surfacing
- follow path reverts orphans via one batched `apply_channel_update` (single truncate + head re-derivation) instead of a re-derivation per orphan
- remove DESIGN.md, move to task docs instead
- trim very long comments / docstrings
2026-07-16 18:11:44 +03:00
..