turboflakes / crunch

Crunch is a command-line interface (CLI) and Matrix Bot to claim staking rewards every Era for Substrate-based chains
https://turboflakes.io
Apache License 2.0
64 stars 22 forks source link

Validator reward daily flag not respected #16

Closed ScepticMatt closed 2 years ago

ScepticMatt commented 2 years ago

I'm trying to pay out KSM rewards daily for multiple stash addresses. Despite the daily flag, the payout was triggered every era. After increasing the batch size to 100, the payments don't happen after 24 hours. What am I misunderstanding?

Sep 21 11:28:28 crunch[1174245]: [2022-09-21T11:28:28Z INFO  crunch::report] 💯 Payout for era <del>4228</del> finalized at block #14547497
Sep 21 17:31:40 crunch[1312875]: [2022-09-21T17:31:40Z INFO  crunch::report] 💯 Payout for era <del>4229</del> finalized at block #14551089
Sep 21 23:32:11 crunch[1312875]: [2022-09-21T23:32:11Z INFO  crunch::report] 💯 Payout for era <del>4230</del> finalized at block #14554653

arguments:

ExecStart=/home/payment/crunch/target/release/crunch \
  --config-path /home/payment/stuffs/.env.kusama \
  --substrate-ws-url ws://127.0.0.1:9944 \
  rewards --short -f /home/payment/stuffs/.private_file \
 --disable-public-matrix-room \
 --disable-matrix daily

latest config

CRUNCH_SUBSTRATE_WS_URL=ws://127.0.0.1:9944
CRUNCH_MAXIMUM_PAYOUTS=84
CRUNCH_MAXIMUM_HISTORY_ERAS=84
CRUNCH_MAXIMUM_CALLS=100
paulormart commented 2 years ago

Hi @ScepticMatt,

Try with daily after the subcommand rewards and not in the end, eg:

ExecStart=/home/payment/crunch/target/release/crunch \
  --config-path /home/payment/stuffs/.env.kusama \
  --substrate-ws-url ws://127.0.0.1:9944 \
  rewards daily --short -f /home/payment/stuffs/.private_file \
 --disable-public-matrix-room \
 --disable-matrix

With CRUNCH_MAXIMUM_CALLS=100 you could end in a situation where the batch fails because of the block weight. If the validators have a lot of nominators most likely the chain will not support 100 payout_stakers calls in a single batch extrinsic.

ScepticMatt commented 2 years ago

or, will try that

max_calls 100 is failing, yes:

: Invalid Transaction, data: Some(RawValue("Transaction would exhaust the block limits"))
ScepticMatt commented 2 years ago

so far it is working as expected