skalenetwork / bounty-agent

Bounty agent - part of SKALE Node Monitoring Service (NMS)

Home Page:https://skale.network

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Test Build and publish codecov Codacy Badge Discord

SKALE Bounty Agent

SKALE Bounty 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 various node metrics 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. Bounty agent runs on every node of SKALE network, periodically requests available bounties for validation work from the SMC(once for every epoch).

An important note about production readiness

Bounty 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.

Development

Requirements

Python ≥ 3.6.5

Install Dependencies

pip install -r requirements.txt
pip install -r requirements-dev.txt

Run tests locally

Requirements for tests

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

Run tests

py.test -v tests/

Build

For building Bounty agent docker image locally:

docker build -t your-bounty-image-name .

Documentation

in process

For more information

Learn more about the SKALE community over on Discord.

Contributing

If you have any questions please ask our development community on Discord. Discord

License

License Copyright (C) 2018-present SKALE Labs

About

Bounty agent - part of SKALE Node Monitoring Service (NMS)

https://skale.network

License:GNU Affero General Public License v3.0


Languages

Language:Python 91.5%Language:Shell 7.5%Language:Dockerfile 1.0%