Skip to content

tthsn/blockstack-explorer

 
 

Repository files navigation

Blockstack Explorer

A Blockstack data explorer based on Insight UI (a Bitcoin blockchain explorer web application service for Bitcore Node) that uses the Insight API.

Installation instructions

Start with a clean install of Ubuntu 16.04.1 LTS. You'll need a significant amount of disk space to hold the bitcore-indexed Bitcoin blockchain. (~215gb as of block 440500).

Set up your bitcore node

As root:

apt-get update && apt-get dist-upgrade -y

apt-get install python-pip python-dev libzmq3-dev -y

Install Node

curl -sL https://deb.nodesource.com/setup_7.x | sudo -E bash -

apt-get install -y nodejs

Create a directory to hold your installation:

mkdir /data

npm install -g bitcore-node

Create your bitcore node:

bitcore-node create /data/blockstack-bitcore

Install insight-api and blockstack-explorer:

cd /data/blockstack-bitcore/

./node_modules/.bin/bitcore-node install insight-api

./node_modules/.bin/bitcore-node install git+https://github.com/blockstack/blockstack-explorer.git#master

Start bitcore & wait a long time while your bitcore-indexed Bitcoin node is created:

./node_modules/.bin/bitcore-node start

Depending on your disk speed and machine speed, this process can take days.

Setup a local copy of explorer api

Once your node is synced, you'll need to run a local copy of the explorer api script.

You'll first need a working installation of blockstack-cli.

This can be found in this repository in tools/runserver.py

You should run this in the same virtualenv as your blockstack-cli installation. You'll need to install a couple additional packages:

pip install --upgrade Flask

pip install --upgrade flask-crossdomain

Run the explorer api as follows:

cd tools/

./runserver.py

This will start the explorer api on port 5000.

Point your bitcore node to a local copies of explorer codebase:

If you want to use your local copy of the explorer api, you'll need to need to point your bitcore-node to a local copy of this repository. You'll also need to do this if you're looking to do development on the explorer.

To point your bitcore-node to a local explorer repository, you'll need to make a symlink to the local copy:

cd /data/blockstack-bitcore/

./node_modules/.bin/bitcore-node stop

rm -Rf ./node_modules/insight-ui

ln -s <path-to-checkout-out-blockstack-explore-repo> ./node_modules/insight-ui

Next, you'll need to edit public/index.html so that the web app knows the path to your local explorer api by setting window.blockstackApiPrefix to the right url.

In <head> there should be a tag similar to the following:

<script language="javascript">window.blockstackApiPrefix = 'http://localhost:5000';</script>

Finally, start your bitcore-node again:

./node_modules/.bin/bitcore-node start

To make sure changes to css and javascript are reflected without having to restart the bitcore-node, run grunt watch in the root directory of the repository.

About

A block explorer for Blockstack

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 66.3%
  • HTML 27.9%
  • CSS 5.8%