SKALE SLA Agent - decentralized SLA metrics and part of the SKALE Node Monitoring Service (NMS)
SKALE SLA Agent is a part of each SKALE Node, and together is part of the SKALE Node Monitoring Service (NMS).
Every SKALE node has a NMS group of N (e.g. 24) other nodes in the network randomly assigned to it. NMS groups regularly audit node downtime and latency at predetermined periods (e.g. five minutes), log these measurements to their local databases, and submit average metrics to the SKALE Manager Contract (SMC) once for every reward period - epoch (e.g. 30 days). Every node is rewarded for its validation efforts, based on results sent by NMS group of this node, at the end of each epoch.
SLA agent runs on every node of SKALE network, periodically requests a list of nodes to monitor from SKALE Manager contract, conducts monitoring of these other nodes (e.g. node downtime, latency, container health), logs these measurements, and sends average metrics per epoch to SMC (once for every epoch).
SLA Agent is still in active development and therefore should be regarded as alpha software. The development is still subject to security hardening, further testing, and breaking changes. This repository has not yet been reviewed or audited for security.
Python ≥ 3.6.5
pip install -r requirements.txt
pip install -r requirements-dev.txt
You have to change the name of .env_template
file to .env
and fill it out with your environment variables.
Then run:
bash ./scripts/create_environment.sh
The script above:
1) runs MySQL docker container with required database and tables created
2) runs Ganache docker container and deploys SKALE Manager contracts to it
Then run following script to create and enable a test validator and to make some additional preparations for tests:
python tests/prepare_validator.py
py.test -v tests/
For building SLA agent docker image locally:
docker build -t your-sla-image-name .
in process
Learn more about the SKALE community over on Discord.
If you have any questions please ask our development community on Discord.
Copyright (C) 2018-present SKALE Labs