ethstats-server/README.md

69 lines
1.9 KiB
Markdown
Raw Permalink Normal View History

2018-12-03 20:50:05 +01:00
Ethereum Network Stats with POA and POW support
===============================================
2015-02-25 22:28:20 +01:00
[![Build Status][travis-image]][travis-url] [![dependency status][dep-image]][dep-url]
2015-02-04 11:37:56 +01:00
2018-12-06 19:17:04 +01:00
This is a visual interface for tracking proof-of-work ("mainnet") and proof-of-authority ("testnet") network status. It uses WebSockets to receive stats from running nodes and output them through an angular interface. It is the front-end implementation for [ethstats-client](https://github.com/goerli/ethstats-client).
2018-12-03 14:16:26 +01:00
## Proof-of-Authority
2018-12-03 21:07:10 +01:00
![Screenshot](src/images/screenshot-poa.png "Screenshot POA")
2018-12-06 19:13:19 +01:00
* Demo: https://stats.goerli.net/
2020-09-28 19:40:45 +02:00
* Demo: https://kotti.goerli.net/
2018-12-06 19:13:19 +01:00
2018-12-03 20:50:05 +01:00
#### Prerequisite
* node
* npm
2018-12-03 20:50:05 +01:00
#### Installation
2015-02-26 20:06:51 +01:00
Make sure you have node.js and npm installed.
2015-02-04 11:37:56 +01:00
2018-12-03 20:50:05 +01:00
Clone the repository and install the dependencies:
2015-02-04 11:37:56 +01:00
2015-04-06 06:26:44 +02:00
```bash
2018-12-03 20:50:05 +01:00
git clone https://github.com/goerli/ethstats-server
cd ethstats-server
2015-02-26 20:06:51 +01:00
npm install
2015-08-01 17:21:53 +02:00
sudo npm install -g grunt-cli
2015-02-04 11:37:56 +01:00
```
2018-12-03 20:50:05 +01:00
#### Build
2018-12-01 01:19:45 +01:00
In order to build the static files you have to run grunt tasks which will generate dist directories containing the js and css files, fonts and images.
2015-07-27 15:37:42 +02:00
```bash
2018-12-03 14:16:26 +01:00
grunt poa
```
To build the static files for a network other than Ethereum copy and change src/js/defaultConfig.js and run the following command.
```bash
grunt poa --configPath="src/js/someOtherConfig.js"
```
2018-12-03 20:50:05 +01:00
#### Run
Start a node process and pass the websocket secret to it.
2018-12-03 14:16:26 +01:00
```bash
WS_SECRET="asdf" npm start
2015-07-27 15:37:42 +02:00
```
2018-12-03 20:50:05 +01:00
Find the interface at http://localhost:3000
2018-12-03 14:16:26 +01:00
2018-12-03 20:50:05 +01:00
## Proof-of-Work (Legacy)
2015-07-27 15:37:42 +02:00
2018-12-03 21:07:10 +01:00
![Screenshot](src/images/screenshot-pow.png "Screenshot POW")
2018-12-03 14:16:26 +01:00
2020-09-28 19:40:45 +02:00
* Demo: https://mordor.dash.fault.dev/
2018-12-06 19:13:19 +01:00
2018-12-03 14:16:26 +01:00
Same as above, just run the `pow` build task in Grunt.
2015-02-04 11:37:56 +01:00
2015-04-06 06:26:44 +02:00
```bash
2018-12-03 14:16:26 +01:00
grunt pow
2018-12-01 01:19:45 +01:00
WS_SECRET="asdf" npm start
2015-02-04 11:37:56 +01:00
```
2018-12-03 14:16:26 +01:00
2018-12-03 20:50:05 +01:00
:-)
2015-02-25 22:28:20 +01:00
2018-12-03 20:50:05 +01:00
[travis-image]: https://travis-ci.org/goerli/ethstats-server.svg
[travis-url]: https://travis-ci.org/goerli/ethstats-server
[dep-image]: https://david-dm.org/goerli/ethstats-server.svg
[dep-url]: https://david-dm.org/goerli/ethstats-server