-
Notifications
You must be signed in to change notification settings - Fork 23
[FR] - Extra ScriptData
for reference inputs with hashed datums
#803
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
Comments
Yes you are correct. I should have explained in the PR description.
I'm not opposed to this but we would need to investigate. |
I understand that you'd want to investigate, considering that my original assumption about hashed datums from PK inputs was incorrect (if you happen to know why the ledger prevents that, please let me know, this actually baffles me). About reference inputs however, I conducted my own investigation and hopefully this will convince you:
The solution here might simply be to allow to optionally add such datums whenever attaching a reference input, and collecting them similarly to those of outputs. On the other hand, reviving your original feature to have a dedicated field in the |
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 120 days. |
Internal/External
External
Area
Plutus
Describe the feature you'd like
In july 2024 I posted an issue to report that cardano-api was not providing a way to add extra script data to a transaction body that does not correspond to an output being paid with a datum hash.
Later on, this feature was implemented in this PR.
However, it was very quickly removed in this commit.
Recently, I dove deeper into the ledger rules and realized that my original feature request was only half relevant. It turns out that the ledger rules forbid to add a resolved datum for a PK input with a datum hash, which I was not aware off (and which I don't know the reason for). I am assuming this is the reason why this new feature was quickly removed after being introduced following my issue.
However, I say half relevant, because the ledger does allow to provide extra resolved datums for reference inputs with hashed datums, which, following the removal of this feature, is still not possible to achieve from within cardano-api, as far as I can see. Feel free to let me know if either this feature is already present elsewhere, or if it is a deliberate choice not to provide it.
I wish this feature would be brought back, even if solely dedicated to reference inputs. Whenever a reference input would be defined in a transaction body, users could be given the opportunity to bind a
ScriptData
to that reference input, similarly to how they can be attached to outputs. It does not necessarily need to be a full new field within a body, which, I agree, was a reasonable solution if those extra datums could come from different places.Describe alternatives you've considered
I am currently relying on the hack I described in my original issue, where i have to manually deconstruct the generated
ShelleyTxBody
, add the script data and re-bundle it after recomputing the script integrity hash. In case anybody is interested, this hack is performed here.The text was updated successfully, but these errors were encountered: