0

I can build and sign a tx with no errors using:

cardano-cli transaction build --alonzo-era \
--testnet-magic 8 \
--tx-in 20445d5c68e1759f1371a86ecca773b76463fba3831f128fd2f7834de38ae6ec#0  \
--tx-in 20445d5c68e1759f1371a86ecca773b76463fba3831f128fd2f7834de38ae6ec#1 \
--tx-in-script-file ./scripts/elidSplit.plutus \
--tx-in-datum-file ./datums/elidInit/elid.json \
--tx-in-redeemer-file ./redeemers/unit.json \
--required-signer ./wallet2/payment.skey \
--tx-in-collateral 20445d5c68e1759f1371a86ecca773b76463fba3831f128fd2f7834de38ae6ec#0  \
--tx-out $(cat addresses/dump.addr)+1689618+"1 71344f6919d4ee401df384b52bd627ae551c4db7a0242fad7e1d5d10.SD2" \
--tx-out-datum-embed-file ./datums/unit.json \
--tx-out $(cat addresses/eli.addr)+1689618+"1 71344f6919d4ee401df384b52bd627ae551c4db7a0242fad7e1d5d10.ELI2" \
--tx-out-datum-embed-file ./datums/eliInit/eli.json \
--tx-out $(cat addresses/elidSplit.addr)+1689618+"1 fb3fe9858ed4020bc7df6ea31ec9bf25baa5fedb4a2b8cbf7c23ab64.ELID" \
--tx-out-datum-embed-file ./datums/eliInit/elid.json \
--mint "1 71344f6919d4ee401df384b52bd627ae551c4db7a0242fad7e1d5d10.SD2"+"1 71344f6919d4ee401df384b52bd627ae551c4db7a0242fad7e1d5d10.ELI2" \
--mint-script-file ./scripts/elfSplit.plutus \
--mint-redeemer-file ./redeemers/unit.json  \
--change-address $ADDRESS2 \
--invalid-before 8148593 \
--invalid-hereafter 8167069 \
--protocol-params-file pparams.json \
--out-file ./txs/eliInit/tx.build 

cardano-cli transaction sign --tx-body-file txs/eliInit/tx.build --testnet-magic 8 --signing-key-file ./wallet2/payment.skey --out-file txs/eliInit/tx.signed

My 1 input datum and 2 output datums add up to a total of 2888 bytes.

bash-4.4# du -b datums/elidInit/elid.json 
481     datums/elidInit/elid.json
bash-4.4# du -b datums/eliInit/elid.json 
477     datums/eliInit/elid.json
bash-4.4# du -b datums/eliInit/eli.json 
1930    datums/eliInit/eli.json

Yet when I try to submit, I run into the following error:

bash-4.4# cardano-cli transaction submit --testnet-magic 8 --tx-file txs/eliInit/tx.signed
Command failed: transaction submit  Error: Error while submitting tx: ShelleyTxValidationError ShelleyBasedEraAlonzo (ApplyTxError [UtxowFailure (WrappedShelleyEraFailure (UtxoFailure (ExUnitsTooBigUTxO (WrapExUnits {unWrapExUnits = ExUnits' {exUnitsMem' = 30000000, exUnitsSteps' = 10000000000}}) (WrapExUnits {unWrapExUnits = ExUnits' {exUnitsMem' = 40134886, exUnitsSteps' = 14936123959}})))),UtxowFailure (WrappedShelleyEraFailure (UtxoFailure (MaxTxSizeUTxO 19142 16384)))])

How do I get the transaction to not error our when submitting? My scripts conduct some time checks, signing checks, and checks on the output datums.

1

Apparently there is a problem with the size of your transaction, which is: 19142

But there is a limit, you can find it on the protocol-params file:

maxTxSize: 16384 bytes

Try to modify it, to decrease the size of the transaction.

2
  • I am pretty sure that the size of the transaction is relatively small from the above numbers. Is there any way to tell where that size is coming from? Nov 24 '21 at 1:10
  • It's not the max Tx size, but rather the exunits. Try lowering those Dec 24 '21 at 12:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.