Git Product home page Git Product logo

satoshis-coins's Introduction

This is a utility that looks at the early hash rate of the Bitcoin network and exports data as JSON.

Running

This code is written for Python 3.5+. You'll also need a full Bitcoin Core node. To install the runtime dependencies, run pip install -r requirements.txt (possibly after creating a virtualenv). Afterwards you can run analyze.py with a URL that points to your Bitcoin node:

# Substitute your own rpc user/password when running this command.
$ python analyze.py http://rpcuser:[email protected]:8332

Methodology

The code is pretty straightforward: it just fetches blocks starting from the genesis block until enough data has been collected. Two things are worth noting:

  • The timestamps used are the start time for each difficulty period. Therefore the first data point has an indicated time of Jan 3, 2009, even that difficulty period ran up to Jan 27, 2009.
  • For simplicity, I estimate the network hash rate using the delta from the first two blocks in two consecutive difficulty periods. This is off-by-one from how difficulty is computed in the reference code, which is restricted to comparing the first block in the period to the last block in the same period (for consensus reasons). This doesn't affect the data analysis or conclusions in any way.

satoshis-coins's People

Contributors

eklitzke avatar

Stargazers

Yash Bhutwala avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.