Files
consensus/engine
zeekay b371706134 fix(engine): consume build demand on BuildBlock error instead of holding it (kills the non-leader spin)
buildBlocksLocked held pendingBuildBlocks on a BuildBlock error and returned 'will retry
next tick', so the very next Notify re-called BuildBlock. Under single-proposer scheduling
a non-leader's BuildBlock ALWAYS fails ('not our proposer slot') until its window opens, so
the held demand became an unbounded hot loop — 4 of 5 nodes burning CPU rebuilding a slot
they can never win (observed alongside the mainnet rebuild storm). Mirror avalanchego: consume
the demand per attempt (decrement before the call), and on error clear any remaining queued
demand (it would fail identically this tick) and wait for a FRESH trigger — the node's slot
opening (proposervm WaitForEvent) or the elected leader's block advancing our tip. Liveness
preserved; log downgraded Error→Debug so a healthy fleet is quiet. Tests updated to assert the
new consume-on-error invariant (no spin, no accumulation, recovery via fresh Notify).
2026-07-15 19:14:14 -07:00
..
2025-12-19 08:49:11 -08:00