Files
consensus/engine
zeekayandHanzo Dev 59fca259e2 chain: file a served cert under the height the cert attests
The height a cert certifies is carried by the cert. It was being taken from
the top of whatever the finalizing call happened to accept, which is zero for
a cert about a block already held — the ordinary case.

Retention over the durable store is ordered by height, so a store keyed at
zero has no order and answers for no height: the serve path finds nothing and
pairs each block with an empty cert, which a node behind the tip can neither
accept nor reject. The in-memory window covers this until a restart drops it,
leaving the durable height as the only route back for a lagging node.

The two tests that already covered this store call persistServedCert directly
and supply the height, so they hold whatever the caller computes. The new test
drives applyBranchFinalization with an empty accept plan and asserts the
persisted height equals the cert's; it fails without this change.

Co-authored-by: Hanzo Dev <[email protected]>
2026-08-14 04:30:07 -07:00
..
2025-12-19 08:49:11 -08:00