Skip to content
Reproduceable blockchain queries for science.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.
bitcoin-iterate @ 31a6ea7

"Needs more computer science, less noise." --Nick Szabo

Bitcoin Notebook connects Rusty Russell's bitcoin-iterate to the Jupyter iPython Notebook to enable fast and easy processing and graphing of bitcoin-iterate queries against the blockchain history in a way that is reproduceable and literate.

Check out the [example notebook](./notebooks/Bitcoin Notebook Hello World.ipynb) which contains demonstration queries, and a [PDF "paper" export](./notebooks/Bitcoin Notebook Hello World.pdf) of the same results.


from bi import bi
result = bi("--block %bl --end=140000")
plt.plot(result["results"]["%bl"], label="%bl")

Example query result


Run make to generate the Python virtualenv environment and compile bitcoin-iterate.


./bitcoin-notebook will launch the Jupyter server with the paths all configured correctly and open a browser window pointing at the notebook list.

Probably the most important thing to remember for people new to Jupyter is that pressing shift-Enter will re-run the code in the highlighted section.


You can run make dependencies if you're on a Debian based system. Otherwise the packages you will need before the virtualenv will deploy are:

* libfreetype6-dev
* liblapack-dev
* gfortran
* libpng12-dev

Run make dependencies-pdf to install the packages required for exporting to PDF. Here are the packages that will be installed:

* texlive-latex-base
* texlive-latex-extra
* texlive-fonts-recommended
* pandoc
You can’t perform that action at this time.