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] - Transaction submit fails with invalid Plutus script even when passing --script-invalid #947

Closed
mkoura opened this issue Feb 9, 2024 · 0 comments · Fixed by #949
Labels
bug Something isn't working

Comments

@mkoura
Copy link

mkoura commented Feb 9, 2024

Internal/External
Internal if an IOHK staff member.

Area
Plutus Related to Plutus Scripts (Alonzo).

Summary
In Babbage, when building a Tx with invalid Plutus script and passing --script-invalid, the transaction submit command fails with

Command failed: transaction submit Error: Error while submitting tx: ShelleyTxValidationError ShelleyBasedEraBabbage (ApplyTxError [UtxowFailure (UtxoFailure (AlonzoInBabbageUtxoPredFailure (UtxosFailure (ValidationTagMismatch (IsValid True)

Steps to reproduce
Steps to reproduce the behavior:

  1. Build a Tx with invalid script, like

cardano-cli transaction build-raw --fee 401915 --out-file test_script_invalid_ci0_smx_step2_tx.body --tx-in "137ed52500bcf0fa4e42ed7ead54714a675750efbd6d71acbccd851dd375f253#0" --tx-in-script-file cardano_node_tests/tests/data/plutus/v1/always-fails.plutus --tx-in-execution-units "(1476468,11700)" --tx-in-datum-file cardano_node_tests/tests/data/plutus/typed-42.datum --tx-in-redeemer-file cardano_node_tests/tests/data/plutus/typed-42.redeemer --tx-in-collateral "137ed52500bcf0fa4e42ed7ead54714a675750efbd6d71acbccd851dd375f253#1" --protocol-params-file /home/martink/Source/repos/cardano-node/state-cluster0/pparams-apon.json --tx-in "137ed52500bcf0fa4e42ed7ead54714a675750efbd6d71acbccd851dd375f253#2" --tx-out "addr_test1vzrrpjvdssy4zycc9trymrccvx62u8tacjxe4939gjh2y6gv72pk2+2000000" --tx-out "addr_test1wrqvvu0m5jpkgxn3hwfd829hc5kfp0cuq83tsvgk44752dsz4mvrk+2995389947" --tx-out-datum-hash fcaa61fb85676101d9e3398a484674e71c45c3fd41b492682f3b0054f4cf3273 --script-invalid --babbage-era

  1. Sign and submit the Tx

cardano-cli transaction sign --tx-body-file test_script_invalid_ci0_smx_step2_tx.body --testnet-magic 42 --signing-key-file test_script_invalid_ci0_scs_payment_addr_1.skey --signing-key-file test_script_invalid_ci0_scs_payment_addr_0.skey --out-file test_script_invalid_ci0_smx_step2_tx.signed

cardano-cli transaction submit --testnet-magic 42 --tx-file test_script_invalid_ci0_smx_step2_tx.signed

  1. See error

The transaction build command behaves the same.

Expected behavior
It is possible to submit a Tx with invalid script, e.g. in order to test collateral behavior.

System info (please complete the following information):

  • OS Name: Fedora 38
  • node version: 8.8.0-pre

Screenshots and attachments
issue_invalid_script.tar.gz

@mkoura mkoura added the bug Something isn't working label Feb 9, 2024
@mkoura mkoura transferred this issue from IntersectMBO/cardano-api Feb 9, 2024
github-merge-queue bot pushed a commit that referenced this issue Feb 12, 2024
…dTx caught by node integration tests (#949)

Closes #947

fixes a bug introduced in #865 that caused transactions with invalid
scripts to be rejected, even in cases (i.e. node-to-client) where the
user should be able to submit transactions with invalid scripts if they
really want to
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
1 participant