MACA
MACA (Multi-Agent Consensus Algorithm) is a four-round Byzantine Fault Tolerant protocol. Under the happy path a block reaches finality at the end of round one.Rounds
| Round | Purpose | Quorum |
|---|---|---|
| 1. Propose | Selected block producer broadcasts a candidate block. | 1 of 1 |
| 2. Prevote | Active validators broadcast a prevote on the proposal. | 2f + 1 |
| 3. Precommit | Active validators broadcast a precommit if they saw the prevote quorum. | 2f + 1 |
| 4. Finalise | Validators apply the block locally and emit a finalisation vote. | 2f + 1 |
n is the active validator count and f = ⌊(n − 1) / 3⌋. MACA is BFT under f Byzantine validators.
Block producer selection
The block producer at heighth is selected from the active set using a deterministic VRF over the randomness beacon from block h − 1. Selection is round-robin within a sub-epoch to prevent producer concentration.
Validator participation
Every active validator must:- Sign prevotes and precommits within the round timeout (default 2 s per round).
- Apply the finalised block before proposing or voting on the next height.
- Maintain the publisher bond.
Slashing
Equivocation (signing two prevotes or precommits at the same height) is provable from the validator’s own signatures. The slashing txSlashEquivocation carries both signatures as proof and burns 5% of bonded stake. See economics.
Tower epoch finality
Every 1,000 blocks the active set executes a Tower (Casper FFG) commit. The Tower commit:- Identifies the highest justified checkpoint.
- Locks a new finalised checkpoint at height
prev + 1000. - Records the locked epoch in the durable state.
node/sigil-tower/src/tower.rs and is exercised by node/sigil-tower/tests/safety.rs.
What is finalised when
| Event | Finality |
|---|---|
| Block included in a proposal | None. Not yet voted. |
| Block prevoted by 2f+1 | Soft. Could still be skipped. |
| Block precommitted and finalised by 2f+1 | Hard. Reorg requires Byzantine majority. |
| Epoch locked under Tower | Permanent. Reorg requires >1/3 stake slashing. |
consensus.finalised on every block and consensus.epoch_locked every 1,000 blocks.
Why not DAG, why not optimistic
A DAG consensus (Narwhal, Bullshark, Aleo’s snarkOS) offers higher throughput but partial ordering. Sigil’s primitive set assumes total ordering: a token mint must observe the previous burn, an auction finalise must observe the last bid. Total ordering is a hard requirement. Optimistic consensus (Ethereum-style probabilistic finality) requires applications to wait many blocks for “practical” finality. The compute marketplace, labor escrow, and recovery ceremony rely on per-block determinism; they cannot accept a window where a settled block might revert. The architectural decision is recorded indocs/launch/agent-03/dag-vs-bft-decision.md.
Liveness assumptions
MACA is live when:- More than two-thirds of active validators are online and reachable.
- Network partitions do not isolate more than one-third of stake for longer than 15 seconds.
- Validators sync block tails through libp2p without persistent reorg.
- Automatic recovery once the partition heals.
- Operator-coordinated restart from the last finalised epoch.
- Tower-locked checkpoints used as the authoritative state during restart.