Issues with Outbound Transactions After Upgrading to Cardano Node 9.1.1 - Incorrect Fee Calculation

Hello Everyone,

After upgrading to version 9.1.1 of the Cardano node, I am encountering issues with executing outbound transactions, specifically with incorrect fee calculations. The calculated fee is consistently lower than the required amount for submission, resulting in transaction failures.

I’ve reviewed a similar discussion regarding issues with claiming rewards, but in this case, the command syntax is slightly different. It seems that something in this version is preventing the exact fee calculation for standard transactions.

Has anyone else experienced this, or does anyone have insights on how to resolve this issue?

Thank you in advance!

ERROR
Command failed: transaction submit Error: Error while submitting tx: ShelleyTxValidationError ShelleyBasedEraConway (ApplyTxError (ConwayUtxowFailure (UtxoFailure (FeeTooSmallUTxO (Coin 168273) (Coin 168097))) :| []))

Commands:

cardano-cli query utxo \
    --address $(cat payment.addr) \
    --mainnet > fullUtxo.out

tail -n +3 fullUtxo.out | sort -k3 -nr > balance.out

cat balance.out

tx_in=""
total_balance=0
while read -r utxo; do
    type=$(awk '{ print $6 }' <<< "${utxo}")
    if [[ ${type} == 'TxOutDatumNone' ]]
    then
        in_addr=$(awk '{ print $1 }' <<< "${utxo}")
        idx=$(awk '{ print $2 }' <<< "${utxo}")
        utxo_balance=$(awk '{ print $3 }' <<< "${utxo}")
        total_balance=$((${total_balance}+${utxo_balance}))
        echo TxHash: ${in_addr}#${idx}
        echo ADA: ${utxo_balance}
        tx_in="${tx_in} --tx-in ${in_addr}#${idx}"
    fi
done < balance.out
txcnt=$(cat balance.out | wc -l)
echo Total available ADA balance: ${total_balance}
echo Number of UTXOs: ${txcnt}
cardano-cli transaction build-raw \
    ${tx_in} \
    --tx-out $(cat payment.addr)+0 \
    --tx-out ${destinationAddress}+0 \
    --invalid-hereafter $(( ${currentSlot} + 10000)) \
    --fee 268273 \
    --out-file tx.tmp

TEST CASE;
–tx-out $(cat payment.addr)+${txOutValue}
–tx-out ${destinationAddress}+${txOutValue} \

OR

–tx-out $(cat payment.addr)+${txOutValue}
–tx-out ${destinationAddress}+0 \

OR

–tx-out $(cat payment.addr)+0
–tx-out ${destinationAddress}+0 \

OR

–tx-out $(cat payment.addr)+0
–tx-out ${destinationAddress}+${txOutValue} \

in all cases I get the same error

Command failed: transaction submit Error: Error while submitting tx: ShelleyTxValidationError ShelleyBasedEraConway (ApplyTxError (ConwayUtxowFailure (UtxoFailure (FeeTooSmallUTxO (Coin 168273) (Coin 168097))) :expressionless: ))

@adatainment @Zyroxa After posting this post, the user with the nickname andy_dev immediately responded, suggesting something suspicious. The user then quickly deleted the message to avoid detection. It is highly likely a scam. In conclusion, through Telegram, they sent me a link to a fraudulent support site: [URL removed by @Zyroxa]
image

1 Like

Ive already removed the user. Thanks for the report.

3 Likes

By the way: That doesn’t help them. At least moderators can still see the message. And the thread appears on top of “Latest”, nevertheless, so we also see that something is happening there.

1 Like

Thanks for the quick resolution, back to the subject of the post anyone have any suggestions…

Since the fork, you have to build the raw transaction before calculating the fee with much more accurate dummy values because a few bytes in size difference make the fee quite different. I’m not aware of any changes to the parameters for simple transactions (only fees for scripts on reference inputs and the Plutus cost models were changed). So, I guess they made --calculate-min-fee more exact, saving some Lovelace for smaller transactions.

So, in building tx.tmp --tx-out $(cat payment.addr)+0 and --tx-out ${destinationAddress}+0 have to already contain numbers in the correct range instead of 0.

Not sure if your “TEST CASE”s mean you have tried that. They only work if ${txOutValue} has already been set to a realistic value. And they have to be done on the build-raw before the calculate-min-fee, not only on the one of the final transaction.

1 Like

Thank you @HeptaSean , unfortunately no solution worked, considering I have done this operation hundreds of times something is not working properly on the fee calculation in a surgical way, what surprises me is that there are no other users who encounter the same problem. same issue for the claim reward resolved… with the correct command syntax, unfortunately I seem to be the only one talking about it Cannot Withdraw Rewards cardano-node 9.1.1 - #19 by stvoffutt . Thanks

There were quite some who had a bit of a problem, but none for which giving correct values in --tx-out and --fee did not solve it: https://forum.cardano.org/t/cannot-withdraw-rewards-cardano-node-9-1-1/135758/18

You are sure that you are using the correct version of cardano-cli?

1 Like

I found this solution. i set the exact fee i got from the previous error as follows below;

txOut=$((${total_balance} - 168273 - ${amountToSend}))
echo Change Output: ${txOut}
cardano-cli transaction build-raw \
    ${tx_in} \
    --tx-out $(cat payment.addr)+${txOut} \
    --tx-out ${destinationAddress}+${amountToSend} \
    --invalid-hereafter $(( ${currentSlot} + 10000)) \
    --fee 168273 \
    --out-file tx.raw

:~/cardano-my-node$ cardano-cli transaction submit \

--tx-file tx.signed \
--mainnet

Transaction successfully submitted.

1 Like

Yes, it’s the same issue. @ADA_Money_Pool look at this solution to fix the problem. I have contacted Change Pool to update the Coincashew guide as well.

1 Like

@HeptaSean @LatinStakePools Likewise I’ve requested that such instruction be included with the otherwise complete cardano-cli documentation on the Developer Portal:

2 Likes