MemDB, VersionDB, and memory-mapped storage (mmap) to dramatically improve throughput.
Why disk I/O is a bottleneck
State transition and persistence
Every time a block of transactions is executed, the blockchain transitions from one state to the next. This process has two fundamental stages:- State Commitment: The new application state is committed after transaction execution.
- State Storage: The committed state is persisted to disk for long-term access and historical verification.

- The node must wait for the new state to be fully stored on disk before proceeding with the next block’s execution.
- The state data is written in random disk locations that are not mapped to fixed addresses. This leads to high latency when retrieving state data during execution of subsequent transactions.
Optimizing DB operations for higher throughput
To overcome these limitations, Stable proposes a two-fold architectural enhancement focused on decoupling state operations and introducing memory-mapped DB optimizations.1. Decoupling state commitment and storage

- After committing a new state, the node immediately proceeds to execute the next block.
- The actual persistence of state to disk occurs asynchronously in the background.
2. Introducing MemDB and VersionDB via mmap
Stable enhances this with a dual-database model powered by mmap (memory-mapped file access):
- MemDB (Memory DB):
- Stores recent and active states that are frequently accessed.
- Uses fixed address mapping via
mmap, enabling fast and deterministic lookups. - Ideal for most transaction workloads which target recently modified state.
- VersionDB (Historical DB):
- Stores older, historical states on disk.
- Optimized for archival and long-range queries, not for high-frequency access.
mmap access with smart state tiering, Stable can significantly reduce the DB read/write latency during block execution.
Expected gains and precedents
This architectural optimization is not just theoretical. It is already being implemented by high-performance blockchains such as Sei and Cronos. Both have adopted similar decoupled architectures with memory-mapped DBs and have observed up to 2x increases in overall TPS. Stable also anticipates comparable gains, as the architecture will no longer be bottlenecked by the storage layer. Instead, consensus and execution performance can scale without being throttled by disk operations.Further reading
For more technical deep-dives and implementation details, refer to:- ADR-065: Cosmos Store V2 Architecture
- MemIAVL: A Practical Guide
- Cronos MemIAVL Node Configuration
- Sei’s DB Design Approach
Next recommended
High performance RPC
See how the RPC layer exposes state reads without contending with writes.
Execution
Understand how execution writes into the storage layer covered here.
Consensus
Review the consensus layer that orders blocks before they reach storage.

