Files
consensus/config
zeekayandHanzo Dev bdbbc0185b consensus: integrate round-scoped view-change into engine + round-skip + alpha-bound (RED fixes)
Engine integration (params.ViewChange, default off — opt-in/owner-gated per net):
- Prevote wire (domain LUX/chain/prevote/v1) + QuorumGossiper.BroadcastPrevote + HandleIncomingPrevote.
- runViewChangePass/stepViewChange driver: fluid prevote -> POL -> precommit+lock; precommit
  reuses the existing per-block cert machinery (all round logic in the prevote/POL/lock layer).
- reserveSlotForSign RELAXED under ViewChange (round+lock governs) but the DURABLE decided-floor
  (PART-A/HIGH-1 finalized gate) is untouched; proposer PREVOTES its own block (recordOwnVoteLocked
  skipped under VC); pruneViewsBelow on finalize.

RED review fixes (c7b2f0081):
1. ROUND-SKIP (noteSender): jump to a round with >=f+1 senders — eliminates the residual ~3%
   asymmetric-gossip freeze. Non-uniform-visibility honest liveness now 0/200 stalls.
2. ALPHA-BOUND: roundView carries n/f; safeConfig()=2a-n>f; runViewChangePass REFUSES (fail-secure
   halt) if the committee is unsafe. RED's alpha=3@n=5 fork proof retained as the tightness gate.
3. PRECOMMIT bound to the POL round (validRound), not the drifted current round.
4. POL-cert gossip (polCert + prevoteSigs relay) + locked-precommit re-broadcast so a laggard that
   missed prevotes/precommits during a split still converges.

Proven (clean testcache, -race): RED equivocator suite (no fork, always converges), 0/200
non-uniform stalls, alpha=3 fork tightness, split->heal converges through the FULL engine
(TestViewChange_CompetingFork_AsymmetricSplit_Converges); legacy path (VC off) unchanged.
Remaining: storm -race skip removal, durable lock persist, reconciliation, node v1.32.13, testnet.

Co-authored-by: Hanzo Dev <[email protected]>
2026-07-02 07:18:06 -07:00
..