Skip to content

1ma/blockstats

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OP_RETURN and Block Occupancy stats

Usage

Edit RPC_USER, RPC_PASSWORD and RPC_URL in bitcoin_rpc.py as needed. Edit start_height and end_height as desired in occupancy.py and opreturns.py.

$ python baremulti.py
$ python occupancy.py
$ python opreturns.py
$ python utxodust.py

utxodust.py does not need RPC access, but needs a file with the dumped UTXO set (values and scriptPubKeys at least).

$ bitcoin-cli dumptxoutset utxoset.csv '["value","scriptPubKey"]'

Requirements

  • Python +3.10
  • Unpruned Bitcoin Core or Bitcoin Knots node with RPC enabled

Performance Tuning

Set max_workers in occupancy.py and opreturns.py to match the number of cores in your machine.

The bottleneck of the scripts are its I/O operations. It's recommended to run them in the same machine as the node to avoid network traffic.

It's also helpful if the node machine has fast storage (NVME SSD) and lots of CPU cores. You can bump Core/Knots rpcthreads setting to match the number of cores in your machine (default value is only 4).

Reference block dates

Date Block Height
2020-01-01 610759
2021-01-01 663984
2022-01-01 716695
2023-01-01 769873
2024-01-01 823866
2025-01-01 877325
2025-04-26 894055

About

Scripts for collecting basic stats from the Bitcoin blockchain

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages