Git Product home page Git Product logo

punisher's Introduction

Punisher

This script implements receiving complaints about idle or cheating validators, checking complaints and voting for complaints to fine such validators.

This script is used by validators that, for some reason, do not use mytonctrl.

If you are using mytonctrl (recommended) you do not need to use this script, as the complete slashing process is already built into mytonctrl.

Note that identifying idle or cheating validators and submitting a complaint for such validators is not implemented in the script and it is assumed that this is done by validators using mytonctrl.

This single file script has no dependencies and can be easily reviewed.

Slashing process documentation: TIP-13, TIP-14.

How to use

  1. Download the script:
wget https://raw.githubusercontent.com/newton-blockchain/punisher/master/punisher.py
  1. Edit the script parameters, section fix me (insert your values):
nano punisher.py
  1. Make the script executable:
chmod 755 punisher.py
  1. Now you can run the script
./punisher.py
  1. Add the script to crontab:
crontab -e

then add line

5       */4     *       *       *       /path/to/punisher.py >/tmp/punisher.out 2>&1

(run script every 4 hours and write output to /tmp/punisher.out file

Checking the script

Try running the script manually to see the output. On first launch, the script will check and vote for complaints. When you run it again, the script will tell you that it has already voted. Also, the script can work very quickly and without any special messages, when the complaints have not yet been created.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.