How category-labs/monad works
Monad Execution is the execution service for a Monad node, and can also replay historical EVM-chain blocks. Its principal workflow is block input, transaction scheduling and execution, then updated blockchain state. The documented architecture includes a custom EVM, database, and high-level scheduling; the tree also shows RPC, state sync, and execution-event facilities. The source excerpts are limited, so links between unsampled subsystems are shown only where the README or sampled entry point supports them.
Main entry points: main.cpp Execution daemon · runloop Block run loop · execute_block.cpp Block execution · vm Custom EVM
Components 19
Execution runtime
- Execution daemon
cmd/monad/main.cpp - Block run loop
category/execution/runloop - Transaction scheduling
category/execution/monad/dispatch_transaction.cpp - Block and transaction validation
category/execution/ethereum/validate_block.cpp - Block execution
category/execution/ethereum/execute_block.cpp
EVM execution
- Custom EVM
category/vm - Chain rules and genesis
category/execution/ethereum/chain - Monad extensions
category/execution/monad/staking
State and storage
- Execution state
category/execution/ethereum/state3/state.cpp - Trie database
category/mpt - Monad page storage
category/execution/monad/db/storage_page.cpp - Ethereum database
category/execution/ethereum/db - Rust trie DB API
rust/crates/monad-triedb/src/lib.rs
Node interfaces
- RPC execution support
category/rpc - State sync
category/statesync
Events and tooling
- Event ring interface
cmd/monad/event.hpp - Execution events
rust/crates/monad-exec-events/src/events/mod.rs
Other components
- Consensus daemon
- Block replay input
Connections 18
- Consensus daemon → Execution daemon: requests execution
README.md - Block replay input → Execution daemon: provides blocks
README.md - Execution daemon → Block run loop: runs blocks
- Block run loop → Transaction scheduling: schedules transactions
README.md - Block run loop → Block and transaction validation: validates blocks
- Block run loop → Block execution: executes blocks
README.md - Block execution → Custom EVM: executes transactions
README.md - Block execution → Execution state: updates state
README.md - Custom EVM → Chain rules and genesis: uses chain rules
- Custom EVM → Monad extensions: enables extensions
README.md - Execution state → Trie database: stores trie state
- Execution daemon → Ethereum database: initializes database
cmd/monad/main.cpp - Execution daemon → State sync: starts sync server
cmd/monad/main.cpp - RPC execution support → Execution daemon: supports execution
- Monad page storage → Trie database: backs trie storage
- Rust trie DB API → Trie database: accesses trie DB
- Execution daemon → Event ring interface: configures events
cmd/monad/event.hpp - Event ring interface → Execution events: carries event data