MRD is a fork of the TRD project.
This fork is distributed under the terms of the GNU General Public License v3.0.
All modifications made in this fork are released under the same license, ensuring that users have the freedom to use, study, modify, and redistribute the software.
DISCLAIMER: MAVRYK REWARD DISTRIBUTOR IS PROVIDED AS IS. IT IS UNDER CONSTANT DEVELOPMENT. EVENT THOUGH IT IS WELL TESTED, PLEASE USE IT WITH CARE. ALWAYS MAKE A PRE-RUN IN DRY MODE BEFORE MAKING ACTUAL PAYMENTS. IF YOU WANT TO RUN IN SERVICE MODE DO IT AFTER YOU ARE CONFIDENT WITH THE APPLICATION. IN SERVICE MODE ONLY UPDATE IF NEEDED.
PRIVACY: MAVRYK REWARD DISTRIBUTOR COLLECTS ANONYMOUS STATISTICS. PLEASE READ OUR STATISTICS POLICY FOR MORE INFORMATION.
MRD is a software for distributing staking rewards of Mavryk delegators, introduced in detail in this Medium article. This is not a script but a full scale application which can continuously run in the background as a Linux service. It can track cycles and make payments. However, it does not have to be used as a service, but it can also be used interactively.
The documentation can be found here.
MRD supports complex payments, pays in batches, and supports three backends for calculations: Mavryk RPC and MvKT API. MRD is developed and tested extensively by the community.
Provider notes:
The terms of use of MvKT API allow for commercial and non-commercial use.
MvKT API is free for everyone and for both commercial and non-commercial usage.
If your application or service uses the MvKT API in any forms: directly on frontend or indirectly on backend, you should mention that fact on your website or application by placing the label "Powered by MvKT API" with a direct link to api.mavryk.network.
The setup instructions are Linux specific. Python 3 is required. You can use the following commands to install it.
sudo apt-get update
sudo apt-get -y install python3-pipDownload the application repository using git clone:
git clone https://github.com/mavryk-network/mavryk-reward-distributorTo install required modules, use pip with requirements.txt provided. Follow the instructions to create a virtual environment for your project specific python installation: https://packaging.python.org/en/latest/guides/installing-using-pip-and-virtual-environments/
python3 -m venv .venv
source .venv/bin/activatecd mavryk-reward-distributor
python3 -m pip install -r requirements.txtTo install the required modules for developers, use pip with requirements_developers.txt provided.
cd mavryk-reward-distributor
python3 -m pip install -r requirements_developers.txtRegularly check and upgrade to the latest available version:
git fetch origin #fetches new branches
git status #see the changes
git pullBefore running MRD, you need to configure it by adding your validator's address and payout settings.
The configuration file should be included in the ~/pymnt/cfg/ directory by default. You can use the following command to copy and modify the example configuration:
# create directory
mkdir -p ~/pymnt/cfg/
cp mavryk-reward-distributor/examples/mv1BooTWe9vnuvN1o756pE6yC8jNcsVDCp9N.yaml ~/pymnt/cfg/
nano ~/pymnt/cfg/mv1BooTWe9vnuvN1o756pE6yC8jNcsVDCp9N.yamlFor a list of parameters, read the online documentation, or run:
python3 src/main.py --helpThe most common use case is to run in mainnet and start to make payments for the latest released rewards or continue making payments from the cycle after the last payment was done.
python3 src/main.pyMRD necessitates of an interface to get provided with income and delegator data in order to perform the needed calculations.
The default provider is the MvKT API. However, it is possible to change the data provider to a local node with the flag -P rpc.
In this case, the default node would be 127.0.0.1:8732. In order to change the node URL for the provider, you can pass it in the form node_url:port using the flag -A (e.g. -P rpc -A 127.0.0.1:8733). Please note that the node should be an archive node, and that the port should be the RPC port specified while launching the node.
It is also possible to use a public RPC node with flag -P prpc, which defaults to https://rpc.mavryk.network.
