Files
consensus/engine
zeekayandHanzo Dev 5277183b7b consensus: reconcile fails CLOSED when the VM head is present-but-unreadable (RED fail-open fix)
RED found a fail-OPEN in ReconcilePhantomFloor: it derived the intrinsic-guard
localVM via localLastAccepted, which returns (id,0,nil) when VM.GetBlock fails —
so a transiently-unreadable VM (exactly the recovery regime: a corrupt/half-
written store) was treated as height 0, degrading the guard to max(target,0)=
target. A node whose VM is actually AHEAD would then abandon its own committed
range (a self-inflicted fork).

Fix: read the VM directly and distinguish three cases —
  - VM.LastAccepted errors                -> refuse (fail-closed, floor unchanged)
  - LastAccepted is a real id, unreadable -> refuse (present-but-corrupt; never 0)
  - LastAccepted is ids.Empty             -> genuinely empty (fresh/wiped): 0 is
                                             correct, reconcile proceeds/no-ops
Tests: unreadable head -> refuse + floor unchanged; empty VM -> proceeds (target
governs). v1.35.10.

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