Documentation Index
Fetch the complete documentation index at: https://seilabs.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
Overview
As Sei nodes accumulate more history and state data, iteration-heavy operations—like those performed duringtraceBlock calls—can become significantly slower. This is especially true for archive or RPC nodes where the state store contains millions of versions.
To address this, Sei supports RocksDB as an alternative backend to PebbleDB. RocksDB provides native multi-version concurrency control (MVCC) and column family support, which leads to substantial iteration performance improvements as history grows.
Why RocksDB?
PebbleDB lacks native MVCC support, meaning Sei must manually encode versions into keys. This retrofit approach causes iteration time to grow linearly with the amount of stored history. As a result:- Archive nodes with large state stores experience slower debug trace latency.
- Each key lookup may require scanning multiple key versions.
- Iterations (e.g., over Oracle or EVM module keys) become increasingly expensive over time.
- Iterations over keys at a single version are much faster.
- Historical data growth has minimal effect on iteration cost.
- The performance advantage amplifies with larger node history.
Example: TraceBlock Latency Comparison
The following chart compares iteration (trace time) performance between PebbleDB and RocksDB over a 3 million block history:
Setup Instructions
RocksDB only needs to be built once. After that, you can installseid with RocksDB support directly.
Prerequisites
Ensure your system includes the following packages:Build & Install
Refer to the SeiMakefile here for the official targets.
seid binary will be built with RocksDB backend support:
Configuration
After installation, update your configuration file to enable the RocksDB backend:Node Setup Notes
- RPC Nodes — must perform a state sync when spinning up a new node configured with RocksDB.
- Archive Nodes — currently, RocksDB is not supported for existing data unless syncing from genesis. A migration route from PebbleDB to RocksDB is being developed and will be shared soon.
Summary
| Feature | PebbleDB | RocksDB |
|---|---|---|
| MVCC Support | No | ✅ Native via user-defined timestamps |
| Column Families | No | ✅ Yes |
| Iteration Speed (Large State) | Slows with history | ✅ Up to 30× faster |
| Installation | Default | One-time build (make build-rocksdb) |
TL;DR
- RocksDB backend drastically improves trace iteration and historical query performance.
- Install once, then simply run:
- Update ~/.sei/config/app.toml to use RocksDB:
- RPC nodes require state sync; archive nodes must currently sync from genesis
- Expect 10–30× faster trace latencies, especially on archive nodes or long-history setups.