Consensus
Tenzro Ledger uses HotStuff-2 BFT consensus, a modern Byzantine Fault Tolerant protocol with linear communication complexity and TEE-weighted validator selection.
HotStuff-2 Overview
HotStuff-2 is a leader-based BFT consensus protocol that achieves:
- Linear Communication — O(n) messages per block (vs O(n²) in traditional BFT)
- Responsive — Commits in two network round-trips under good conditions
- Safe — Tolerates up to f Byzantine validators where n = 3f + 1
- Live — Guaranteed progress with view changes and timeout mechanisms
Three-Phase Protocol
HotStuff-2 operates in three phases per block:
1. PREPARE Phase
- Leader proposes a new block
- Validators verify block validity (signatures, state transitions, TEE attestations)
- Valid block: validators send PREPARE vote to leader
- Leader collects quorum (2f + 1 votes)
2. COMMIT Phase
- Leader broadcasts PREPARE certificate (quorum of PREPARE votes)
- Validators verify certificate
- Valid certificate: validators send COMMIT vote
- Leader collects quorum of COMMIT votes
3. DECIDE Phase
- Leader broadcasts COMMIT certificate
- Validators verify certificate and finalize block
- Block is now immutable and safe to execute
- State updates applied, receipts generated
TEE-Weighted Validators
Tenzro enhances security by giving TEE-attested validators higher weight in leader selection:
TEE-attested validators are twice as likely to be selected as leader, incentivizing secure hardware deployment.
Epoch Management
Validators are organized into epochs for efficient rotation and staking management:
- Epoch Duration: Configurable blocks per epoch (default: 1000 blocks)
- Validator Set: Top N stakers (by total stake) selected each epoch
- Rewards: Distributed at epoch boundaries to active validators
- Slashing: Automated slashing detects double-voting; 10% of validator stake slashed on equivocation; conflicting vote evidence preserved for accountability
Mempool
The mempool stores pending transactions awaiting inclusion in blocks:
- Priority Queue: Transactions ordered by gas price (EIP-1559 priority fee)
- Nonce Ordering: Transactions from same sender ordered by nonce
- Size Limit: Configurable max mempool size (default: 10,000 transactions)
- Eviction: Lowest priority transactions evicted when full
Finality
HotStuff-2 provides deterministic finality:
Once a block receives a COMMIT certificate (quorum of 2f+1 COMMIT votes), it is finalized. Finalized blocks are immutable and safe to execute. There are no reorganizations past finalized blocks.
This contrasts with Nakamoto consensus (Bitcoin, Ethereum PoW) where finality is probabilistic.
View Changes
If a leader fails or is malicious, validators trigger a view change:
View changes ensure liveness: the protocol always makes progress even if leaders fail.
Safety Properties
- Agreement: All honest validators finalize the same blocks
- Validity: Only valid blocks (correct signatures, state transitions) are finalized
- No Forks: Two conflicting blocks cannot both be finalized
- Byzantine Tolerance: Safety guaranteed with up to f Byzantine validators (n = 3f + 1)