Files
consensus/engine
zeekayandHanzo Dev 57e3e43a4f fix(engine/chain): RED-round convergence hardening — tunable settle (N4), K-recheck (N2), proven-loser parent filter (N1)
RED review of v1.35.1 returned 0 critical / 0 high (SAFETY SOUND — height-only slot
= 2α>n impossibility; cross-epoch forgery refuted; wire byte-identical). This closes
the actionable liveness/robustness findings ahead of testnet/mainnet promotion. The
core slot/cert path is UNCHANGED — no re-review needed there.

N4 (M-liveness gate): the vote-convergence settle window is now an INDEPENDENTLY
tunable Params.ConvergenceSettleWindow (0 = auto RoundTO/2). Prod RoundTO 250-400ms
yields a 150ms auto window — too tight for a WAN validator set whose p99 sibling
gossip is 100-300ms, where a node could mis-settle and bind its one height-only vote
to a non-global-min block (an unrecoverable split under vote-once). Operators can now
lengthen the settle for WAN latency WITHOUT slowing the round cadence. A 150ms floor
still guards a misconfigured near-zero value.

N2: convergenceLoopWithCtx re-checks K() every tick instead of capturing it once at
goroutine start — a net that grows K==1→K>1 without an engine restart now begins
converging the moment the set expands.

N1: snapshotVotableSlotsLocked skips a fork slot whose PARENT is a proven loser (a
strictly-lower-canonical H-1 sibling is tracked), so a node never wastes its one
height-H signature on a child of an eventually-pruned H-1 parent (the transient
H-1-fork stall). Conservative: an UNTRACKED parent (finalized tip / behind) is never
filtered, so the normal H=finalizedHeight+1 path cannot be starved.

M-grind (DOCUMENTED, testnet/mainnet gate — not safety/halt): the winner tie-break is
the proposer-controlled content hash (CanonicalID), grindable under multi-proposer
contention to censor/extract; bounded to the fresh-net/down-proposer transient (no
effect at a single-proposer height); grind-resistant VRF tie-break (proposervm
eligibility VRF) is the tracked follow-up before adversarial-validator mainnet.

Tests: TestConvergence_SettleWindow_OperatorOverride, ..._ParentProvenLoser_
ExcludesDeadBranch, TestVoteGuard_LegacyMultiEpochFold (N3). Storm gates still
converge (5-way, 24 heights, single head; f=1); full engine/chain suite green; vet clean.

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