mirror of
https://github.com/luxfi/consensus.git
synced 2026-09-24 00:26:58 +00:00
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]>