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

[BUG] - Cli prevents spending from script with inline datum at same utxo #3917

Closed
catch-21 opened this issue May 26, 2022 · 2 comments
Closed
Labels
bug Something isn't working comp: cardano-cli era: babbage type: bug Something is not working user type: internal Created by an IOG employee Vasil

Comments

@catch-21
Copy link
Contributor

catch-21 commented May 26, 2022

Internal/External
Internal if an IOHK staff member.

Area
Plutus Related to Plutus Scripts (Alonzo).

Summary
The cli enforces including datum with a spending script input. This combined with the limitation where inline datum cannot also exist in the witness set (see here) means it is not possible to consume/reference an output with inline datum to satisfy the spending script. Including datum for spending script should be optional.

Steps to reproduce
Steps to reproduce the behavior:

  1. With on output with inline datum at a script address that satisfies the script
  2. Attempt to spend the script output with the cli

Actual result
When using --tx-in-script-file you must provide --tx-in-datum-*. Doing so will result in the following ledger error:

ShelleyTxValidationError ShelleyBasedEraBabbage (ApplyTxError [UtxowFailure (FromAlonzoUtxowFail (NonOutputSupplimentaryDatums (fromList [SafeHash "9e1199a988ba72ffd6e9c269cadb3b53b5f360ff99f112d9b2ee30c4d74ad88b"]) (fromList [])))])

Expected behavior
It is possible to use --tx-in-script-file and omit --tx-in-datum-* so that only the inline datum is used for script execution, or perhaps you need to also reference the same input (without needing to attach datum).

System info (please complete the following information):

@catch-21
Copy link
Contributor Author

catch-21 commented Jun 6, 2022

We should also fix this for reference inputs
It'll make --reference-tx-in-datum-* optional.

@catch-21 catch-21 changed the title [BUG] - Cli prevents spending from script with inline datum [BUG] - Cli prevents spending from script with inline datum at same utxo Jun 7, 2022
@catch-21
Copy link
Contributor Author

catch-21 commented Jun 9, 2022

Resolved by #4006

@catch-21 catch-21 closed this as completed Jun 9, 2022
@dorin100 dorin100 added type: bug Something is not working user type: internal Created by an IOG employee comp: cardano-cli era: babbage labels Oct 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working comp: cardano-cli era: babbage type: bug Something is not working user type: internal Created by an IOG employee Vasil
Projects
None yet
Development

No branches or pull requests

2 participants