mirror of
https://github.com/luxfi/consensus.git
synced 2026-09-24 00:26:58 +00:00
H1 (HIGH, false-slash): HandleIncomingCert recorded slashing DoubleVote evidence on the height-gate branch BEFORE any signature verification. A forged cert (junk signatures naming honest validators, a random different canonical, height <= finalized) jailed honest validators below quorum -> re-halt. FIX: a conflicting cert is fork EVIDENCE only after it passes the FULL predicate. Extracted Transitive.verifyCert (the single signature+active-set+quorum gate, stake-weighted when wired) and run it BEFORE reportCertEquivocation; the finalize path reuses the same helper. A forged cert now slashes NOBODY and finalizes nothing. Regression: TestE2E_ForgedConflictingCertSlashesNobody (zero records, nobody jailed); the genuine canonical fork still records evidence (TestE2E_GenuineForkCertStillSlashes). M1 (liveness/eclipse): a VERIFIED finality proof for a block we do not track was silently dropped, so a targeted-eclipsed follower (adopted a losing sibling envelope) stalled on finalization forever. FIX: on a verified-but-untracked cert, trigger a throttled best-effort catch-up fetch for the certified block (requestCatchup, claimCatchupLocked rate-limited). The fetch is gated on verification, so a forged cert cannot amplify fetches. Regression: TestE2E_DeferredValidCertTriggersFetch (valid cert fetches the winning block; forged cert triggers no fetch). M2 (roll discipline, doc): documented on QuorumCertVersion that the version is fail-SAFE (cross-version certs fail closed, no fork) but NOT fail-live across the skew — cut >= alpha validators to v3 atomically per net, and the v2 baseline must already carry the converge-on-A recovery so the mixed window is not halt-prone. Full proof suite re-run green: 6-row matrix + invariant + inversions + H1/M1 regressions (337 tests), go vet clean, staticcheck adds zero findings, -race clean, both fuzzers clean (codec 461k execs, finalize-decision 81k execs, 0 crashes). No deploy/push/merge/tag — back to RED for re-review. Co-authored-by: Hanzo Dev <[email protected]>