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, the latest blog post from Category Labs and the original blog post introducing MonadBFT.
MonadBFT achieves:
- Speculative finality in a single consensus round, and full finality in two rounds.
- Linear message and authenticator complexity on the happy path (meaning under normal operations, when no failures occur). This allows the consensus validator set to scale to a large number 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.
- Leader fault isolation A single failed leader only incurs one timeout delay. All other rounds are able to proceed as quickly as the network allows. This is in contrast to existing pipelined BFT protocols, which have a two timeouts for a failed leader.
- 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 have now been updated with full details. Find out what's new in the Fast Recovery section or by reading this blog post.
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 block proposal is successfully made.
Leader
Each round has one leader who has the authority to make a block proposal. The leader rotates each round according to a schedule determined previously using the stake weights.
Block
A block consist of a round number, a payload (an ordered list of transactions), and a QC. A block builds on a parent block, and includes a QC certifying that parent block. Blocks are chained together via the parent relationship, which is why we called it a blockchain.
Quorum Certificate (QC)
Validators evaluate the validity of each block 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 block proposal. A QC is proof that 2/3 of the network received and voted YES on a block 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.
Linear communication
Each round follows a fan-out fan-in pattern. The leader sends their block proposal to each validator (using RaptorCast for efficient broadcast). Validators evaluate the block 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.
Concepts relatively unique to MonadBFT
The following are concepts that are relatively unique to MonadBFT. We are splitting them out to aid in comprehension. For simplicity, we focus on the standard recovery in MonadBFT. The fast recovery optimizations are explained in the Fast Recovery section.
Proposal
A block proposal (often just called proposal) consists of the current round number, a block, an optional TC or NEC, and a signature (from the leader making the proposal) over the previous elements. In the simple case, optional fields are blank and the round number is the same as the block's round number, such that the proposal is basically a signed block. Sometimes, a block that failed to get traction gets reproposed; in that case, the block will still have the round number from when it was first proposed, but the proposal will have the round number of when it is reproposed.
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. This is the common case, when leaders are honest and online, and the network does not have any abnormal delays.
- have a TC identifying a high QC. This happens when a leader recovers from a failed round (fast recovery).
- have a NEC. This happens very rarely, when a leader recovers from a more complex failure (standard recovery).
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.
Whether a leader recovering from a failure has to repropose a previous block or not is determined by the TC. If the TC contains a high tip (instead of a high QC), then the block corresponding to the high tip must be reproposed. Reproposals are part of the standard recovery. In practice, reproposals can often be skipped with fast recovery.
Tip
A tip is a proposal minus the block's payload. 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 its latest tip, which is updated whenever the validator votes for a proposal. If the validator votes for a reproposal, the tip is set to the original proposal, not its reproposal.
High Tip
Given a set of tips, high tip is just the tip with the highest round number. If there are multiple such tips, then the tip that builds on the highest QC embedded in it is chosen.
Timeout Message
A timeout message is a signed attestation that a validator produces when it hasn't received a valid block from the scheduled leader in the expected time. The timeout message attests to the lack of a valid block.
Each validator sends the timeout message to all other validators, utilizing all-to-all communication.
Timeout messages are utilized in other BFT protocols. In MonadBFT, timeout messages include the sender's tip - additional information about their view of the world which will be utilized in MonadBFT to recover gracefully from the timeout. For fast recovery, the timeout message contains the validator's highest QC, if it is of equal or higher view than the view of the local tip.