forked from cubedro/eth-net-intelligence-api
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
15 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
CONTACT_DETAILS | ||
INSTANCE_NAME | ||
LISTENING_PORT | ||
NODE_ENV | ||
NODE_ENV=production | ||
RPC_URL | ||
VERBOSITY | ||
VERBOSITY=2 | ||
WS_SECRET | ||
WS_SERVER |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,75 +1,34 @@ | ||
# Ethereum Network Intelligence API | ||
|
||
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. | ||
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/hemilabs/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 | ||
## Available dashboard | ||
|
||
## Prerequisite | ||
* client: geth, besu, nethermind, or openethereum | ||
* reporting: node js, npm, and pm2 | ||
* https://ethstats.hemi.xyz | ||
|
||
## Installation | ||
|
||
Clone the repository, install node dependencies, and run the pm2 daemon. | ||
Clone the repository, install node dependencies. | ||
|
||
```bash | ||
git clone https://github.com/goerli/ethstats-client.git | ||
git clone https://github.com/hemilabs/ethstats-client.git | ||
cd ethstats-client/ | ||
npm install | ||
sudo npm install -g pm2 | ||
``` | ||
|
||
## Configuration | ||
|
||
Configure the app modifying [app.json](/app.json). | ||
Set the following environment variables: | ||
|
||
```json | ||
[ | ||
{ | ||
"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" : "[email protected]", | ||
"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. | ||
* `CONTACT_DETAILS`: Optional email of the node maintainer. | ||
* `INSTANCE_NAME`: Name of the monitored node. | ||
* `LISTENING_PORT`: P2P port of the node. | ||
* `RPC_URL`: URL of the RPC endpoint of the node. | ||
* `WS_SECRET`: Server secret. Ask in [Discord](https://discord.gg/hemixyz) for it. | ||
* `WS_SERVER`: Server websocket URL. | ||
|
||
## Run | ||
|
||
Run it using pm2: | ||
|
||
```bash | ||
pm2 start app.json | ||
docker run --env-file .env --interactive --rm --tty hemilabs/ethstats-client:master | ||
``` |