You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Summary
The cardano-cli transaction build command is unable to balance transactions correctly if the --withdrawal option is specified. It seemingly ignores the amount withdrawn when calculating how much is left to send to the change address. It also fails to calculate the correct fee.
Steps to reproduce
To see it incorrectly calculating change:
(Note: 0850cacebe8195d5afa769247a813d3c826ad08d514a9d0b69d69d9b44a012ce#1 contains 1000000 lovelace)
Command failed: transaction build Error: The transaction does not balance in its use of ada. The net balance of the transaction is negative: Lovelace (-1168185) lovelace. The usual solution is to provide more inputs, or inputs with more ada.
To see it incorrectly calculating fee:
(Note: 0850cacebe8195d5afa769247a813d3c826ad08d514a9d0b69d69d9b44a012ce#2 contains 5000000 lovelace)
Expected behavior
When using the --withdrawal option, cardano-cli transaction build should include the withdrawn value in its balance calculations, as well as it should apply the correct fee. Once fixed, the above reproduction steps should be able to successfully build a valid withdraw transaction.
System info (please complete the following information):
Although I searched for previous issues on this topic before submitting this, I must be totally blind, because the exact same thing was posted just 6 days ago. I need to look more carefully in the future.
This issue is a duplicate of #3074. Keep it open or close it as you see fit.
I don't think this is a duplicate of #3074, that one is to do with the withdrawal not succeeding after submit, this one it to do with not being able to balance the tx. No need to reopen as a new issue has now been created, see #3132.
Internal/External
External
Area
Other
Summary
The
cardano-cli transaction build
command is unable to balance transactions correctly if the--withdrawal
option is specified. It seemingly ignores the amount withdrawn when calculating how much is left to send to the change address. It also fails to calculate the correct fee.Steps to reproduce
To see it incorrectly calculating change:
(Note:
0850cacebe8195d5afa769247a813d3c826ad08d514a9d0b69d69d9b44a012ce#1
contains 1000000 lovelace)You should get the following error:
To see it incorrectly calculating fee:
(Note:
0850cacebe8195d5afa769247a813d3c826ad08d514a9d0b69d69d9b44a012ce#2
contains 5000000 lovelace)Sign
tx.raw
with the appropriatepayment.skey
andstake.skey
:Finally submit the transaction:
You should get the following error:
Expected behavior
When using the
--withdrawal
option,cardano-cli transaction build
should include the withdrawn value in its balance calculations, as well as it should apply the correct fee. Once fixed, the above reproduction steps should be able to successfully build a valid withdraw transaction.System info (please complete the following information):
The text was updated successfully, but these errors were encountered: