Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

-M 4 seems to be broken, wrong status for backtracked transactions and ctez vaults are no longer avoided #684

Open
dansan566 opened this issue Sep 5, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@dansan566
Copy link
Contributor

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:

  1. Create a ctez vault and delegate it
  2. Don't allow the payout address to deposit
  3. Try to send the payout
  4. See the backtracked transaction on tzkt
  5. Set status for the specific cycle from "paid" to "failed" in reports/bakeraddress/payments/done and move it to reports/bakeraddress/payments/failed
  6. 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

  1. TRD does avoid the transaction
  2. 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 ..."
  3. M -4 works again

Environment

  • Build
  • Chain mainnet
  • actual command: python3 src/main.py -C 646 -P tzkt -M 4 -V on -D
@dansan566 dansan566 added the bug Something isn't working label Sep 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant