Files
consensus/engine
zeekay 29407adaa6 consensus: wire luxfi/bft as fourth engine factory
The consensus toolkit now exposes four orthogonal paradigms:

  NewChain — linear Snow-family metastable (Nova)
  NewDAG   — DAG Snow-family metastable (Nebula)
  NewPQ    — post-quantum threshold Quasar
  NewBFT   — classical leader-rotation BFT (Simplex/HotStuff family)

NewBFT(cfg BFTConfig) wraps a fully-configured luxbft.Epoch as a
consensus.Engine. The application owns the Epoch's wiring (Storage,
Communication, Signer, BlockBuilder, WAL); the consensus toolkit
owns the lifecycle.

Orthogonality preserved across the three axes:
  - consensus paradigm   — picks engine (Chain/DAG/PQ/BFT)
  - ChainSecurityProfile — picks admissible primitives (strict/permissive/fips)
  - FinalitySchemeID     — picks the threshold kernel (Pulsar/Corona/MPTC)

A BFT engine under a strict-PQ profile with Pulsar-M-65 finality is
a valid production combination: leader-rotation ordering with
PQ-threshold-signed cert envelopes — exactly the posture a
permissioned subnet might want.

Implementation:
  engine/bft/engine.go      — thin lifecycle adapter (Start/Stop/
                              HealthCheck/IsBootstrapped/AdvanceTime/
                              HandleMessage)
  engine/bft/engine_test.go — 6 nil-safety + fail-closed tests
  consensus.go              — NewBFT factory, BFT type alias,
                              BFTConfig re-export, MustNewBFT

go.mod requires github.com/luxfi/bft v0.1.5.
2026-05-11 20:28:46 -07:00
..
2025-12-19 08:49:11 -08:00