brk_store
Key-value storage layer built on fjall for Bitcoin indexing.
What It Enables
Persist and query Bitcoin index data (address→outputs, txid→height, etc.) with access patterns optimized for different workloads: random lookups, sequential scans, and recent-data queries.
Key Features
- Workload-optimized configs:
Kind::Random(bloom filters, pinned blocks),Kind::Recent(point-read optimized), andKind::Vec(append-heavy) - Write batching: Accumulate puts/deletes in memory, then move them into an owned ingestion batch
- Tiered caching: Optional bounded in-memory batches before hitting disk
- Version management: Automatic schema-version validation when opening a store
Core API
let mut store: = import?;
store.insert;
if let Some = store.take_pending_ingest
let height = store.get?;
Access Patterns
| Kind | Use Case | Optimization |
|---|---|---|
Random |
UTXO lookups, txid queries | Aggressive bloom filters |
Recent |
Mempool, recent blocks | Point-read hints |
Vec |
Append-heavy series | Dense blocks, no filters or pinned blocks |
Built On
brk_errorfor error handlingbrk_typesforHeight,Version