tezos-reward-distributor-organization / tezos-reward-distributor

Tezos Reward Distributor (TRD): A reward distribution software for tezos bakers.
https://tezos-reward-distributor-organization.github.io/tezos-reward-distributor/
GNU General Public License v3.0
87 stars 51 forks source link

TRD fails to pay KT1 accounts, but reports payouts as successful #619

Closed baketzforme closed 1 year ago

baketzforme commented 1 year ago

Describe the bug Symptom: TRD failed the batch payments to KT1 accounts, but sent me a notification saying everything succeeded. Cause: consumed_gas is deprecated in favor of consumed_milligas.

To Reproduce

  1. Run TRD on Kathmandu protocol with payouts for smart contracts (KT1 accounts).
  2. It will error while making KT1 payouts.
  3. It will erroneously say that the payout batch succeeded.
  4. TRD generates a done.csv report which lists the KT1 accounts as UNDEFINED instead of failed.

Expected behavior I expect payouts to KT1 accounts to succeed. Or that TRD will properly report errors and failed payments instead of thinking they succeeded and listing them as UNDEFINED.

Logs

Sep 24 03:53:05 2022-09-24 03:53:05,530 - consumer0 - INFO - Payment of batch 2 started
Sep 24 03:53:05 2022-09-24 03:53:05,629 - consumer0 - ERROR - Batch payment attempt 1/3 for current batch failed with error
Sep 24 03:53:05 Traceback (most recent call last):
Sep 24 03:53:05   File "/home/baker/trd/src/pay/batch_payer.py", line 465, in pay_single_batch
Sep 24 03:53:05     status, operation_hash, error_message = self.attempt_single_batch(
Sep 24 03:53:05   File "/home/baker/trd/src/pay/batch_payer.py", line 686, in attempt_single_batch
Sep 24 03:53:05     simulation_status, simulation_results = self.simulate_single_operation(
Sep 24 03:53:05   File "/home/baker/trd/src/pay/batch_payer.py", line 550, in simulate_single_operation
Sep 24 03:53:05     consumed_gas = int(op["metadata"]["operation_result"]["consumed_gas"])
Sep 24 03:53:05 KeyError: 'consumed_gas'
Sep 24 03:53:05 2022-09-24 03:53:05,643 - consumer0 - INFO - Payment of batch 2 succeeded in 1 attempt(s)

Environment

Additional context KT1 payouts fixed by #618

baketzforme commented 1 year ago

Fixed by #618 which has been merged.