Files
consensus/engine
zeekayandHanzo Dev 83fad2dd6d consensus: fail-closed finalize→VM-accept (fix 2b) — decided-floor never runs ahead of the EVM
Root cause of the testnet VM-layer lag: applyBranchFinalization swallowed VM.Accept's error
(_ = vmb.Accept(ctx)) and marked the block finalized + advanced decidedFloor/finalizedThrough
regardless. When the EVM refused a consensus-finalized block (empty-block rejection), consensus
finalized it anyway and the durable floor ran AHEAD of the EVM accepted head (floor 427 while
EVM stuck at 415) — a permanent divergence.

FIX (fail-closed): VM.Accept is now called BEFORE committing a block's finality and its error
is CHECKED. applyBranchFinalization accepts ascending, commits each block's finality only after
the VM applied it, STOPS at the first VM.Accept error, and returns highestAccepted =
the highest height the VM actually applied. acceptWithCertCore advances the durable floor ONLY
to highestAccepted (never past it) and propagates the error — the chain HALTS at an un-appliable
block rather than diverging. Losers are pruned + the serving cert stored only on a full clean
accept. This kills the divergence at its source (defense-in-depth even after the VM-side fix
that makes finalized-empty blocks appliable). Existing finalize/cert/accept/view-change/RED
suites green.

Co-authored-by: Hanzo Dev <[email protected]>
2026-07-02 09:15:00 -07:00
..
2025-12-19 08:49:11 -08:00