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] - misleading error message - transaction build reports locked input as not locked #4479

Closed
mkoura opened this issue Sep 26, 2022 · 0 comments · Fixed by #4484
Closed
Labels
bug Something isn't working comp: cardano-cli type: regression A feature that worked before stoped working user type: internal Created by an IOG employee

Comments

@mkoura
Copy link
Contributor

mkoura commented Sep 26, 2022

Internal

Area
Native Tokens

Summary
The transaction build command fails when collateral is script locked, this is expected behavior. Previously the command failed with "Expected key witnessed collateral" error.
However now, when the same txin is used for both locked input and collateral, transaction build reports that tx input is not locked:

$ cardano-cli transaction build --tx-in 39c5a3bbd4efb1f9c3979d2b554e7d12cafa560851581698e28a94693e015cf6#0 --tx-in-collateral "39c5a3bbd4efb1f9c3979d2b554e7d12cafa560851581698e28a94693e015cf6#0" --tx-in-script-file /home/martink/Source/repos/cardano-node-tests/cardano_node_tests/tests/data/plutus/v1/always-succeeds-spending.plutus --tx-in-datum-file /home/martink/Source/repos/cardano-node-tests/cardano_node_tests/tests/data/plutus/typed-42.datum --tx-in-redeemer-file /home/martink/Source/repos/cardano-node-tests/cardano_node_tests/tests/data/plutus/typed-42.redeemer --protocol-params-file /home/martink/Source/repos/cardano-node/state-cluster0/pparams-iqwr.json --tx-out "addr_test1vzlddx09wc7v32hwz39hr3y2egsqjvuh5pucf9v5wpmuqjgcqudpz+2000000" --change-address addr_test1vrytdapkk7ynh5pzk4hk39ryr0ljx2rl3h0zygh4u542lyq3h07rx --out-file test_same_collateral_txin_ci0_hmi_v1_step2_tx.body --babbage-era --testnet-magic 42

Command failed: transaction build  Error: The followings tx inputs are not script locked: ["39c5a3bbd4efb1f9c3979d2b554e7d12cafa560851581698e28a94693e015cf6#0"]

The txin is locked:

$ cardano-cli query utxo --testnet-magic 42 --tx-in "39c5a3bbd4efb1f9c3979d2b554e7d12cafa560851581698e28a94693e015cf6#0"
                           TxHash                                 TxIx        Amount
--------------------------------------------------------------------------------------
39c5a3bbd4efb1f9c3979d2b554e7d12cafa560851581698e28a94693e015cf6     0        200000000 lovelace + TxOutDatumHash ScriptDataInBabbageEra "fcaa61fb85676101d9e3398a484674e71c45c3fd41b492682f3b0054f4cf3273"

Seems to be introduced by PR #4446.

Expected behavior
Previously the command failed with "Expected key witnessed collateral" error.

System info:

@mkoura mkoura added the bug Something isn't working label Sep 26, 2022
@mkoura mkoura changed the title [BUG] - transaction build reports locked input as not locked [BUG] - misleading error message - transaction build reports locked input as not locked Sep 27, 2022
iohk-bors bot added a commit that referenced this issue Sep 28, 2022
4484: Update error message for incorrectly witnessed collateral inputs r=Jimbo4350 a=Jimbo4350

Resolves: #4479 

Co-authored-by: Jordan Millar <jordan.millar@iohk.io>
iohk-bors bot added a commit that referenced this issue Sep 28, 2022
4466: Added changelogs for releases between 1.34.0 and 1.35.3 r=Jimbo4350 a=LaurenceIO

Updated api, cli, node, and submit-api changelogs on master with changes in 1.34.0, 1.34.1, 1.35.0, 1.35.1, 1.35.2, and 1.35.3 releases.

Thanks to `@ltouro` for highlighting a typo.

4484: Update error message for incorrectly witnessed collateral inputs r=Jimbo4350 a=Jimbo4350

Resolves: #4479 

4486: tx-generator: Use distinct keys/addresses for benchmarking phases r=MarcFontaine a=MarcFontaine

This is useful for debugging the tx-generator.
Hard coded addresses:
`addr_test1vzj7zv9msmdasvy5nc9jhnn2gqvrvu33v5rlg332zdfrkugklxkau` : outputs of the splitting phase (value not Plutus).
`addr_test1vz4qz2ayucp7xvnthrx93uhha7e04gvxttpnuq4e6mx2n5gzfw23z` : final outputs of the benchmarking phase.



Co-authored-by: LaurenceIO <73659683+LaurenceIO@users.noreply.github.com>
Co-authored-by: Jordan Millar <jordan.millar@iohk.io>
Co-authored-by: MarcFontaine <MarcFontaine@users.noreply.github.com>
@dorin100 dorin100 added type: regression A feature that worked before stoped working user type: internal Created by an IOG employee comp: cardano-cli 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 type: regression A feature that worked before stoped working user type: internal Created by an IOG employee
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants