Code Monkey home page Code Monkey logo

pivx-blockexplorer's Introduction

PIVX Block Explorer

Customized version of TREZOR block indexer: https://github.com/trezor/blockbook

Tested on Ubuntu 18, these instructions are for a manual or ad-hoc build.

INSTALL THESE PACKAGES

sudo apt-get update
sudo apt-get install -y build-essential software-properties-common lz4 zstd libsnappy-dev libbz2-dev libzmq3-dev golang librocksdb-dev liblz4-dev libjemalloc-dev libgflags-dev libsnappy-dev zlib1g-dev libbz2-dev libzstd-dev

FOR CHARTS TO WORK YOU WILL NEED TO INSTALL

sudo apt-get install -y python3-pip
pip install bitcoinrpc python-bitcoinrpc

CREATE THE DIRECTORIES

mkdir go

CREATE THE GO PATH

GOPATH=/home/<USER>/go   #CHANGE <USER> to your user name
cd go && mkdir src && cd src
git clone https://github.com/PIVX-Project/PIVX-BlockExplorer blockbook
cd blockbook

Edit build/blockchaincfg.json or build/tnblockchaincfg.json adding wallet info

go mod init
go mod tidy
go build

YOU WILL GET AN ERROR MESSAGE...THATS OK

RUN THESE SCRIPTS

./build.sh

SETUP NGINX and SSL certs

UNCOMMENT line for MAINNET or TESTNET

./launch.sh

Edit the following 2 python scripts with your RPC credentials

contrib/scripts/charts/updateCharts_blocks.py
contrib/scripts/charts/updateCharts_github.py

make sure you update config in updateCharts_blocks.py matching your pivxd credentials

run these every hour in a cron (crontab -e)

@hourly python3 /<full/path/to>/updateCharts_blocks.py
@hourly python3 /<full/path/to>/updateCharts_github.py

Out of memory when doing initial synchronization

How to reduce memory footprint of the initial sync:

  • disable rocksdb cache by parameter -dbcache=0, the default size is 500MB
  • run blockbook with parameter -workers=1. This disables bulk import mode, which caches a lot of data in memory (not in rocksdb cache). It will run about twice as slowly but especially for smaller blockchains it is no problem at all.

pivx-blockexplorer's People

Contributors

martinboehm avatar jakm avatar petrkr avatar random-zebra avatar jpochyla avatar palmtreevi avatar deansparrow avatar wakiyamap avatar y-chan avatar wo01 avatar wlc- avatar fuzzbawls avatar yura-pakhuchiy avatar thetrunk avatar suphero123 avatar admin-slush avatar icodeface avatar rikardwissing avatar sotblad avatar prusnak avatar bitspill avatar gruve-p avatar eabz avatar dajohi avatar fujicoin avatar dehumanizer77 avatar mathewcohle avatar ultimaweapon avatar samadsajanlal avatar scotty0448 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.