Crates.io | bitcoin-block-parser |
lib.rs | bitcoin-block-parser |
version | 0.3.2 |
source | src |
created_at | 2024-09-13 18:26:12.981852 |
updated_at | 2024-10-18 15:00:10.031262 |
description | Fast optimized parser for the bitcoin `blocks` data with UTXO tracking. |
homepage | |
repository | https://github.com/sumopool/bitcoin-block-parser |
max_upload_size | |
id | 1374051 |
size | 61,812 |
Fast optimized parser for the bitcoin blocks
data with UTXO tracking.
⚠️ The API is still evolving and should not be considered stable until release 1.0.0
Block
format for easier manipulationTxOut
in a Transaction
is spent or unspentAmount
of every TxIn
for calculating metrics such as fee ratesBlockParser
Options
)Our benchmarks were run on NVMe storage with a 32-thread processor on 850,000 blocks:
Function | Time | Memory |
---|---|---|
DefaultParser | 5 min | 3.5 GB |
FilterParser | 17 min | 9.3 GB |
UtxoParser | 39 min | 17.5 GB |
blocks
directory of your bitcoin node and call DefaultParser::parse_dir
InOrderParser::parse_dir
blocks
and utxos
module docsuse bitcoin_block_parser::*;
// Iterates over all the blocks in the directory
for block in DefaultParser.parse_dir("/home/user/.bitcoin/blocks").unwrap() {
// Do whatever you want with the parsed block here
block.unwrap().check_witness_commitment();
}