blocks_iterator 0.2.0

Iterates Bitcoin blocks

MIT license Crates

Blocks iterator

Iterates over Bitcoin blocks, decoding data inside Bitcoin Core's blocks directory.


  • Blocks are returned in height order, it avoids following reorgs (see max_reorg parameter)
  • Blocks come with metadata like all block's previous outputs, it allows computing transactions fee.

Memory requirements and performance

Running iterate example on threadripper 1950X, Testnet @ 1970k, Mainnet @ 681k

Network --skip--prevout Memory Time
Mainnet false 10.3GB 1h:00m
Mainnet true 2.7GB 36m
Testnet false 3.2GB 5m
Testnet true 1.0GB 3m


  • iterate iterate over blocks and print block fee
  • heaviest find the transaction with greatest weight
  • most_output find the transaction with most output