Files
consensus/engine
zeekayandHanzo Dev 28407dae82 fix(engine): union v1.36.9 (G9 reconcile) + v1.36.7 engine fixes for v1.36.10
v1.36.9 (G9: reconcileVMToCertified + orphan_reconcile_test.go) branched off a
lineage that predates the five engine fixes on the v1.36.7 hotfix line. This
release folds those fixes onto v1.36.9's rewritten engine.go so the flag-day
ship vehicle carries BOTH the orphan-reconcile safety fix AND the non-leader
build-spin fix.

Re-applied by intent, not cherry-picked: a raw cherry-pick of c244ebc65
conflicts because engine.go was rewritten +143/-76 for G9. The resulting
buildBlocksLocked is byte-identical to v1.36.7's, and integration.go matches
dad02f888's blob exactly.

Folded in (originals credited):
- c244ebc65  consume build demand on BuildBlock error instead of holding it
             (kills the non-leader hot spin). CONSUME pendingBuildBlocks before
             BuildBlock; on a no-block / "not our proposer slot" outcome clear
             remaining demand and log Debug (was Error). A non-leader's
             BuildBlock always errors under single-proposer scheduling, so the
             old hold-the-demand path was an unbounded per-tick spin.
- dad02f888  wire the runtime logger (SetLogger + NewRuntime) — engine was
             permanently log.Noop, silently discarding every internal decision.
- 5bd66d581  log rebuilds of an undecided proposal slot.
- c81b1e7a4  log consensus.AddBlock rejections (was a silent continue).
- 442d5b6a4  log self-built block verification failures (was a silent continue).

Skipped 44ed1e100 (geth v1.20.1 bump): v1.36.9 already pins luxfi/geth v1.20.1.
go.mod / go.sum unchanged.

Preserved from v1.36.9: G9 reconcileVMToCertified + orphan_reconcile_test.go.

Tests assert the consume-on-error invariant (no spin, no accumulation, recovery
via a fresh Notify): TestBuildBlockError_ConsumesDemand,
TestBuildBlockError_RetriesOnNextNotify,
TestBuildBlockError_RepeatedFailures_NoPermanentHalt,
TestTransitiveNotifyPendingTxsWithVMError.

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