Module engine

Module engine 

Source
Expand description

Simplex BFT consensus engine.

This module provides the main engine that orchestrates the Simplex BFT consensus protocol for the Guts decentralized code collaboration platform.

§Architecture

The engine integrates with commonware-consensus’s Simplex implementation to provide Byzantine fault-tolerant consensus. The key components are:

  • Application Actor: Handles block proposal and verification
  • Marshal Actor: Manages block storage and synchronization
  • Buffer Engine: Buffers broadcast messages for efficient delivery
  • Consensus Engine: Core BFT voting logic (Batcher, Voter, Resolver)

§Usage

The engine requires P2P channels for:

  • pending: Pending consensus votes
  • recovered: Recovered messages after reconnection
  • resolver: Fetching missing certificates
  • broadcast: Block broadcast messages
  • marshal: Block sync messages

Structs§

Config
Configuration for the Simplex engine.
Engine
The Simplex BFT consensus engine.
EngineMetrics
Metrics from the consensus engine.
StaticSchemeProvider
Static scheme provider that always returns the same signing scheme.

Constants§

EPOCH
Epoch for the consensus instance.
EPOCH_LENGTH
Epoch length (effectively infinite for single-epoch operation).
NAMESPACE
Namespace for Guts consensus messages.

Type Aliases§

FinalizedCallback
Type alias for the finalization callback.