This project provides additional information (source code, database scheme) for the article The Carbon Footprint of Bitcoin by Christian Stoll, Lena Klaaßen, and Ulrich Gallersdörfer. This project consists out of two applications:
- SlushPool data generation (can be found in /SlushPool)
- BlockCypher data generation (can be found in /BlockCypher)
This tool crawls the hash rate per location and hash rate distribution data from Slushpool and saves it into a local folder as .csv files. The UML-model can be viewed here.
- Java 8 JDK
- JavaFX (Oracle JDK has JavaFX included)
- Google GSON
- Install the Google GSON library from here
cd /cfootprint_bitcoin/SlushPool/
wget -O gson-2.8.5.jar https://search.maven.org/remotecontent?filepath=com/google/code/gson/gson/2.8.5/gson-2.8.5.jar
- Compile files
javac -cp gson-2.8.5.jar src/model/distribution/*.java src/model/location/*.java src/controller/*.java
cd src/
java -cp ../gson-2.8.5.jar:. controller.App
This tool crawls blockdata from BlockCypher and stores it into a MySQL-database. It later queries IPInfo for location information about the miners.
- PHP 7
- any MySQL version
- import
scheme.sql
into your database - adapt settings in
config.php
- use CLI (e.g.
php
) to executephp getBlocks.php
to generate block dataphp getLocation.php
to generate location data