ethstats-client/README.md

77 lines
2.0 KiB
Markdown
Raw Permalink Normal View History

2015-02-12 23:30:12 +01:00
Ethereum Network Intelligence API
2020-09-28 19:37:37 +02:00
=================================
2015-02-11 23:21:10 +01:00
2020-09-28 19:37:37 +02:00
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.
2015-05-12 02:53:58 +02:00
2020-09-28 19:37:37 +02:00
## Available dashboards
* https://ethstats.net
* https://stats.goerli.net
* https://kotti.goerli.net
* https://mordor.dash.fault.dev
* https://classic.dash.fault.dev
2015-02-26 22:02:13 +01:00
## Prerequisite
2020-09-28 19:37:37 +02:00
* client: geth, besu, nethermind, or openethereum
* reporting: node js, npm, and pm2
2015-02-26 22:09:23 +01:00
2020-09-28 19:37:37 +02:00
## Installation
2015-02-26 22:02:13 +01:00
2020-09-28 19:37:37 +02:00
Clone the repository, install node dependencies, and run the pm2 daemon.
2015-02-11 23:21:10 +01:00
2015-04-06 05:54:13 +02:00
```bash
2020-09-28 19:37:37 +02:00
git clone https://github.com/goerli/ethstats-client.git
cd ethstats-client/
npm install
sudo npm install -g pm2
2015-02-25 22:16:04 +01:00
```
2015-02-26 22:09:23 +01:00
## Configuration
2020-09-28 19:37:37 +02:00
Configure the app modifying [app.json](/app.json).
2015-02-26 22:09:23 +01:00
2015-04-06 05:54:13 +02:00
```json
2020-09-28 19:37:37 +02:00
[
{
"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
}
}
]
2015-02-26 22:09:23 +01:00
```
2020-09-28 19:37:37 +02:00
Ask in Gitter for the secret: https://gitter.im/goerli/testnet
2015-02-26 22:45:24 +01:00
2020-09-28 19:37:37 +02:00
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`
2015-02-26 22:45:24 +01:00
2020-09-28 19:37:37 +02:00
The secrets for Mordor, Kotti, Goerli, and Classic are the same. The Ethereum mainnet secret is different.
2015-02-26 22:45:24 +01:00
2020-09-28 19:37:37 +02:00
## Run
2015-02-26 22:47:56 +01:00
2020-09-28 19:37:37 +02:00
Run it using pm2:
2015-02-26 22:47:56 +01:00
2015-04-06 05:54:13 +02:00
```bash
2020-09-28 19:37:37 +02:00
pm2 start app.json
2015-02-26 22:47:56 +01:00
```