Skip to content

mhanne/block_browser

Repository files navigation

This application lets you browse the bitcoin blockchain database generated by a bitcoin-ruby node.

A demo instance is running on webbtc.com.

Requirements

  • ruby 2.1.5

  • rubygems, bundler

  • database adapter (postgres recommended)

Blockchain Database

To run your own block_browser instance, you need a bitcoin-ruby-blockchain database. Use bitcoin-ruby-node to build it:

bitcoin_node -n testnet3 -s archive::postgres:/bitcoin

(Or grab a dump from dumps.webbtc.com to speed up the import)

Setup

Copy config/application.yml.sample to config/application.yml and adjust it to your needs.

Then install the required gems

bundle install

Starting the server

And start the server

rails s

Start the websocket server that connects to the bitcoin node and pushes new blocks to clients

rails runner lib/websocket.rb

Collect stats / generate graphs

To collect the statistics used on /stats page

rails runner lib/stats.rb

To generate the graphs for /stats page

rails runner lib/graph.rb

License

Copyright © 2011-2015 Marius Hanne <[email protected]>

This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License, version 3, as published by the Free Software Foundation.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

A copy of the license is included in {file:COPYING}, see www.gnu.org/licenses/ for more details.