github

category-labs / monad-bft

  • четверг, 18 сентября 2025 г. в 00:00:03
https://github.com/category-labs/monad-bft



Monad BFT

Nightly Tests

Overview

This repository contains implementation for the Monad consensus client and JsonRpc server. Monad consensus collects transactions and produces blocks which are written to a ledger filestream. These blocks are consumed by Monad execution, which then updates the state of the blockchain. The triedb is a database which stores block information and the blockchain state.

Getting Started

git submodule update --init --recursive

Using Docker

The most straightforward way to start a consensus client + an execution client + a JsonRpc server. Run the following:

  1. cd docker/single-node
  2. nets/run.sh

Using Cargo

To run a Monad consensus client, follow instructions here.

To run a JsonRpc server, follow instructions here.

Architecture

sequenceDiagram
autonumber
    participant D as Driver
    box Purple Executor
    participant S as impl Stream
    participant E as impl Executor
    end
    participant State
    participant PersistenceLogger
    loop
    D ->>+ S: CALL next()
    Note over S: blocks until event ready
    S -->>- D: RETURN Event
    D ->> PersistenceLogger: CALL push(Event)
    D ->>+ State: CALL update(Event)
    Note over State: mutate state
    State -->>- D: RETURN Vec<Command>
    D ->> E: CALL exec(Vec<Command>)
    Note over E: apply side effects
    end
Loading