Skip to content
HackyMiner edited this page May 6, 2019 · 1 revision

eth-netstats client for pools.

It supports the hashrate, miners, immature/new blocks of pool client.

Install

  1. git clone https://github.com/EthersocialNetwork/eth-net-client-api
  2. cd eth-net-client-api; git checkout -b work origin/pool # checkout pool branch
  3. npm i
  4. sudo npm -g i pm2 # install pm2 globally
  5. make your own app-foobar.json settings. for example
[
  {
    "name"              : "my-pool-name",
    "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"        : "experiment",
      "NODE_TYPE"       : "pool", // for poolstats
      "RPC_HOST"        : "localhost", // your geth node settings
      "RPC_PORT"        : "9545", // geth port
      "API_HOST"        : "pool.ethersocial.network", // for poolstats. api host name
      "API_PORT"        : "80", // pool api port
      "API_URL"         : "/api/stats",
      "LISTENING_PORT"  : "50505",
      "INSTANCE_NAME"   : "pool.ethersocial.network",
      "CONTACT_DETAILS" : "pool.ethersocial.network information.",
      "WS_SERVER"       : "wss://stats.ethersocial.org",
      "WS_SECRET"       : "EtherSocial", // WS_SECRET password
      "VERBOSITY"       : 2
    }
  }
]
  1. pm2 start app-foobar.json and see https://stats.ethersocial.org/

Notes

Since 2016, the geth client already supports native eth-netstats client api

geth --ethstats your-client-name:wss-secret@ws://your-stats.server.com

Clone this wiki locally