mirror of
https://github.com/luxfi/consensus.git
synced 2026-09-24 00:26:58 +00:00
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]>