| Crates.io | brk_computer |
| lib.rs | brk_computer |
| version | 0.1.0-beta.0 |
| created_at | 2025-02-23 23:32:22.034672+00 |
| updated_at | 2026-01-25 13:22:55.817502+00 |
| description | A Bitcoin dataset computer built on top of brk_indexer |
| homepage | https://bitcoinresearchkit.org |
| repository | https://github.com/bitcoinresearchkit/brk |
| max_upload_size | |
| id | 1566727 |
| size | 5,356,365 |
Derived metrics computation engine for Bitcoin on-chain analytics.
Compute 1000+ on-chain metrics from indexed blockchain data: supply breakdowns, realized/unrealized P&L, SOPR, MVRV, cohort analysis (by age, amount, address type), cointime economics, mining pool attribution, and price-weighted valuations.
let mut computer = Computer::forced_import(&outputs_path, &indexer, Some(fetcher))?;
// Compute all metrics for new blocks
computer.compute(&indexer, starting_indexes, &reader, &exit)?;
// Access computed data via traversable vecs
let supply = computer.distribution.utxo_cohorts.all.metrics.supply.total.sats.height;
let realized_cap = computer.distribution.utxo_cohorts.all.metrics.realized.unwrap().realized_cap.height;
| Module | Examples |
|---|---|
blocks |
Block count, interval, size, mining metrics, rewards |
transactions |
Transaction count, fee, size, volume |
scripts |
Output type counts |
distribution |
Realized cap, MVRV, SOPR, unrealized P&L, supply |
cointime |
Liveliness, vaultedness, true market mean |
pools |
Per-pool block counts, rewards, fees |
market |
Market cap, NVT, Puell multiple |
price |
Height-to-price mapping from fetched data |
UTXO and address cohorts support filtering by:
Full pipeline benchmarks (indexer + computer):
| Machine | Time | Disk | Peak Disk | Memory | Peak Memory |
|---|---|---|---|---|---|
| MBP M3 Pro (36GB, internal SSD) | 4.4h | 345 GB | 348 GB | 3.3 GB | 11 GB |
| Mac Mini M4 (16GB, external SSD) | 7h | 344 GB | 346 GB | 4 GB | 10 GB |
Full benchmark data: bitcoinresearchkit/benches
Use mimalloc v3 as the global allocator to reduce memory usage.
brk_indexer for indexed blockchain databrk_cohort for cohort filteringbrk_fetcher for price databrk_reader for raw block accessbrk_traversable for data export