Coder Social home page Coder Social logo

phm87 / notarystats Goto Github PK

View Code? Open in Web Editor NEW

This project forked from webworker01/notarystats

0.0 0.0 0.0 22 KB

Gather statistics for Komodo notary network

Home Page: https://komodostats.com

License: GNU General Public License v3.0

PHP 100.00%

notarystats's Introduction

Scan KMD blockchain for notarization counts by notary

This program extracts the logic for counting notarization scores for komodostats.com to showcase how it works. The main difference between this code and the website codebase is the addition of using bitcore indices to reduce the amount of rpc calls required to retrieve the notarization data.

For the 2018-2019 season almost 500k blocks (814,000 to 1,307,200) and a little over 1.7 million total notary transactions need to be analyzed to produce the year end results. Using the bitcore indexes speeds up the process quite a bit compared to the original method used on komodostats.com but scanning and parsing every transaction still takes quite a while.

blackjok3r has written some code to use the built in notarizations database in komodod which is probably 50 times faster and this script might be updated to use that or a new codebase started based on that.

Install

Requires PHP (tested on PHP7)

sudo apt install php

Requires komodod with bitcore indexes enabled

In your komodo.conf

addressindex=1
timestampindex=1
spentindex=1

Restart with these added and allow the daemon to reindex

  • git clone this repo
  • cd notarystats
  • composer install
  • cp config.example.php config.php
  • nano config.php and edit the rpc credentials

Running

php notarystats.php

notarystats's People

Contributors

webworker01 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.