Files
consensus/engine
zeekayandHanzo Dev 48962ce4f6 chain: set cert retention by what recovery costs, not by what felt tidy
maxServedCerts is the recovery ceiling. A behind node can only be caught up through
heights some peer still holds a cert for, and every node evicts on the same rule, so
a straggler below the window finds the cert nowhere rather than on a slower peer.

At 4096 against a live chain that is a few hours of history. Measured on lux-testnet:
tip ~36300, so the fleet held certs back to ~32200 while the stranded validator needed
23935. It was served every block it asked for and no cert for any of them, and no
amount of fetching could have helped — the proof it needed had been evicted fleet-wide.

A cert is a few hundred bytes, so depth is cheap here in a way block retention is not.
64Ki heights is tens of megabytes per chain and covers gaps far beyond what a restart,
a rollout or a node replacement produces. The bound still exists and eviction is
unchanged; only the number moved.

Note: TestCertStoreKeepsTheNewestWindow now seeds a full window as files and takes
~45s. It seeds by hand rather than through Put for that reason.

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