3 - Create a MySQL database locally or with server installation
4 - Import table structure to MySQL database, table structure path: vapor/toolbar/vote_reward/database/dump_reward.sql
10 - Default file name:reward.json
11 - A `reward.json` would look like this:
15 "node_ip": "http://127.0.0.1:9889", // node API address, replace with self node API address
16 "chain_id": "mainnet", //Node network type
17 "mysql": { // Mysql connection information
19 "host": "192.168.30.186",
25 "log_mode": false // default
28 "xpub": "9742a39a0bcfb5b7ac8f56f1894fbb694b53ebf58f9a032c36cc22d57a06e49e94ff7199063fb7a78190624fa3530f611404b56fc9af91dcaf4639614512cb64", // Node public key (from dashboard Settings), replaced with its own
29 "account_id": "bd775113-49e0-4678-94bf-2b853f1afe80", // accountID
30 "password": "123456",// The password corresponding to the account ID
31 "reward_ratio": 20,// The percentage of a reward given to a voter per block
32 "mining_address": "sp1qfpgjve27gx0r9t7vud8vypplkzytgrvqr74rwz" // The address that receives the block reward, use the get-mining- address for mining address, for example, curl -x POST http://127.0.0.1:9889/get-mining-address -d '{}'
44 distribution of reward.
50 --config_file string config file. default: reward.json (default "reward.json")
51 -h, --help help for reward
52 --reward_end_height uint The end height of the distributive income reward interval, It is a multiple of the dpos consensus cycle(1200). example: 2400
53 --reward_start_height uint The starting height of the distributive income reward interval, It is a multiple of the dpos consensus cycle(1200). example: 1200
59 ./votereward reward --reward_start_height 6000 --reward_end_height 7200
66 When an error (Gas credit has been spent) is returned, UTXO needs to be merged.