Bitcoin and Neo4j

Neo4j The database this website's blockchain explorer runs on.

This website's blockchain explorer is powered by Neo4j (a graph database).

I think a graph database is the most natural fit for storing bitcoin data, as all blocks and transactions are connected together to create one giant graph:

Browser

You can browse the Bitcoin graph database using the Neo4j browser here: Animated gif of the bitcoin graph database through the Neo4j browser.

Download

You can download a copy of the bitcoin graph database here:

  • Tar: not available

Import

Here's the code I use to import the blockchain from a Bitcoin Core node in to Neo4j:

Animated gif of the terminal when running the import program.

This script will run through the entire blockchain and import it in to Neo4j, but you will need to wait a few months for it to complete. Also, for good measure, the database will measure around 6x the size of the blockchain.

Tutorials

Hey there, it's Greg.

I'll let you know if something seriously interesting happens in bitcoin.


Don't worry, it doesn't happen very often.