Giter Site home page Giter Site logo

seatrips / lisk-network-reporter Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 1.0 40 KB

Backend service which runs along with Lisk and tracks the network status

Home Page: http://liskstats.net

License: GNU General Public License v3.0

JavaScript 95.65% Shell 4.35%

lisk-network-reporter's Introduction

Lisk Network Reporter

This is the backend service which runs along with Lisk and tracks the network status, fetches information through api and connects through WebSockets to lisk-network-stats to feed information.

Prerequisite

  • lisk up and running
  • node
  • npm

Installation

git clone https://github.com/karek314/lisk-network-reporter/
cd lisk-network-reporter
bash build.sh

Configuration

nano app.json

And modify

[
  {
    "name"              : "lisk-network-reporter",
    "script"            : "app.js",
    "log_date_format"   : "YYYY-MM-DD HH:mm Z",
    "merge_logs"        : false,
    "watch"             : false,
    "max_restarts"      : 10,
    "exec_interpreter"  : "node",
    "exec_mode"         : "fork_mode",
    "env":
    {
      "NODE_ENV"        : "production",
      "RPC_HOST"        : "localhost",
      "RPC_PORT"        : "8000", <- 8000 for mainnet, 7000 testnet
      "LISTENING_PORT"  : "8000", <- 8000 for mainnet, 7000 testnet
      "INSTANCE_NAME"   : "PICK_INSTANCE_NAME", <- pick your name
      "CONTACT_DETAILS" : "", <- contact details, email or nick on lisk.chat to contact in case any failure
      "NETWORK_MODE"    : "main",
      "WS_SERVER"       : "ws://liskstats.net:3000",
      "WS_SECRET"       : "Go to https://lisk.chat and ask around",
      "IS_FORGING"      : "no", <- Currently there is no simple endpoint to check if any delegate is forging on this node, set "yes" if you are actually forging (in top 101 and actually processing blocks, not standby)
      "VERBOSITY"       : 2
    }
  }
]

Run

Starting

pm2 start app.json --watch

Checking logs

pm2 logs lisk-network-reporter

Stopping

pm2 stop lisk-network-reporter

To do

  • Change peers count to reliable endpoint as soon implemented in Lisk
  • Change pending tx count to reliable endpoint as soon implemented in Lisk
  • If there is no build specified in Lisk then last commit should be used as soon implemented in Lisk
  • Implement reasonable check if node is forging as soon implemented in Lisk to replace preconfigured value in config

Credits

Thanks to cuberdo and his eth-net-intelligence-api. This software has been created on the top of his work.

lisk-network-reporter's People

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.