mirror of
https://github.com/luxfi/consensus.git
synced 2026-09-24 00:26:58 +00:00
Follow-up to the v1.36 two-tier accept swap, addressing RED's export-boundary review. The engine already computed the ⅔-stake Quasar frontier; these expose it to the surfaces that consume it and make it durable, and remove a shared-place smell in the attestor. #3 (values, not places): QuasarAttestor.Ingest now takes the block's P-chain epoch as a VALUE parameter bound to the position, instead of deriving it from a shared, height-keyed attestorEpoch map. Two concurrent ingests of same-height forked blocks under different epochs can no longer cross epochs; the shared map + its mutex are deleted (acceptedPos keeps its own mutex). #4 (durable, non-regressing export frontier): - ChainConsensus.SyncQuasarFrontier(canonical, height) conservatively (re)seeds the Quasar frontier on boot from a durable source (the VM's persisted export height), advance-only — so GetQuasarTip / QuasarHeight do not regress to (Empty,0) on restart until a fresh cert re-forms. Export bridge (enables the EVM/warp/node fixes): - WithQuasarObserver / NetworkConfig.QuasarObserver: the engine PUSHES each Quasar frontier advance (canonical, height) to a registered observer, symmetric with how block.Accept pushes the Nova tip. The node wires it into the VM so the EVM `finalized`/`safe` tags and warp export gate read the export tip, never the reorgable Nova/accept tip. nil on a chain with no export surface. Matrix tests: the multinode export-convergence tests (FourOfFive/Partition) assert export LIVENESS (the ⅔ cert forms + no conflicting tip) with a generous exportTO — the deterministic no-two-Quasars INVARIANT is proven by the single-engine TestNovaQuasarMatrix_Equivocation (which runs -race clean). Co-authored-by: Hanzo Dev <[email protected]>