<p>Solution to this problem: add <code>--witness-override</code> to the transaction build.</p>
<p>Here are the transaction build/sign/submit statements:</p>
<pre><code>cardano-cli transaction build
  --testnet-magic 2    
  --tx-in 53617a238110219e7d8dded048c6a497dc4ac253fa6e4bb80842bcb82b61bb93#1
  --tx-out &quot;addr_test1vqffq45nzrdsprua0nakp8f44xp6mzvrscmpq8alg9w888s63fusl 2000000 
        + 1 59f6d5ab2a1849c6080c05aa6fee05df34c4fcb1ba0f22eb4344405b.6a6176656c696e&quot;
  --mint &quot;1 59f6d5ab2a1849c6080c05aa6fee05df34c4fcb1ba0f22eb4344405b.6a6176656c696e&quot;
  --change-address addr_test1vqffq45nzrdsprua0nakp8f44xp6mzvrscmpq8alg9w888s63fusl
  --protocol-params-file protocol-parameters.json
  --minting-script-file policy.script
  --witness-override 2    
  --babbage-era    
  --out-file unsigned.json

cardano-cli transaction sign
  --testnet-magic 2
  --tx-body-file unsigned.json    
  --signing-key-file javelin.skey
  --signing-key-file policy.skey     
  --out-file signed.json


cardano-cli transaction submit
  --testnet-magic 2
  --tx-file signed.json

Estimated transaction fee: Lovelace 175357
Transaction successfully submitted.
</code></pre>
<p>When trying the above without the <code>--override-witness</code>, I got this error:</p>
<pre><code>Estimated transaction fee: Lovelace 170913
Command failed: transaction submit  Error: Error while submitting tx: ShelleyTxValidationError ShelleyBasedEraBabbage 
  (ApplyTxError [UtxowFailure (UtxoFailure 
  (FromAlonzoUtxoFail (FeeTooSmallUTxO (Coin 175181) (Coin 170913))))])
</code></pre>
<p>(tested using 1.35.5)</p>

CC BY-SA 4.0
2023-03-07T15:32:24.200Z
2023-03-07T15:55:53.223Z
2023-03-07T15:55:53.223Z
wmoco_6725
<p>For minting some tokens I use this transaction:</p>
<pre><code>cardano-cli transaction build
  --testnet-magic 2
  --tx-in-collateral 44ed21bc50eecc24e892a5bad4a98f2187b66d1f5074db22763cbc69fb5910b6#1
  --tx-in 44ed21bc50eecc24e892a5bad4a98f2187b66d1f5074db22763cbc69fb5910b6#1
  --tx-out &quot;addr_test1vqffq45nzrdsprua0nakp8f44xp6mzvrscmpq8alg9w888s63fusl 2000000
                + 1 59f6d5ab2a1849c6080c05aa6fee05df34c4fcb1ba0f22eb4344405b.6a6176656c696e&quot;
  --mint &quot;1 59f6d5ab2a1849c6080c05aa6fee05df34c4fcb1ba0f22eb4344405b.6a6176656c696e&quot;
  --change-address addr_test1vqffq45nzrdsprua0nakp8f44xp6mzvrscmpq8alg9w888s63fusl   
  --protocol-params-file protocol-parameters.json
  --minting-script-file policy.script
  --babbage-era
  --out-file unsigned.json
