You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A fork whose common ancestor lies inside a finality-straddling chunk cannot
resume at fin+1: that is a mid-chunk position, and insert_fork only replaces
whole chunks, so the commit wedges the dataset on a 60s restart loop. Resuming
below fin instead — the fallback's behaviour — silently rewrites the finalized
prefix (GAP-22). An honest tip reorg triggers this whenever fin sits inside the
head chunk, which is the common case, not just equivocation.
Resolve the fork at the stored chunk boundary (which may sit at or below fin)
and move the finalized-prefix guard to the write path: a replacement reaching
into the finalized region is admitted only when it reproduces the finalized
block's hash there, and must span fin so the whole-chunk rewrite never
transiently drops it; otherwise it is refused atomically. This keeps the
existing whole-chunk replace — no chunk-splitting primitive — and routes every
equivocation shape through one loud, bounded 60s loop instead of the clamp's
silent retry spin. Honest reorgs above finality now recover.
Pinned by seven write-controller unit tests and three ct4_finality black-box
scenarios (equivocation refused at both the window floor and a straddling
chunk; honest reorg recovers) — the recovery scenario was verified red against
the clamp.
Co-Authored-By: Claude Opus 4.8 <[email protected]>
0 commit comments