Open michele-nuzzi opened 3 months ago
additionally to golden tests, since this issue is likely to re-appear for each time new builtins are added, or some costs modified It would be great if the error message could report the input data used to get to the final, expected hash
@lehins tagging you to get this under your radar
This is a major blocker on my side, but of course, I understand there is a lot of stuff going on other than this.
Script hash mechanism has not changed in Conway, so I am not sure what exactly is the problem that you are experiencing. Worth noting that it is not relevant how the redeemers are represented, we use the original bytes that were submitted over the wire for script integrity hash computation.
additionally to golden tests, since this issue is likely to re-appear for each time new builtins are added, or some costs modified
Golden tests are not gonna help in this case, since as I mentioned algorithm has not changed, while cost models can change at any point. Are you sure you are using the correct cost model for computing the hash?
It would be great if the error message could report the input data used to get to the final, expected hash.
This is definitely a good idea to report original bytes that where used to compute the correct script integrity hash, since that would make debugging issues like that much easier. Unfortunately we won't be able to add this feature until the next era or at the earliest the next intra-era hard fork, since we can't change predicate failures at an arbitrary point.
If you include the offending transaction as hex encoded cbor, I could assist a little better, until then I can't really tell what is giving you trouble.
since the introduction of PlutusV3
script_data_hash
calculation for some downstream tools broke, including plu-ts.I am querying v3 costs models directly from a fully synced cardano-node on sanchonet, as follows:
which gives me back the following array:
After checking with the plutus team I'm confident in saying that these parameters are preserved.
I have a simple transaction, with a single redeemer and no datums;
The only redeemer is the following:
with conway allowing for multiple representations of the redeemer witnesses, I'm testing for both, even though I am aware that the intended representation should be "as-is" from the cbor, the tool used to build the transaction is the same used for testing.
The expected hash, part of the error message is:
yet nothing seems to get me the same result:
exhibit 1: redeemers as map
input data:
resulting hash:
exhibit 2: redeemers as array
resulting hash: