State Store (MDBX and Redis)
Home · Generic Index · Chain Overlays
This document captures how the state cache is persisted and read by the sidecar and tools.
Storage Topology
Notes:
- MDBX is the primary on-disk cache for block state and metadata.
- Redis is an optional backend for shared or distributed deployments.
- State checker recomputes state roots from the store and compares them with block metadata.
Commit and Verify Flow
Key code paths:
- Store types and models:
credible-sdk/crates/state-store/src/lib.rs - MDBX reader and writer:
credible-sdk/crates/state-store/src/mdbx/ - Redis reader and writer:
credible-sdk/crates/state-store/src/redis/ - State checker:
credible-sdk/crates/state-checker/src/main.rs