A Bitcoin-like blockchain parser for local nodes, written in pure Rust. It parses raw blockchain .dat files and produces UTXO dumps in CSV format for analysis. Compatible with Bitcoin, Litecoin, Bitcoin Cash, and similar blockchains.
- Pure Rust implementation with no LevelDB dependency
- Memory-efficient design that works on machines where UTXO HashMaps can't fit into RAM
- Parallel processing for faster data extraction
- Direct parsing of blockchain
.datfiles (ordered blocks) - CSV output format for easy integration with analysis tools
- Multi-blockchain support
cargo install bcloopbcloop utxodump /path/to/blockchain/blocks output.csvcargo add bcloopuse bcloop::{BcWalker, AddrType};
// Initialize the blockchain walker
let walker = BcWalker::from_dir("/path/to/blockchain/blocks")?;
let chan = walker.get_chan();
while let Ok((blk, blk_size)) = chan.recv() {
println!("Block {} have {} txs", block.height, block.txs.len());
for tx in blk.txs.iter() {
for txo in tx.outputs.iter() { /* Process txo data... */ }
for txi in tx.inputs.iter() { /* Process txi data... */ }
}
}Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.