Files
consensus/engine
zeekayandHanzo Dev f290db7e18 consensus: housekeeping — one ⅔ formula, leaf-lock doctrine (v1.35.16)
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]>
2026-07-02 17:48:59 -07:00
..
2025-12-19 08:49:11 -08:00