indexer: update readme

This commit is contained in:
nym21
2025-02-19 10:56:07 +01:00
parent 15f2e05192
commit 2cb4d65f3d
9 changed files with 37 additions and 25 deletions

View File

@@ -1,19 +1,27 @@
# Indexer
A [Bitcoin Core](https://bitcoincore.org/en/about/) node indexer which iterates over the chain (via `../iterator`) and creates a database of the vecs (`../storable_vec`) and key/value stores ([`fjall`](https://crates.io/crates/fjall)) that can used in your Rust code.
A [Bitcoin Core](https://bitcoincore.org/en/about/) node indexer which iterates over the chain (via `../iterator`) and creates a database of the vecs (`../storable_vec`) and key/value stores ([`fjall`](https://crates.io/crates/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.
The neat thing about using simple vecs to store data is that you can parse the outputed files with another programming language such as Python very simply, you'll find an example below.
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
Rust: `src/main.rs`
Python: `../python/parse.py`
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`