[BUG] - Cardano-cli computes wrong collateral return output for multiple occurrences of collateral inputs #4744
Labels
comp: cardano-cli
type: bug
Something is not working
user type: external
Created by an external user
Internal/External
External otherwise.
Area
Plutus Related to Plutus Scripts (Alonzo).
Other Any other topic (Delegation, Ranking, ...).
Summary
When adding collateral inputs multiple times, the cardano-cli builds an erroneous transaction with too much collateral output (the sum of the collateral inputs).
This is especially problematic as for example the default behaviour of the cardano clusterlib for multiple script invocations with the same collateral is mentioning it several times in the built transaction.
Steps to reproduce
Steps to reproduce the behavior:
Building the following transaction
The following files need to be present for this transaction:
datum.txt
redeemer.txt
cancel_contract.plutus
Produces the following output
Clearly, there is only one collateral in put (with around 6 ADA), being mentioned twice when building the transaction.
However the computed collateral return output is 12 ADA.
Expected behavior
The cli should detect that the collateral is mentioned several times and filter out duplicates.
The same procedure as above does NOT produce errors on cardano-cli version 1.35.3 and before.
System info (please complete the following information):
cardano-node --version
)cardano-cli --version
)The text was updated successfully, but these errors were encountered: