<p>Apparently there is a problem with the size of your transaction, which is: 19142</p>
<p>But there is a limit, you can find it on the <em>protocol-params</em> file:</p>
<blockquote>
<p>maxTxSize: 16384 bytes</p>
</blockquote>
<p>Try to modify it, to decrease the size of the transaction.</p>

CC BY-SA 4.0
2021-11-24T01:10:10.650Z
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?
yoyobigmanyo
CC BY-SA 4.0
2021-12-24T12:20:20.237Z
It's not the max Tx size, but rather the exunits. Try lowering those
martin
CC BY-SA 4.0
2021-11-24T00:18:19.130Z
2021-11-24T00:18:19.130Z
georgeos
<p>I can build and sign a tx with no errors using:</p>
<pre><code>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+&quot;1 71344f6919d4ee401df384b52bd627ae551c4db7a0242fad7e1d5d10.SD2&quot; \
--tx-out-datum-embed-file ./datums/unit.json \
--tx-out $(cat addresses/eli.addr)+1689618+&quot;1 71344f6919d4ee401df384b52bd627ae551c4db7a0242fad7e1d5d10.ELI2&quot; \
--tx-out-datum-embed-file ./datums/eliInit/eli.json \
--tx-out $(cat addresses/elidSplit.addr)+1689618+&quot;1 fb3fe9858ed4020bc7df6ea31ec9bf25baa5fedb4a2b8cbf7c23ab64.ELID&quot; \
--tx-out-datum-embed-file ./datums/eliInit/elid.json \
--mint &quot;1 71344f6919d4ee401df384b52bd627ae551c4db7a0242fad7e1d5d10.SD2&quot;+&quot;1 71344f6919d4ee401df384b52bd627ae551c4db7a0242fad7e1d5d10.ELI2&quot; \
--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
</code></pre>
<p>My 1 input datum and 2 output datums add up to a total of 2888 bytes.</p>
<pre><code>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
</code></pre>
<p>Yet when I try to submit, I run into the following error:</p>
<pre><code>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)))])
</code></pre>
<p>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.</p>

<plutus><smart-contract><cardano-cli><testnet>
Cardano-cli errors when submitting
# Cardano-cli errors when submitting

(Asked by: username_0 on 2021-11-23)

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.

**Tags:** plutus, smart-contract, cardano-cli, testnet

---

## 1 answers

### Answer by username_1 on 2021-11-24. Score: 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.

> **Comments:**
> **username_0**: 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?  
> **username_2**: It's not the max Tx size, but rather the exunits. Try lowering those  

---

