MonadBFT
Summary
MonadBFT represents a major leap in Byzantine Fault Tolerant (BFT) consensus. It is responsible for ensuring that the Monad network aligns on valid proposed blocks efficiently and securely, while supporting 10,000+ tx/s and sub-second time-to-finality, while also supporting a large consensus node set.
MonadBFT combines all of these properties while also being resilient to tail-forking, a critical weakness of pipelined leader-based BFT protocols where a leader can fork away its predecessor's block.
For a full description and deep technical dive into MonadBFT, please refer to the full research paper or the blog post from Category Labs.
MonadBFT achieves:
- Speculative finality in a single round, and full finality in two rounds
- Linear message and authenticator complexity on the happy path - allowing the consensus set to scale to hundreds of nodes
- Optimistic responsiveness: round progression without waiting for the worst case network delay, both in the common case and while recovering from failed rounds.
- Tail-forking resistance: built-in protection against tail-forking, a class of Maximal Extractable Value (MEV) attacks where a malicious leader could otherwise fork away its predecessor's block. This resolves a critical issue in prior pipelined leader-based BFT consensus mechanisms
No other pipelined leader-based BFT protocol combines all these features.
Category Labs has made several recent improvements to MonadBFT. This page and the research paper will soon be updated with full details, but you can find a brief summary of what's new in the Protocol Updates section.
Configuration in Monad
Sybil resistance mechanism | Proof-of-Stake (PoS) |
Min block time | 400 ms |
Finality | 2 slots (800 ms) |
Speculative finality (can only revert in rare circumstances requiring equivocation by the original leader) | 1 slot (400 ms) |
Delegation allowed | Yes |
Demo
See this blog post from Category Labs for a live demo of MonadBFT!
The demo runs the exact implementation of monad-bft
that powers the live Monad blockchain, compiled to Wasm and run in your browser against a
simulation framework
(mock-swarm
).
Common Concepts
To explain MonadBFT, it helps to define a few concepts first. We will start with some concepts common to many BFT mechanisms:
Byzantine threshold
As is customary, let there be n = 3f+1
nodes, where f
is the max number of Byzantine
(faulty) nodes. That is, 2f+1
(2/3) of the nodes are non-Byzantine. In the discussion
below, we treat all nodes as having equal stake weight; in practice all thresholds can be
expressed in terms of stake weight rather than in node count.
Supermajority
2/3 of the stake weight.
Round
The protocol proceeds in rounds, also referred to as views. The round number increases by 1 with each step of the protocol regardless of whether a proposal is successfully made.
Leader
Each round has one leader who has the authority to make a proposal. The leader rotates each round according to a schedule determined previously using the stake weights.
Block
A block consist of a payload (an ordered list of transactions), a QC, and a block number. The block number of a block is its parent's block number plus 1. Since some rounds fail to produce a block, the block number is always less than or equal to the round number.
Proposal
A proposal consists of the current round number, a block, an optional TC, an optional NEC, and a signature (from the leader making the proposal) over the previous elements. In the simple case, optional fields are blank and the proposal is basically a signed block.
Linear communication
Each round follows a fan-out fan-in pattern. The leader sends their proposal to each validator (using RaptorCast for efficient broadcast). Validators evaluate the proposal and send a signed vote directly to the next leader. This linear communication mechanism contrasts with other protocols which rely on all-to-all (quadratic) communication; it allows the consensus set to scale.
Quorum Certificate (QC)
Validators evaluate the validity of each proposal and send their votes to the next leader. If the next leader receives a supermajority of YES votes, they aggregate those votes into a Quorum Certificate (QC) on that proposal. A QC is proof that 2/3 of the network received and voted YES on a proposal.
Although this is more of an implementation detail, it is worth noting that in Monad's implementation of MonadBFT, validators sign with BLS signatures because those signatures can be efficiently aggregated, making signature verification on the QC relatively inexpensive.
Concepts relatively unique to MonadBFT
The following are concepts that are relatively unique to MonadBFT. We are splitting them out to aid in comprehension.
Fresh Proposal
A fresh proposal is a proposal containing a new block, i.e. one that is not influenced by prior failed proposals.
A fresh proposal will either:
- have a round number that is equal to its QC's round number plus 1 (common case - the happy path), or
- have a non-zero NEC (rare case - within the unhappy path, a reproposal was overridden).
Reproposal
A reproposal is a proposal containing a block from a previous fresh proposal that the current leader is trying to revive or finalize. A reproposal will have a round number greater than its QC's round number plus 1.
Tip
Tip is a shorthand version of a proposal. You can think of it as the block header of the proposal plus a bit of extra metadata, including the round number that that proposal was received.
In MonadBFT, every validator keeps track of the tip of the latest valid fresh proposal it has received.