Visualize the bitcoin blockchain from your local node

Overview

Project Overview

A new feature in Bitcoin Core 0.20 allows users to dump the state of the blockchain (the UTXO set) using the command dumptxoutset. I've written a python script utxo-live.py that takes the ouput of dumptxoutset and generates a heatmap of the blockchain via the UTXO set. Thus all of the active bitcoin in the blockchain is visualized in a single image from your own node.


Logo

Figure description: The heatmap is a two dimensional histogram showing the output date (x-axis), BTC amount (y-axis), and number of unspent outputs (color map) in each histogram bin. The BTC amounts on the y-axis are log scale and there are 100 bins in each log decade (e.g. 100 bins between 1 and 10 BTC). The bin size of output dates is one day. Zooming in to the image usually reveals more detail. A daily updating version of this image is running at utxo.live.

Privacy & Security

With the new dumptxouset command, the python script no longer requires an RPC password to access Core's databases. The script simply reads the dump file without interacting with Core at all. No private keys, passwords, xpubs, or wallet addresses are exchanged between Core and the python script.

Requirements

  • Bitcoin Core version 0.20 or higher
  • Python3 (comes standard on all operating systems)

Instructions for experienced users

  • Create a folder called utxo-live in a familiar location
  • Dump the utxo set bitcoin-cli dumptxoutset /xxxxxx.dat where xxxxxxx is the current block height (10-20 min) (Note: bitcoin-cli doesn't ship with Core on Mac OS, use Window->Console instead)
  • Install two python dependencies python3 -m pip install numpy matplotlib
  • Download utxo-live.py to your utxo-live folder and run it python3 utxo-live.py (20 min)

Step by step instructions

  1. Make sure Bitcoin Core (version 0.20 or higher) is running and synchronized.

  2. Create a new folder called utxo-live in a familiar location on your machine (e.g. in your Documents folder).

  3. Open a terminal window and display the current folder path. Do this by:

  • Windows: open a terminal (Start -> Command Prompt) and type:
echo %cd%
  • Mac/Linux: open a terminal (Mac: Applications -> Utilities -> Terminal) and type:
pwd
  1. Navigate to the utxo-live folder using the change directory cd command. For example if you're currently in Users/Steve/ (or on Windows C:\Users\Steve\) and you've created the folder Steve/Documents/bitcoin-tools/utxo-live/ then type:
cd Document/bitcoin-tools/utxo-live/

Note: Windows sometimes requires forward slashes / instead of back slashes \.

  1. Again display the current folder (Step 3) and copy to your clipboard the full path to the utxo-live folder. We will be pasting this path into Bitcoin Core soon.

  2. Leave the terminal window momentarily, and open the Bitcoin Core console window. (Alternatively for bitcoin-cli users, open another terminal window and type the console commands in the next steps as bitcoin-cli commands.)

Open Console Pic

  1. Get the current block count by typing in the console window:
getblockcount

and hitting enter. The output will look like:

  1. Dump the current utxo set by typing in the console window:
  dumptxoutset <PATH to utxo-live>/<xxxxxx.dat>

where is copy-pasted from Step 5, and is the block count. For example if the block count is 678505, the command (for my path) is:

  dumptxoutset /Users/Steve/Documents/bitcoin-tools/utxo-live/678505.dat

If there are no error messages after hitting enter, then it's working. It will take 10-20 minutes. Look in your utxo-live folder and you should see the file being created as xxxxxx.dat.incomplete.

  1. While the utxo file is dumping, download utxo-live.py and install two python dependencies. To do this:
  • Right click on utxo-live.py, choose "Save Link As" and select the utxo-live folder.

  • In the terminal window (not the Bitcoin console), type the following command to install two python dependencies:

  python3 -m pip install numpy matplotlib

Note: you might already have these installed, but running the command won't hurt anything.

  1. If 10-20 minutes have passed, check that the utxo dump is completed. Do this in two ways:
  • Check that the file no longer has .incomplete after xxxxxx.dat
  • Check that the Bitcoin Core console displays the results of the dump as something like:

  1. If the dump file is finished and Step 9 is completed (utxo-live.py is downloaded and python dependencies were installed), then run utxo-live.py by typing in the terminal:
  python3 utxo-live.py
  1. The program will take 20-30 minutes to complete and it will update you on the progress. If there are multiple xxxxxxx.dat files in the folder, it will ask you which one you'd like to process. When finished the image is stored in the folder as utxo_heatmap_xxxxxx.png.

Acknowledgements

I'm indebted to three main projects for the code, understanding, and inspiration for this project. The python functions that parse and decode the utxo dump file were adapted from Bitcoin_Tools. I learned how Core serializes utxos from Bitcoin-UTXO-Dump . An inspiring project that visualizes changes in the UTXO set as a movie is BitcoinUtxoVisualizer .

Geospatial Data Visualization using PyGMT

Example script to visualize topographic data, earthquake data, and tomographic data on a map

Utpal Kumar 2 Jul 30, 2022
Splore - a simple graphical interface for scrolling through and exploring data sets of molecules

Scroll through and exPLORE molecule sets The splore framework aims to offer a si

3 Jun 18, 2022
Using SQLite within Python to create database and analyze Starcraft 2 units data (Pandas also used)

SQLite python Starcraft 2 English This project shows the usage of SQLite with python. To create, modify and communicate with the SQLite database from

1 Dec 30, 2021
Small project demonstrating the use of Grafana and InfluxDB for monitoring the speed of an internet connection

Speedtest monitor for Grafana A small project that allows internet speed monitoring using Grafana, InfluxDB 2 and Speedtest. Demo Requirements Docker

Joshua Ghali 3 Aug 06, 2021
🗾 Streamlit Component for rendering kepler.gl maps

streamlit-keplergl 🗾 Streamlit Component for rendering kepler.gl maps in a streamlit app. 🎈 Live Demo 🎈 Installation pip install streamlit-keplergl

Christoph Rieke 39 Dec 14, 2022
University of Missouri - Kansas City: CS451R: Capstone

CS451RC University of Missouri - Kansas City: CS451R: Capstone Installation cd git clone https://github.com/ala2q6/CS451RC.git cd CS451RC pip3 instal

Alex Arbuckle 1 Nov 17, 2021
cqMore is a CadQuery plugin based on CadQuery 2.1.

cqMore (under construction) cqMore is a CadQuery plugin based on CadQuery 2.1. Installation Please use conda to install CadQuery and its dependencies

Justin Lin 36 Dec 21, 2022
Blender addon that creates a temporary window of any type from the 3D View.

CreateTempWindow2.8 Blender addon that creates a temporary window of any type from the 3D View. Features Can the following window types: 3D View Graph

3 Nov 27, 2022
patchwork for matplotlib

patchworklib patchwork for matplotlib test code Preparation of example plots import seaborn as sns import numpy as np import pandas as pd #Bri

Mori Hideto 185 Jan 06, 2023
基于python爬虫爬取COVID-19爆发开始至今全球疫情数据并利用Echarts对数据进行分析与多样化展示。

COVID-19-Epidemic-Map 基于python爬虫爬取COVID-19爆发开始至今全球疫情数据并利用Echarts对数据进行分析与多样化展示。 觉得项目还不错的话欢迎给一个star! 项目的源码可以正常运行,各个库的版本、数据库的建表语句、运行过程中遇到的坑以及解决方式在笔记.md中都

31 Dec 15, 2022
3D plotting and mesh analysis through a streamlined interface for the Visualization Toolkit (VTK)

PyVista Deployment Build Status Metrics Citation License Community 3D plotting and mesh analysis through a streamlined interface for the Visualization

PyVista 1.6k Jan 08, 2023
Active Transport Analytics Model (ATAM) is a new strategic transport modelling and data visualization framework for Active Transport as well as emerging micro-mobility modes

{ATAM} Active Transport Analytics Model Active Transport Analytics Model (“ATAM”) is a new strategic transport modelling and data visualization framew

Peter Stephan 0 Jan 12, 2022
A high-level plotting API for pandas, dask, xarray, and networkx built on HoloViews

hvPlot A high-level plotting API for the PyData ecosystem built on HoloViews. Build Status Coverage Latest dev release Latest release Docs What is it?

HoloViz 694 Jan 04, 2023
又一个云探针

ServerStatus-Murasame 感谢ServerStatus-Hotaru,又一个云探针诞生了(大雾 本项目在ServerStatus-Hotaru的基础上使用fastapi重构了服务端,部分修改了客户端与前端 项目还在非常原始的阶段,可能存在严重的问题 演示站:https://stat

6 Oct 19, 2021
CLAHE Contrast Limited Adaptive Histogram Equalization

A simple code to process images using contrast limited adaptive histogram equalization. Image processing is becoming a major part of data processig.

Happy N. Monday 4 May 18, 2022
Function Plotter: a simple application with GUI to plot mathematical functions

Function-Plotter Function Plotter is a simple application with GUI to plot mathe

Mohamed Nabawe 4 Jan 03, 2022
🐞 📊 Ladybug extension to generate 2D charts

ladybug-charts Ladybug extension to generate 2D charts. Installation pip install ladybug-charts QuickStart import ladybug_charts API Documentation Loc

Ladybug Tools 3 Dec 30, 2022
Tools for exploratory data analysis in Python

Dora Exploratory data analysis toolkit for Python. Contents Summary Setup Usage Reading Data & Configuration Cleaning Feature Selection & Extraction V

Nathan Epstein 599 Dec 25, 2022
CompleX Group Interactions (XGI) provides an ecosystem for the analysis and representation of complex systems with group interactions.

XGI CompleX Group Interactions (XGI) is a Python package for the representation, manipulation, and study of the structure, dynamics, and functions of

Complex Group Interactions 67 Dec 28, 2022
Typical: Fast, simple, & correct data-validation using Python 3 typing.

typical: Python's Typing Toolkit Introduction Typical is a library devoted to runtime analysis, inference, validation, and enforcement of Python types

Sean 171 Jan 02, 2023