Transaction Errors
Common transaction errors:
- BadInputsUTXO
- ValueNotConservedUTXO
- ExpiredUTXO
- Failed reading. Your input is either malformed or not hex encoded
Error: BadInputsUTXO
$ cardano-cli shelley transaction submit \
--tx-file tx001.signed \
--testnet-magic 42
> ApplyTxError [LedgerFailure (UtxowFailure (UtxoFailure (BadInputsUTxO
(fromList [TxIn (TxId
{_TxId = f5296e996940b1c81f781594293d423b4250a454f5832b0740a923f74460d34e}) ]))))
Diagnostic:
Bad UTXO transaction index
Solution:
Verify the UTXO transaction index with
$ cardano-cli shelley query utxo \
--address $(cat payment.addr) \
--testnet-magic 42
> TxHash TxIx Lovelace
--------------------------------------------------------------------------
7f1d95ce599c84064c61903c0b1334c826b55c48a1.... 1 1000000000000
Error: ValueNotConservedUTXO
$ cardano-cli shelley transaction submit \
> --tx-file tx001.signed \
> --testnet-magic 42
ApplyTxError [LedgerFailure (UtxowFailure (UtxoFailure
(FeeTooSmallUTxO (Coin 172409) (Coin 167965)))),LedgerFailure
(UtxowFailure (UtxoFailure (ValueNotConservedUTxO (Coin 1000000000)
(Coin 999999998))))]
Diagnostic:
Value not Conserved: (Input UTXO ≠ Fee + Amount sent + Change)
Solution: Check that Input amounts = Output amounts
Error: ExpiredUTXO
$ cardano-cli shelley transaction submit \
> --tx-file tx001.signed \
> --testnet-magic 42
ApplyTxError [LedgerFailure (UtxowFailure (UtxoFailure
(ExpiredUTxO {pfUTXOttl = SlotNo {unSlotNo = 123456},
pfUTXOcurrentSlot = SlotNo {unSlotNo = 123457}})))]
Diagnostic:
TTL has already passed.
Solution:
Look at pfUTXOttl and pfUTXOcurrentSlot. Current Slot is ahead of UTXOttl.
Build a new transaction with a TTL (Time to Live) higher that Current Slot. As a rule of thumb, give yourself a 300-500 slots to builld, sign and submit the transaction.
Error: Failed reading: Your input is either malformed or not hex encoded
$ cardano-cli shelley transaction build-raw \
--tx-in f5296e996940b1c81f781594293d423b4250a454f5832b0740a923f74460d34#1 \
--tx-out $(cat payment2.addr)+100000000 \
--tx-out $(cat payment.addr)+899832033 \
--ttl 335000 --fee 167965 \
--out-file tx001.raw
> option --tx-in: Failed reading: Your input is either
malformed or not hex encoded:
f5296e996940b1c81f781594293d423b4250a454f5832b0740a923f74460d34
Diagnostic:
tx-in is not a valid UTXO
Solution:
Make sure that you are using a correct UTXO. You can query it with:
$ cardano-cli shelley query utxo \
--address $(cat payment.addr) \
--testnet-magic 42