Code Monkey home page Code Monkey logo

openblockchain-google-colab's Introduction


Run openblockchain-Google-Colab

https://colab.research.google.com/drive/1OShIMVcFZ_khsUIBOIV1lzrqAGo1gfm_?usp=sharing


get a clean copy from github

git clone --recursive https://github.com/haobtc/openblockchain.git

or if you already cloned to local disk,

git clone https://github.com/haobtc/openblockchain.git

then go to sub directory, update the submodule.

cd openblockchain/bitcoin

git submodule update --init --recursive

create db

#http://www.postgresql.org/download/linux/ubuntu/

sudo apt-get install postgresql-9.4

root#mkdir /chain/pg/ root#chown postgres /chain/pg/ root#su postgres postgres$/usr/lib/postgresql/9.4/bin/initdb -D /chain/pg/

You can now start the database server using:

/usr/lib/postgresql/9.4/bin/postgres -D /chain/pg/

or /usr/lib/postgresql/9.4/bin/pg_ctl -D /chain/pg/ -l logfile start or /etc/init.d/postgresql start /etc/init.d/postgresql stop /etc/init.d/postgresql restart /etc/init.d/postgresql status

sudo adduser dbuser in postgres command: CREATE USER dbuser WITH PASSWORD 'xxxxx'; CREATE DATABASE btcdb OWNER dbuser; GRANT ALL PRIVILEGES ON DATABASE btcdb to dbuser;

pg_restore -j 3 -d btcdb btcdb.file

vi ~/.bitcoin/bitcoin.conf

server=1 rpcuser=bitcoinrpc rpcpassword=xxxx daemon=1 txindex=1

build bitcoind

apt-get install build-essential libtool autotools-dev autoconf libssl-dev libboost-all-dev libdb-dev libdb++-dev pkg-config libpq-dev libevent-dev

./autogen.sh

./configure --disable-wallet --without-gui --disable-tests

make -j

./bitcoind -datadir= -daemon

#install for demo

apt-get install libleveldb1 libleveldb-dev

sudo pip install plyvel

#run api demo

cd api

cp config_sample.py config.py

modify config.py as server setting

gunicorn -w 4 -k gevent -b 0.0.0.0:5000 explorer_api:app gunicorn -w 4 -k gevent -b 0.0.0.0:9005 blockstore_api:app


Donation Address
BTC 1Lw2kh9WzCActXSGHxyypGLkqQZfxDpw8v
ETH 0xaBd66CF90898517573f19184b3297d651f7b90bf

openblockchain-google-colab's People

Contributors

danielsocials avatar demining avatar philsong avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Forkers

5l1v3r1

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.