</code></pre>
<p>It submits perfectly and a token gets minted:</p>
<pre><code>Estimated transaction fee: Lovelace 179229
Transaction successfully submitted.
</code></pre>
<p>But when I remove the <strong>--tx-in-collateral</strong> line (thinking you don't really need it for simple tokens), and submitting this similar transaction ...</p>
<pre><code>cardano-cli transaction build
  --testnet-magic 2
  --tx-in 53617a238110219e7d8dded048c6a497dc4ac253fa6e4bb80842bcb82b61bb93#1
  --tx-out &quot;addr_test1vqffq45nzrdsprua0nakp8f44xp6mzvrscmpq8alg9w888s63fusl 2000000 
                + 1 59f6d5ab2a1849c6080c05aa6fee05df34c4fcb1ba0f22eb4344405b.6a6176656c696e&quot;
  --mint &quot;1 59f6d5ab2a1849c6080c05aa6fee05df34c4fcb1ba0f22eb4344405b.6a6176656c696e&quot;
  --change-address addr_test1vqffq45nzrdsprua0nakp8f44xp6mzvrscmpq8alg9w888s63fusl
  --protocol-params-file protocol-parameters.json    
  --minting-script-file policy.script
  --babbage-era
  --out-file unsigned.json
</code></pre>
<p>I get this <strong>FeeTooSmallUTxO</strong> error (on submitting) :</p>
<pre><code>Estimated transaction fee: Lovelace 170913
Command failed: transaction submit  Error: Error while submitting tx: 
   ShelleyTxValidationError ShelleyBasedEraBabbage (ApplyTxError 
     [UtxowFailure (UtxoFailure (FromAlonzoUtxoFail (FeeTooSmallUTxO (Coin 175181) (Coin 170913))))])
</code></pre>
<p>I wouldn't expect a FeeTooSmallUTxO error! Can this be a bug in cardano-cli ?
Or do I need need to add any other parameters? Or do simple tokens also need collateral?</p>
<p>(for ref: transactions executed on preview network with cardano-cli 1.35.5 - linux-x86_64 - ghc-8.10, the policy.script contains { &quot;keyHash&quot;: &quot;6c835e5..bcf986d0c&quot;, &quot;type&quot;: &quot;sig&quot; } )</p>

CC BY-SA 4.0
2023-03-06T10:47:24.777Z
You don't need collateral unless evaluating a plutus script.  I cannot reproduce this, perhaps something has changed since. Would you mind trying node and cli 1.35.6?
james
CC BY-SA 4.0
2023-03-06T10:52:47.200Z
It just occurred to me that you might be providing more than one signing key to witnesses this transaction (e.g. when using `sign` cmd). If that's the case you must override the number of witnesses during `build` using `--witness-override`. This is because the balancing algorithm won't know how many signatures are required and assuming just one would underestimate the fee as a result. Use of the collateral input would increase the calculated fee, which would explain why this error wasn't seen previously.
james
CC BY-SA 4.0
2023-03-07T15:09:02.720Z
Cardano Node 1.35.5 is still tagged as the latest release on https://github.com/input-output-hk/cardano-node. Where do I get hold of 1.35.6? (without having to build it myself)
wmoco_6725
CC BY-SA 4.0
2023-03-07T15:30:40.483Z
@james The `--witness-override` solved the issue!
wmoco_6725
<cardano-cli><minting><collateral>
Cardano-cli minting gives FeeTooSmallUTxO error when no collateral
# Cardano-cli minting gives FeeTooSmallUTxO error when no collateral

(Asked by: username_0 on 2023-03-04)

For minting some tokens I use this transaction:
cardano-cli transaction build
  --testnet-magic 2
  --tx-in-collateral 44ed21bc50eecc24e892a5bad4a98f2187b66d1f5074db22763cbc69fb5910b6#1
  --tx-in 44ed21bc50eecc24e892a5bad4a98f2187b66d1f5074db22763cbc69fb5910b6#1
  --tx-out "addr_test1vqffq45nzrdsprua0nakp8f44xp6mzvrscmpq8alg9w888s63fusl 2000000
                + 1 59f6d5ab2a1849c6080c05aa6fee05df34c4fcb1ba0f22eb4344405b.6a6176656c696e"
  --mint "1 59f6d5ab2a1849c6080c05aa6fee05df34c4fcb1ba0f22eb4344405b.6a6176656c696e"
  --change-address addr_test1vqffq45nzrdsprua0nakp8f44xp6mzvrscmpq8alg9w888s63fusl   
  --protocol-params-file protocol-parameters.json
  --minting-script-file policy.script
  --babbage-era
  --out-file unsigned.json

It submits perfectly and a token gets minted:
Estimated transaction fee: Lovelace 179229
Transaction successfully submitted.

But when I remove the --tx-in-collateral line (thinking you don't really need it for simple tokens), and submitting this similar transaction ...
cardano-cli transaction build
  --testnet-magic 2
  --tx-in 53617a238110219e7d8dded048c6a497dc4ac253fa6e4bb80842bcb82b61bb93#1
  --tx-out "addr_test1vqffq45nzrdsprua0nakp8f44xp6mzvrscmpq8alg9w888s63fusl 2000000 
                + 1 59f6d5ab2a1849c6080c05aa6fee05df34c4fcb1ba0f22eb4344405b.6a6176656c696e"
  --mint "1 59f6d5ab2a1849c6080c05aa6fee05df34c4fcb1ba0f22eb4344405b.6a6176656c696e"
  --change-address addr_test1vqffq45nzrdsprua0nakp8f44xp6mzvrscmpq8alg9w888s63fusl
  --protocol-params-file protocol-parameters.json    
  --minting-script-file policy.script
  --babbage-era
  --out-file unsigned.json

I get this FeeTooSmallUTxO error (on submitting) :
Estimated transaction fee: Lovelace 170913
Command failed: transaction submit  Error: Error while submitting tx: 
   ShelleyTxValidationError ShelleyBasedEraBabbage (ApplyTxError 
     [UtxowFailure (UtxoFailure (FromAlonzoUtxoFail (FeeTooSmallUTxO (Coin 175181) (Coin 170913))))])

I wouldn't expect a FeeTooSmallUTxO error! Can this be a bug in cardano-cli ?
Or do I need need to add any other parameters? Or do simple tokens also need collateral?
(for ref: transactions executed on preview network with cardano-cli 1.35.5 - linux-x86_64 - ghc-8.10, the policy.script contains { "keyHash": "6c835e5..bcf986d0c", "type": "sig" } )

**Tags:** cardano-cli, minting, collateral
> **Comments:**
> **username_1**: You don't need collateral unless evaluating a plutus script.  I cannot reproduce this, perhaps something has changed since. Would you mind trying node and cli 1.35.6?  
> **username_1**: It just occurred to me that you might be providing more than one signing key to witnesses this transaction (e.g. when using `sign` cmd). If that's the case you must override the number of witnesses during `build` using `--witness-override`. This is because the balancing algorithm won't know how many signatures are required and assuming just one would underestimate the fee as a result. Use of the collateral input would increase the calculated fee, which would explain why this error wasn't seen previously.  
> **username_0**: Cardano Node 1.35.5 is still tagged as the latest release on https://github.com/input-output-hk/cardano-node. Where do I get hold of 1.35.6? (without having to build it myself)  
> **username_0**: @james The `--witness-override` solved the issue!  

---

## 1 answers

### Answer by username_0 on 2023-03-07. Score: 0 | Accepted answer

Solution to this problem: add --witness-override to the transaction build.
Here are the transaction build/sign/submit statements:
cardano-cli transaction build
  --testnet-magic 2    
  --tx-in 53617a238110219e7d8dded048c6a497dc4ac253fa6e4bb80842bcb82b61bb93#1
  --tx-out "addr_test1vqffq45nzrdsprua0nakp8f44xp6mzvrscmpq8alg9w888s63fusl 2000000 
        + 1 59f6d5ab2a1849c6080c05aa6fee05df34c4fcb1ba0f22eb4344405b.6a6176656c696e"
  --mint "1 59f6d5ab2a1849c6080c05aa6fee05df34c4fcb1ba0f22eb4344405b.6a6176656c696e"
  --change-address addr_test1vqffq45nzrdsprua0nakp8f44xp6mzvrscmpq8alg9w888s63fusl
  --protocol-params-file protocol-parameters.json
  --minting-script-file policy.script
  --witness-override 2    
  --babbage-era    
  --out-file unsigned.json

cardano-cli transaction sign
  --testnet-magic 2
  --tx-body-file unsigned.json    
  --signing-key-file javelin.skey
  --signing-key-file policy.skey     
  --out-file signed.json


cardano-cli transaction submit
  --testnet-magic 2
  --tx-file signed.json

Estimated transaction fee: Lovelace 175357
Transaction successfully submitted.

When trying the above without the --override-witness, I got this error:
Estimated transaction fee: Lovelace 170913
Command failed: transaction submit  Error: Error while submitting tx: ShelleyTxValidationError ShelleyBasedEraBabbage 
  (ApplyTxError [UtxowFailure (UtxoFailure 
  (FromAlonzoUtxoFail (FeeTooSmallUTxO (Coin 175181) (Coin 170913))))])

(tested using 1.35.5)


---

