Code Monkey home page Code Monkey logo

taproot-monitor's Introduction

Taproot Activation

About

Taproot is a new softfork on bitcoin network that will enhance privace and scalability, as well power new novels of aplications on top of it

Methodology

We will subscribe to bitcoind ZMQ notification system, witch send a notification every time something happens. In our case, every time a new block is found. Check wether the block was mined inside the defined window and if is signaling (has a very specific bit set on the header).

Data fetch

All the useful information will be exposed under a simple REST API, the returned data is a JSON as follow:

    started - Does the window started?
    ended - Does the window ended?
    window - Return a JSON with the begin and end of the window in UNIX timestamp
    count - The number of blocks with the bit set
    windowTotal - How many blocks has been mined since the window started
    leftToBeAssigned - How many blocks left into the window
    leftToActivate - How many blocks left to reach the threshold

Install

The program needs a Bitcoin Core (or any full node) synchronized with the network - prune is fine - with the ZMQ's pushblockhash option enabled. Also you need a instance of nodejs and npm installed, see here.
After setting up the core, you need clone the repository with:

    git clone https://github.com/Davidson-Souza/taproot-monitor.git
    cd taproot-monitor

Then install the required packages with npm

    npm install --save

Finaly, just run

    npm start

If your bitcoind has different settings, like port or password follow the steps bellow:

    cp .env_sample .env
    nano .env

Edit the .env file uncommenting what you need set by removing the #, as well inserting the proper informations. After that you can run with the npm start as above.

taproot-monitor's People

Contributors

davidson-souza avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 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.