Mysticeti is based on the research paper “Mysticeti: Low-Latency DAG Consensus” and represents a significant advancement in consensus protocol design.
Consensus Overview
Mysticeti achieves consensus by building a Directed Acyclic Graph (DAG) of blocks, where validators propose blocks that reference previous blocks from other validators.Core Components
Authority Node
TheAuthorityNode manages the consensus protocol execution for each validator:
- Context: Committee configuration and protocol parameters
- Core: DAG construction and commit decision logic
- Block Manager: Validates and stores blocks
- Synchronizer: Fetches missing blocks from peers
Core Logic
TheCore is the heart of consensus, responsible for:
- Block Proposal: Creating new blocks with transactions and ancestor references
- Block Validation: Verifying signatures and DAG structure
- Commit Decisions: Determining when blocks are finalized
- Leader Election: Selecting leaders for each round
Block Structure
Blocks are the fundamental units of the DAG, containing transactions and references to ancestor blocks.Block Format
Block Fields
- Epoch: The consensus epoch (increments with validator set changes)
- Round: The consensus round number (monotonically increasing)
- Author: Index of the validator that created the block
- Ancestors: References to blocks from the previous round(s)
- Transactions: Sui transactions to be ordered and executed
- Commit Votes: Votes on previously committed sub-DAGs
Each block is signed by its author using their protocol keypair, ensuring authenticity and non-repudiation.
DAG Construction
Block Proposal
Validators propose blocks periodically, following these rules:- Round Progression: Only advance to round
rafter receiving a quorum of blocks from roundr-1 - Ancestor Selection: Include references to blocks from previous rounds
- Transaction Inclusion: Add pending transactions from the transaction pool
- Causal History: Ensure all referenced ancestors form a valid DAG
Ancestor State Management
TheAncestorStateManager tracks block quality and decides which blocks to reference:
Commit Protocol
Universal Committer
TheUniversalCommitter implements the commit decision logic:
Leader-Based Commits
Mysticeti uses a leader-based approach to finalize blocks:- Leader Election: Each round has one or more designated leaders
- Leader Blocks: Validators propose leader blocks at specific rounds
- Quorum Formation: A leader block becomes committed when it has a quorum of support
- Causal Ordering: All blocks causally preceding a committed leader are also committed
Commit Voting
Validators exchange commit votes to signal agreement on committed sub-DAGs:Transaction Ordering
Once blocks are committed, transactions within them must be ordered for execution:Causal Order
TheCausalOrder component deterministically orders transactions from committed blocks:
- Deterministic: All validators produce the same order
- Causal: Dependencies are respected (parent transactions before children)
- Fair: Transactions are ordered to prevent starvation
Integration with Sui
Consensus-ordered transactions flow to the Consensus Handler:Network Communication
Block Streaming
Mysticeti uses efficient block streaming to minimize latency:- Push-Based: Validators proactively push new blocks to peers
- Batching: Multiple blocks can be sent in a single message
- Compression: Block data is compressed for bandwidth efficiency
Synchronization
TheSynchronizer ensures validators stay up-to-date:
- Identifies missing block references
- Requests blocks from peers
- Validates received blocks
- Integrates blocks into the local DAG
Performance Optimizations
Pipelining
Mysticeti pipelines commit decisions to reduce latency:- Multiple rounds can have uncommitted leaders simultaneously
- Commit decisions are made as soon as quorum conditions are met
- No waiting for explicit acknowledgment before proposing new blocks
Propagation Delay Tracking
The protocol monitors block propagation delays:Misbehavior Detection
The protocol detects and reports misbehavior:- Equivocation: Proposing multiple blocks for the same round
- Invalid References: Referencing non-existent or invalid blocks
- Signature Errors: Blocks with invalid signatures
Committee Configuration
The consensus committee defines the validator set:Stake-Weighted Voting
Consensus decisions are based on stake weights:- Quorum: 2f+1 stake (Byzantine fault tolerance)
- Validity: f+1 stake (weak quorum)
- Total Stake: Sum of all validator stakes (typically 10,000 basis points)
The committee configuration is recalculated at the start of each epoch based on staking changes.
Consensus to Execution
Consensus output flows to the Consensus Handler:- Processes committed consensus output
- Assigns versions to shared objects
- Schedules transactions for execution
- Builds checkpoints from executed transactions
Key Implementation Files
- Authority Node:
consensus/core/src/authority_node.rs - Core Logic:
consensus/core/src/core.rs - Block Types:
consensus/core/src/block.rs - Committer:
consensus/core/src/universal_committer/ - Committee:
consensus/config/src/committee.rs - DAG State:
consensus/core/src/dag_state.rs