mirror of
https://github.com/luxfi/consensus.git
synced 2026-09-24 00:26:58 +00:00
RED decomplect-review follow-ups (non-blocking), on top of v1.35.15: - ONE ⅔ supermajority formula: bftAlpha(count) = TwoThirdsStakeFloor(count)+1 is the single definition of the integer accept quorum; bftCommittee and the 1→N reclamp both call it. The count quorum and the stake quorum are now literally the same rational threshold, never two hand-inlined 2*x/3+1 copies that could drift. - Lock doctrine: the unlock-before-call-out comment now draws the exact CALL-OUT vs LEAF-LOCK boundary — external surfaces (VM, gossiper, ReceiveVote, poll delivery, callbacks) are banned under t.mu; acquiring an internal leaf lock (c.mu via t.consensus.*, the vote-guard store) is SAFE because the leaf never re-enters the engine and the order t.mu→c.mu is fixed and acyclic. - Removed the untracked round_view_red2_test.go scratch file. Formula consolidation is behavior-identical (2*x/3+1 == floor(2x/3)+1); full engine/chain suite green. Co-authored-by: Hanzo Dev <[email protected]>