-M 4 seems to be broken, wrong status for backtracked transactions and ctez vaults are no longer avoided
dansan566 opened this issue · 0 comments
Describe the bug
In cycle 646, we had a backtracked batch. The status of all of those transactions was "paid". The backtracked batch was caused by this vault. The vault does not allow our payment address to deposit. We already had this issue but solved it in TRD once vaults (Kolibri and ctez) were introduced. TRD did just not process transactions when there was no default entry point or the vault was liquidated. TRD also gave a warning in the output and marked the transaction as failed in the report. This is no longer the case and this is why the entire batch failed.
We also tried to fix the backtracked batch by setting the status from "paid" to "failed" and moving the file to reports/failed. Then we used the M -4 (retry failed) functionality. However, TRD gave the following error message:
Exception in thread producer:
Traceback (most recent call last):
File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/threading.py", line 973, in _bootstrap_inner
self.run()
File "/Users/tezos-reward-distributor/src/pay/payment_producer.py", line 178, in run
self.retry_producer.retry_failed_payments()
File "/Users/tezos-reward-distributor/src/pay/retry_producer.py", line 75, in retry_failed_payments
batch = CsvPaymentFileParser().parse(payment_failed_report_file, cycle)
File "/Users/tezos-reward-distributor/src/util/csv_payment_file_parser.py", line 19, in parse
records = [self.from_payment_csv_dict_row(row, cycle) for row in dict_rows]
File "/Users/tezos-reward-distributor/src/util/csv_payment_file_parser.py", line 19, in <listcomp>
records = [self.from_payment_csv_dict_row(row, cycle) for row in dict_rows]
File "/Users/tezos-reward-distributor/src/util/csv_payment_file_parser.py", line 25, in from_payment_csv_dict_row
reward_log = RewardLog(row["address"], row["type"], 0, 0)
KeyError: 'address'
We also tried "fail" and "0" (was zero some time ago) in the csv file with the same result as above.
To Reproduce
Steps to reproduce the behavior:
- Create a ctez vault and delegate it
- Don't allow the payout address to deposit
- Try to send the payout
- See the backtracked transaction on tzkt
- Set status for the specific cycle from "paid" to "failed" in reports/bakeraddress/payments/done and move it to reports/bakeraddress/payments/failed
- Use the -M 4 function (works also in dry run so you need to copy it to simulations/bakeraddress/payments/failed).
Expected behavior
We would expect that
- TRD does avoid the transaction
- TRD gives a warning message in the output and marks the transaction as failed. Funnily, the description does still work "Investigate on https://tzkt.io - Liquidates oven ..."
- M -4 works again
Environment
- Build
- Chain mainnet
- actual command:
python3 src/main.py -C 646 -P tzkt -M 4 -V on -D