/polkadot-watcher-validator

Primary LanguageTypeScriptApache License 2.0Apache-2.0

CircleCI

polkadot-watcher-validator

How to Run

Requirements

git clone https://github.com/w3f/polkadot-watcher.git
cd polkadot-watcher
cp config/main.sample.yaml config/main.yaml 
#just the first time

yarn
yarn build
yarn start

About

The watcher is a nodeJs application meant to be connected with a substrate based node through a web socket.
It can then monitor the status of the node, leveraging on mechanisms such as the builtin heartbeat.

Monitoring Features

  • A validator has been reported for Slash
  • A validator is not seleceted by Phragmen alorithm to be part of the active set
  • A validator has changed his payout address destination
  • A validator has an unexpected payout address destination
  • A validator has changed his commission rate
  • A validator has an unexpected commission rate

Unexpected payout address destination

Possible Payout Destination Types are 'Staked' | 'Stash' | 'Controller' | 'Account' | 'None'.
If an expected destination address is specified in the config file, it is implicit that you are expecting a type 'Account' to be matched.

Resources

Configuration

A sample config file is provided here

Validators from Git

The list of your addresses can be dynamically retrieved (app startup/restart) from a Git file. Check the GitConfigLoader implementation.

Prometheus

A Prometheus instance can be attached to this application thanks to the endpoint exposed at /metrics.
An Alerting system can be then built on top of that, see here

Deployment

The Dockerfile can be deployed into a Kubernetes cluster thanks to the polkadot-watcher chart.