Crawl the bitcoin network and aggregate stats for easy tracking.
Data published at census.yonson.dev and census.labs.yonson.dev. The schema for the raw data is in docs/census.schema.json.
This project includes a NixOS module for running automated censuses on a schedule.
Add to your flake.nix:
{inputs={bitcoin-node-census.url="github:nyonson/bitcoin-node-census";};outputs={self,nixpkgs,bitcoin-node-census}:
nixpkgs.lib.nixosConfigurations.yourhost=nixpkgs.lib.nixosSystem{modules=[bitcoin-node-census.nixosModules.default# ... your other modules];};}And configure it:
{services.bitcoin-node-census={enable=true;seedNode={address="192.168.1.238";port=8333;};concurrent=32;interval="weekly";# or "daily", "hourly", "monthly", etc.dataDir="/var/lib/bitcoin-node-census";};}The service is designed to run automatically on the configured schedule, but you can test it manually.
# Start a census run (non-blocking).
sudo systemctl start --no-block bitcoin-node-census
# Check service status.
sudo systemctl status bitcoin-node-censusNote: Census operations can take several hours to complete as they crawl the entire bitcoin network. Use --no-block to avoid hanging your terminal session.
Guidelines are codified in the justfile.
The code in this project is licensed under Creative Commons CC0 1.0.