1 unstable release
new 0.1.0 | Feb 19, 2025 |
---|
#316 in Magic Beans
Used in 3 crates
125KB
3.5K
SLoC
Indexer
A Bitcoin Core node indexer which iterates over the chain (via ../iterator
) and creates a database of the vecs (../storable_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
Peaks at 11-12 GB of RAM
Outputs
Vecs: src/storage/storable_vecs/mod.rs
Stores: src/storage/fjalls/mod.rs
Examples
Rust: src/main.rs
Python: ../python/parse.py
Dependencies
~23–34MB
~512K SLoC