mirror of
https://github.com/luxfi/consensus.git
synced 2026-09-24 00:26:58 +00:00
A cert finalizes a CHAIN, not a block. Every block names its parent, so one verified ⅔ cert on any descendant establishes finality for its whole ancestry, and the fold already walks that path. What the walk needs is for the blocks in between to be TRACKED. AcceptCatchupBlock refused anything above finalized+1 without tracking it, to avoid accruing orphans. The cost of that was a node's recovery depending on certs that no longer exist: certs for old heights were assembled by processes that have since exited, so a node behind by more than the LIVE cert window could be served exactly the blocks it needed, discard every one, and ask again forever. Measured on lux-testnet: the descent walked a request from ~35,000 down to within ten blocks of the node's head, and it still could not use anything it received. Keeping them costs one Verify and a bounded number of pendingBlocks entries — the responder's window caps the batch — and buys a path home that does not require the past to still be in someone's memory. Safety is unchanged. Tracking is not finalizing: the block is locally Verified first, and finality still happens only in HandleIncomingCert behind the same α-floor, set-root and VerifyWeighted checks. "No VerifiedQuorumCert, no finality" holds exactly as before. The return stays ErrCatchupCertRejected so the caller's certAccepted stays 0 and the node keeps descending toward its next height. Co-authored-by: Hanzo Dev <[email protected]>