31 releases

Uses new Rust 2024

new 0.0.30 Apr 22, 2025
0.0.29 Apr 22, 2025
0.0.11 Mar 31, 2025
0.0.2 Feb 27, 2025

#229 in Magic Beans

Download history 113/week @ 2025-02-19 490/week @ 2025-02-26 422/week @ 2025-03-05 150/week @ 2025-03-12 131/week @ 2025-03-19 119/week @ 2025-03-26 1079/week @ 2025-04-02 492/week @ 2025-04-09 1024/week @ 2025-04-16

2,721 downloads per month
Used in 5 crates

MIT license

285KB
8K SLoC

BRK Indexer

GitHub Repo stars kibo.money License Version Documentation Size Dependency status Discord Nostr Bluesky X

A Bitcoin Core node indexer which iterates over the chain (via ../brk_parser) and creates a database of the vecs (brk_vec) and key/value stores (fjall) that can be used in your Rust code.

The crate only stores the bare minimum to be self sufficient and not have to use an RPC client (except for scripts which are not stored). If you need more data, checkout ../computer which uses the outputs from the indexer to compute a whole range of datasets.

Vecs are used sparingly instead of stores for multiple reasons:

  • Only stores the relevant data since the key is an index
  • Saved as uncompressed bytes and thus can be parsed manually (with any programming language) without relying on a server or library
  • Easy to work with and predictable

Usage

Storage wise, the expected overhead should be around 30% of the chain itself.

Peaks at 5 GB of RAM

Outputs

Vecs: src/storage/vecs/mod.rs

Stores: src/storage/stores/mod.rs

Benchmark

Result 1 - 2025-04-12

  • version: v0.0.21
  • machine: Macbook Pro M3 Pro (36GB RAM)
  • mode: raw
  • from: 0
  • to: 892_098
  • time: 7 hours 10 min 22s
  • peak memory: 6.1GB
  • disk usage: 270 GB
  • overhead: 36% (270 GB / 741 GB)

Dependencies

~31–43MB
~659K SLoC