input-output-hk / plutus-apps

The Plutus application platform

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Contract Model failing to validate with UtxoFailure OutputTooSmallUTxO

locallycompact opened this issue · comments

Summary

Hi, I have the following transaction failing to validate in the contract model

[INFO] Slot 55: W[1]: Balancing an unbalanced transaction:
                        Tx:
                          Tx a5bf70436dc5f91bf8243c43c9b0d77498fc4253606664a91b5a580bc3bdfc6d:
                            {inputs:
                            collateral inputs:
                            outputs:
                              - Value (Map [(,Map [("",2000000)]),(5cecdeade418c8ed11ece4606e38e7c2639d0d60ebcfa259e4648038,Map [("hvmjukaikcbo",1)])]) addressed to
                                ScriptCredential: ea6610877e6636e1275c3ec7a677a14e8717e18ad5530a22735db27e (no staking credential)
                            mint: Value (Map [])
                            fee: Value (Map [])
                            mps:
                            signatures:
                            validity range: Interval {ivFrom = LowerBound NegInf True, ivTo = UpperBound PosInf True}
                            data:
                              <"">}
                        Requires signatures:
                        Utxo index:
                        Validity range:
                          (-∞ , +∞)
[INFO] Slot 55: W[1]: Finished balancing:
                        Tx 5bb168cfaa938e90412a41e931e77eca84b0f6b7ef8c9b532549f6c42674a53d:
                          {inputs:
                             - 8559a95e9b295035dfa107bdc914ded2924691b32fa8f00073ff17a156893dbc!1

                             - ba588cd0323242dcb13535132cc09d971e6db00f7259eb1faa4376e32187069e!0

                             - ba588cd0323242dcb13535132cc09d971e6db00f7259eb1faa4376e32187069e!1

                          collateral inputs:
                            - ba588cd0323242dcb13535132cc09d971e6db00f7259eb1faa4376e32187069e!0

                          outputs:
                            - Value (Map [(,Map [("",77663957)])]) addressed to
                              PubKeyCredential: a2c20c77887ace1cd986193e4e75babd8993cfd56995cd5cfce609c2 (no staking credential)
                            - Value (Map [(,Map [("",2000000)]),(5cecdeade418c8ed11ece4606e38e7c2639d0d60ebcfa259e4648038,Map [("",1),("an",1),("ootfzncmn",1),("rkuxine",1)]),(97e1179c05b16a76da408c686fc93dbe2c7c6a122d5a04f3745aa022,Map [("A",1000000),("B",1000000),("C",1000000),("D",1000000)]),(ee340377feb9820e7f5e79cf5421db776bce744a72a31266222eee4e,Map [("",1),(0x2c88,1),(0x95,1)])]) addressed to
                              PubKeyCredential: a2c20c77887ace1cd986193e4e75babd8993cfd56995cd5cfce609c2 (no staking credential)
                            - Value (Map [(,Map [("",2000000)]),(5cecdeade418c8ed11ece4606e38e7c2639d0d60ebcfa259e4648038,Map [("hvmjukaikcbo",1)])]) addressed to
                              ScriptCredential: ea6610877e6636e1275c3ec7a677a14e8717e18ad5530a22735db27e (no staking credential)
                          mint: Value (Map [])
                          fee: Value (Map [(,Map [("",958)])])
                          mps:
                          signatures:
                          validity range: Interval {ivFrom = LowerBound NegInf True, ivTo = UpperBound PosInf True}
                          data:
                            <"">}
[INFO] Slot 55: W[1]: Signing tx: 5bb168cfaa938e90412a41e931e77eca84b0f6b7ef8c9b532549f6c42674a53d
[INFO] Slot 55: W[1]: Submitting tx: 5bb168cfaa938e90412a41e931e77eca84b0f6b7ef8c9b532549f6c42674a53d
[INFO] Slot 55: W[1]: TxSubmit: 5bb168cfaa938e90412a41e931e77eca84b0f6b7ef8c9b532549f6c42674a53d
[WARNING] Slot 55: TxnValidationFail Phase1 5bb168cfaa938e90412a41e931e77eca84b0f6b7ef8c9b532549f6c42674a53d: CardanoLedgerValidationError "ApplyTxError [UtxowFailure (WrappedShelleyEraFailure (UtxoFailure (OutputTooSmallUTxO [(Addr Testnet (KeyHashObj (KeyHash \"a2c20c77887ace1cd986193e4e75babd8993cfd56995cd5cfce609c2\")) StakeRefNull,Value 2000000 (fromList [(PolicyID {policyID = ScriptHash \"5cecdeade418c8ed11ece4606e38e7c2639d0d60ebcfa259e4648038\"},fromList [(\"\",1),(\"an\",1),(\"ootfzncmn\",1),(\"rkuxine\",1)]),(PolicyID {policyID = ScriptHash \"97e1179c05b16a76da408c686fc93dbe2c7c6a122d5a04f3745aa022\"},fromList [(\"A\",1000000),(\"B\",1000000),(\"C\",1000000),(\"D\",1000000)]),(PolicyID {policyID = ScriptHash \"ee340377feb9820e7f5e79cf5421db776bce744a72a31266222eee4e\"},fromList [(\"\",1),(\",\\136\",1),(\"\\149\",1)])]),SNothing)])))]"

Am I right in assuming there's too much locked value from the amount of different tokens in this UTxO that 2_000_000 lovelace isn't enough ADA for that UTxO? Other transactions validate fine.

Steps to reproduce the behavior

Sorry not public code but I can put together a reproduction if needed.

Actual Result

See above

Expected Result

See above

Describe the approach you would take to fix this

No response

System info

NixOS

Am I right in assuming there's too much locked value from the amount of different tokens in this UTxO that 2_000_000 lovelace isn't enough ADA for that UTxO? Other transactions validate fine.

That's correct. As a quick fix you might try to add more Ada to generated outputs before there will be a proper solution for adjustUnbalancedTx.

ezoic increase your site revenue