From d7289daddcb33b3519fcf91a4703a5aaf5db0e8c Mon Sep 17 00:00:00 2001 From: Raw Pong Ghmoa <58883403+q9f@users.noreply.github.com> Date: Mon, 28 Sep 2020 19:37:37 +0200 Subject: [PATCH] Update README.md --- README.md | 97 ++++++++++++++++++++++++++++++------------------------- 1 file changed, 53 insertions(+), 44 deletions(-) diff --git a/README.md b/README.md index 912e0df..9a9e54a 100644 --- a/README.md +++ b/README.md @@ -1,67 +1,76 @@ Ethereum Network Intelligence API -============ -[![Build Status][travis-image]][travis-url] [![dependency status][dep-image]][dep-url] +================================= -This is the backend service which runs along with ethereum and tracks the network status, fetches information through JSON-RPC and connects through WebSockets to [eth-netstats](https://github.com/cubedro/eth-netstats) to feed information. For full install instructions please read the [wiki](https://github.com/ethereum/wiki/wiki/Network-Status). +This is the backend service which runs along with ethereum nodes and tracks the network status, fetches information through JSON-RPC and connects through WebSockets to an [ethstats-server](https://github.com/goerli/ethstats-server) to feed information. +## Available dashboards +* https://ethstats.net +* https://stats.goerli.net +* https://kotti.goerli.net +* https://mordor.dash.fault.dev +* https://classic.dash.fault.dev ## Prerequisite -* eth, geth or pyethapp -* node -* npm +* client: geth, besu, nethermind, or openethereum +* reporting: node js, npm, and pm2 +## Installation -## Installation on an Ubuntu EC2 Instance - -Fetch and run the build shell. This will install everything you need: latest ethereum - CLI from develop branch (you can choose between eth or geth), node.js, npm & pm2. +Clone the repository, install node dependencies, and run the pm2 daemon. ```bash -bash <(curl https://raw.githubusercontent.com/cubedro/eth-net-intelligence-api/master/bin/build.sh) +git clone https://github.com/goerli/ethstats-client.git +cd ethstats-client/ +npm install +sudo npm install -g pm2 ``` -## Installation as docker container (optional) - -There is a `Dockerfile` in the root directory of the repository. Please read through the header of said file for -instructions on how to build/run/setup. Configuration instructions below still apply. ## Configuration -Configure the app modifying [processes.json](/eth-net-intelligence-api/blob/master/processes.json). Note that you have to modify the backup processes.json file located in `./bin/processes.json` (to allow you to set your env vars without being rewritten when updating). +Configure the app modifying [app.json](/app.json). ```json -"env": - { - "NODE_ENV" : "production", // tell the client we're in production environment - "RPC_HOST" : "localhost", // eth JSON-RPC host - "RPC_PORT" : "8545", // eth JSON-RPC port - "LISTENING_PORT" : "30303", // eth listening port (only used for display) - "INSTANCE_NAME" : "", // whatever you wish to name your node - "CONTACT_DETAILS" : "", // add your contact details here if you wish (email/skype) - "WS_SERVER" : "wss://rpc.ethstats.net", // path to eth-netstats WebSockets api server - "WS_SECRET" : "see http://forum.ethereum.org/discussion/2112/how-to-add-yourself-to-the-stats-dashboard-its-not-automatic", // WebSockets api server secret used for login - "VERBOSITY" : 2 // Set the verbosity (0 = silent, 1 = error, warn, 2 = error, warn, info, success, 3 = all logs) - } +[ + { + "name" : "besu-goerli", + "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" : "8545", + "LISTENING_PORT" : "30303", + "INSTANCE_NAME" : "My Besu Goerli Node 1337", + "CONTACT_DETAILS" : "goerli@example.com", + "WS_SERVER" : "ws://stats.goerli.net:3000", + "WS_SECRET" : "XXXXXXXXXX", + "VERBOSITY" : 2 + } + } +] ``` +Ask in Gitter for the secret: https://gitter.im/goerli/testnet + +Available Websockets: +* `ws://ethstats.net:3000` +* `ws://stats.goerli.net:3000` +* `ws://kotti.goerli.net:3000` +* `ws://mordor.dash.fault.dev:3000` +* `ws://classic.dash.fault.dev:3000` + +The secrets for Mordor, Kotti, Goerli, and Classic are the same. The Ethereum mainnet secret is different. + ## Run Run it using pm2: ```bash -cd ~/bin -pm2 start processes.json +pm2 start app.json ``` - -## Updating - -To update the API client use the following command: - -```bash -~/bin/www/bin/update.sh -``` - -It will stop the current netstats client processes, automatically detect your ethereum implementation and version, update it to the latest develop build, update netstats client and reload the processes. - -[travis-image]: https://travis-ci.org/cubedro/eth-net-intelligence-api.svg -[travis-url]: https://travis-ci.org/cubedro/eth-net-intelligence-api -[dep-image]: https://david-dm.org/cubedro/eth-net-intelligence-api.svg -[dep-url]: https://david-dm.org/cubedro/eth-net-intelligence-api