-
Notifications
You must be signed in to change notification settings - Fork 721
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] - min required UTxO reported by CLI is not correct #4061
Comments
The ./cardano-cli transaction calculate-min-required-utxo --babbage-era \
--protocol-params-file <(cat babbage-protocol-parameters.tmp) \
--tx-out "addr_test1vpfwv0ezc5g8a4mkku8hhy3y3vp92t7s3ul8g778g5yegsgalc6gc+0"
Lovelace 840450 the value above is wrong, because if you try to send 840450 lovelaces it really is ./cardano-cli transaction calculate-min-required-utxo --babbage-era \
--protocol-params-file <(cat babbage-protocol-parameters.tmp) \
--tx-out "addr_test1vpfwv0ezc5g8a4mkku8hhy3y3vp92t7s3ul8g778g5yegsgalc6gc+840450"
Lovelace 857690 the value above is accepted by the chain ./cardano-cli transaction calculate-min-required-utxo --babbage-era \
--protocol-params-file <(cat babbage-protocol-parameters.tmp) \
--tx-out "addr_test1vpfwv0ezc5g8a4mkku8hhy3y3vp92t7s3ul8g778g5yegsgalc6gc+10000000000"
Lovelace 874930 the value above is too high so why is the amount of the minUTXO depending on the amount i wanna send, that makes no sense IMO. or do i miss something? there is only ONE real minUTXO value on the chain, not a gliding value? there should be an integrated iteration within cardano-cli to get to the real min value with a starting lovelace amount of zero. same goes for sending out assets, requesting the minUTXO for |
The build command might be overestimating the size needed, perhaps using The min value depends (linearly) on the number of bytes of the output. You cannot therefore figure it out precisely by substituting zero for the value you want. See this CIP: https://github.com/cardano-foundation/CIPs/pull/265/files But I guess the suggestion is for the CLI to take an output with zero ada, and compute the fix point? |
Yes exactly, like its now working in the alonzo-era. Otherwise external tools would need to do at least two or three requests with different lovelaces values to get the amount that really works for sending it out with that value. |
@lehins has kindly volunteered to make an era-generic function for computing the fixed point for a given transaction output, in the ledger code. After we have that, we figure out how to hook it into the build and build-raw commands. |
So this is complaining about the change output. We purposely overestimate the size of the change output because we want to avoid recursively solving for the tx fee (i.e evaluate tx fee, put fee in tx, evaluate the fee again, put the fee in the tx etc). This is expected. |
Removing from 1.35.1. As @Jimbo4350 mentioned, current behavior is intended and expected. |
@Jimbo4350 we now have a function That function will calculate the true minimum lovelace for any @CarlosLopezDeLara You maybe want to consider reopening this ticket, since now it will be very easy to adopt this in cardano-node thus minimize the amount and make everyone happy |
Looks like IntersectMBO/cardano-node#4061 was fixed.
Internal
Area
Other Any other topic (Delegation, Ranking, ...).
Summary
In Babbage, both
transaction build
andtransaction calculate-min-required-utxo
report 857690 Lovelace to be minimum required UTxO for Lovelace-only output with no datum. However I am able to create UTxO with just 849070 Lovelace (usingtransaction build-raw
).Expected behavior
CLI reports precise minimum required UTxO.
System info:
The text was updated successfully, but these errors were encountered: