Files
consensus/engine
zeekayandHanzo Dev c4fe410e6e statesync: answer a peer's summary requests, and drop an unreachable check
A node could adopt a peer's state and could not serve one. Adoption already
existed in engine/chain/summary; nothing answered the two requests it makes, so
every node was a client of a service no node provided.

The serving half reads the VM and returns what to send, leaving framing and
transport to the node. It never consults StateSyncEnabled: a node's own
preference says nothing about what its peers may ask, and a chain that answers
only when it would also ask leaves a fleet unable to repair itself the moment its
healthy members have nothing left to sync to.

Silence and an empty reply are distinct answers. No summary, or an error, sends
nothing and the requester closes its round on its deadline. A request naming no
heights gets an empty reply — "none of those" — which completes the tally at
once. Swap them and every round either stalls or under-counts.

The op-space carries no wire for a singular by-height request, so nothing here
answers one.

Also removes the per-summary overflow check in elect. Its stake only ever sums a
subset of the ballots `answered` already sums, and `answered` is checked one line
earlier per ballot, so the second check could never fire. The invariant is now
stated where the addition happens. Coverage is 100% on both halves, reached by
deleting the branch rather than by asserting an impossible case.

Comments across the engine drop incident detail for the rule each one holds.

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