Open Micrograx opened 1 week ago
Good catch!
My hypothesis for why this would be failing is that we don't handle it when balancing the commit transaction here (or at some other location - we usually test only with spending redeemers).
@Micrograx Is this to use the the "withrdraw 0" trick or are you actually wanting to withdraw rewards in your application?
Yes, we are planing to use the “withdraw 0” trick in our application to submit a collection of script UTxOs in the most efficient way possible.
Context & versions
Hydra-node: 0.19.0 Cardano-node: 9.1.0 Cardano-cli 9.2.1.0
Steps to reproduce
Actual behavior
The response transaction will fail to submit because the withdraw redeemer will be missing from the tx redeemers.
Expected behavior
The response transaction should maintain the withdraw redeemer in the list of redeemers
Workaround
Adding the redeemer manually and adjusting the execution units of the hydra redeemer, then recalculating the script integrity hash in the tx body (Field 11. You can easily get the correct value by trying to submit the edited transaction and copying it from the error message) and signing the tx again allows you to submit the tx and proceed with the commit procedure.
Details:
Example request json:
This transaction was built using this cardano-cli command:
and the used script was:
response from hydra node: