| Crates.io | brk_store |
| lib.rs | brk_store |
| version | 0.1.0-beta.0 |
| created_at | 2025-06-07 08:34:23.609886+00 |
| updated_at | 2026-01-25 13:21:54.736927+00 |
| description | A thin wrapper around fjall |
| homepage | https://bitcoinresearchkit.org |
| repository | https://github.com/bitcoinresearchkit/brk |
| max_upload_size | |
| id | 1703824 |
| size | 47,023 |
Key-value storage layer built on fjall for Bitcoin indexing.
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.
Kind::Random (bloom filters, pinned blocks), Kind::Recent (point-read optimized), Kind::Sequential (scan-friendly), Kind::Vec (append-heavy)StoreMetainsert_if_needed / remove_if_needed skip work at heights already processedlet store: Store<Txid, Height> = Store::import(
&db, &path, "txid_to_height",
Version::new(1), Mode::Any, Kind::Random
)?;
store.insert(txid, height);
store.commit(height)?;
let height = store.get(&txid)?;
| Kind | Use Case | Optimization |
|---|---|---|
Random |
UTXO lookups, txid queries | Aggressive bloom filters |
Recent |
Mempool, recent blocks | Point-read hints |
Sequential |
Full chain scans | Minimal indexing |
Vec |
Append-only series | Large memtables, no filters |
brk_error for error handlingbrk_types for Height, Version