Skip to content

Latest commit

 

History

History
executable file
·
72 lines (63 loc) · 2.36 KB

README.md

File metadata and controls

executable file
·
72 lines (63 loc) · 2.36 KB

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.