GithubHelp home page GithubHelp logo

dabura667 / mempool Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jhoenicke/mempool

0.0 2.0 0.0 103 KB

Bitcoin Mempool Statistics

License: GNU Affero General Public License v3.0

PLpgSQL 19.01% Perl 4.38% Shell 3.93% PHP 8.67% HTML 18.44% JavaScript 40.94% CSS 4.64%

mempool's Introduction

Bitcoin Mempool Statistics

This is the code to create the mempool statistics for bitcoin that are online at https://jochen-hoenicke.de/queue/

Installation: Part 1 - Logging

You need to be running a bitcoin full node. It can be a pruned node or an archival node. I assume you have already set it up. You also need to support RPC to this node. Add rpcuser/rpcpassword to bitcoin.conf to enable this.

I recommend to create a new user mempool. Checkout this repository into his home directory:

sudo -H -u mempool bash
cd $HOME
git clone https://github.com/jhoenicke/mempool

Edit mempool.sh to adapt paths as necessary, especially the path to bitcoin-cli. Add a bitcoin.conf with rpcuser/rpcpassword settings to /home/mempool/.bitcoin, to be able to use bitcoin-cli. You can test your setup by running

bitcoin-cli getinfo

Install sqlite3 and create a new empty database. Then you can test your configuration by running mempool.sh

sudo apt install sqlite3
cd mempool
sqlite3 mempool.s3db < mempool-create.sql
./mempool.sh

You are almost ready now. Check that everything works. There should be a file mempool.log containing one line of statistics. There should be newly created files in /dev/shm/mempool that contain the dynamic date the webserver should serve. If everything looks fine add the following crontab entry (using crontab -e):

* * * * * /home/mempool/mempool/mempool.sh 

Installation: Part 2 - Web service

Install a web server of your choice. For refreshing/zooming you need php and php-sqlite. Then link/copy the web subdirectory to the web root. Finally link to the dynamic js files in /dev/shm/mempool.

cd $HOME/mempool/web/queue
sudo ln -s $HOME/mempool/web/* /var/www/html
ln -s /dev/shm/mempool/*.js $HOME/mempool/web/queue/

mempool's People

Contributors

jhoenicke avatar

Watchers

 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.