How to run MRD¶
Options¶
-hShow help message and exit.
-C --initial_cycle <int>Cycle to start payment(s) from. Valid range:
[-1,). Default value:-1(pay rewards that were most recently released). Cycle for which rewards were most recently released is calculated based on the formula:current_cycle - 1.-M --run_mode <int>Waiting decision after making pending payments. Valid range:
[1,4]. Default value:1. Values description:Run forever.
Run all pending payments and exit.
Run for one cycle and exit. Suitable to use with
-Coption.Retry failed payments and exit.
-O --payment_offset <int>Number of blocks to wait after a cycle starts before starting payments. This can be useful because cycle beginnings may be busy.
-N --network <MAINNET|BASENET>Network name. Default value:
MAINNET. The current test network of Mavryk isBASENET.-A --node_endpoint <node_url:port>Node potentially with protocol prefix especially if TLS encryption is used. Default value:
http://127.0.0.1:8732. This is the main Mavryk node used by the client for RPC queries and operation injections.-P --reward_data_provider <mvkt>Source that provides all needed data for reward calculations. Default and only value:
mvkt(MvKT API).-Ap --node_addr_public <url>Public node base URL. Default is
https://rpc.mavryk.network. This argument will only be used in case the reward provider is set toprpc. This node will only be used to query reward data and delegator list. It must be an ARCHIVE node.-b --base_directory <path>Directory for reports, configuration and logs. Default value:
~/pymnt. The directory contains the following folders:~/pymnt/cfg
~/pymnt/simulations
~/pymnt/reports
~/pymnt/logs
-D --dry_runRun without injecting payments. Suitable for testing. Does not require locking.
-E --signer_endpoint <url>URL used by the Mavryk signer to accept HTTP(S) requests. Default value:
http://127.0.0.1:6732.-d --dockerDocker installation flag. When set, docker script location should be set in
-E.-s --background_serviceMarker to indicate that MRD is running in daemon mode. When not given it indicates that MRD is in interactive mode.
-V --verbose <on|off>Produces a lot of logs. Default value:
on. Good for troubleshooting. Verbose logs go into app_verbose log file. App verbose log file is named with cycle number and creation date. For each cycle a new file is created and old file is moved to archive_backup directory after being zipped.-U --api_base_urlBase API URL for non-RPC providers. If not set, public endpoints will be used.
-inj --retry_injectedTry to pay injected payment items. Use this option only if you are sure that payment items were injected but not actually paid.
--syslogLog to syslog. Useful in daemon mode.
--log_file <path>Application log output folder path and file name. By default the logs are placed into the –base_directory e.g.::
~/pymnt/logs/app.log.
Examples¶
It is adviseable to use the verbose argument -V on every run because it makes debugging easier.
The most common use case is to run on MAINNET and start to make payouts from last released rewards or continue making payouts from the cycle last payment is done:
python3 src/main.py -V
Make payouts for a single cycle and exit:
python3 src/main.py -C 300 -M 3 -V
Make all pending payouts from last released cycle and exit:
python3 src/main.py -M 2 -V
Make pending payouts beginning from a cycle and exit:
python3 src/main.py -C 300 -M 2 -V
Run in dry-run mode on BASENET, make payouts for cycle 300 and exit:
python3 src/main.py -D -N BASENET -C 300 -M 3 -V
For help, run:
python3 src/main.py -h