`transaction build-estimate` fails to balance tx with no txouts
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 65/100
Research direction
Start by reproducing the exact cardano-cli conway transaction build-estimate command from the issue using the supplied protocol parameters and transaction inputs. Trace the build-estimate balance and fee calculation, then verify that a transaction with no txouts produces a balanced transaction body with the estimated fee accounted for.
Written by the indexing model from the issue text.
Description
Description
When building a tx with no txouts using transaction build-estimate, the command doesn't seem to take fee into account, and fails on producing an unbalanced tx.
I suspect that the command doesn't subtract the estimated fee from change amount.
Steps to Reproduce
- Run
cardano-cli conway transaction build-estimate \
--out-file test_transfer_all_build_estimate_ci0_ldiczg_tx.body \
--shelley-key-witnesses 1 \
--byron-key-witnesses 0 \
--reference-script-size 0 \
--total-utxo-value 150000000 \
--tx-in "cb62fe02892162ada0b928a1a3804e8d22ac7264ce6b2678f662f56cea206ac7#1" \
--change-address addr_test1vpflsydzu57ek98a43q3sdzcjnsnmx2ws89wcytmn424tfc3qus2x \
--protocol-params-file pparams-isbt.json
and see the error:
Command failed: transaction build-estimate
Error: The transaction does not balance in its use of assets. The net balance of the transaction is negative: -164181 Lovelace. The usual solution is to provide more inputs, or inputs with more assets.
Additional Context
I'm using the latest cardano-cli master (3b9a553762289cc97bece2fab34c392e7b81c271)
Files used for building the tx: issue_build_estimate.tar.gz
- Dominant language
- Haskell
- Stars
- 72
- Forks
- 24
- Avg merge
- 1d 5h
- Merged PRs (30d)
- 9
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from IntersectMBO/cardano-cli
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
IntersectMBO/cardano-cli#1306 · 2 comments ·
Maintainers usually reply within 1 day
-
Ensure Plutus V4 scripts can be deserialised by cardano-cliPossibly taken @carbolymer claimed this 7 days ago. Open
IntersectMBO/cardano-cli#1448 · 1 comment · 1 assignee ·
Maintainers usually reply within 1 day
-
Upstream non-Leios commits from the Leios integration branch to masterMay be free again @palas claimed this 49 days ago, and no pull request is open. Openrefactor
IntersectMBO/cardano-cli#1414 · 1 assignee ·
Maintainers usually reply within 1 day
-
Add `transaction validate` command (online phase 1 + phase 2)May be free again @palas claimed this 135 days ago, and no pull request is open. Openenhancement epic
IntersectMBO/cardano-cli#1380 · 4 comments · 1 reaction · 1 assignee ·
Maintainers usually reply within 1 day
-
Investigate incorporating cquisitor-style local tx validation (phase 1 + phase 2) into cardano-cliMay be free again @palas claimed this 156 days ago, and no pull request is open. OpenStale
IntersectMBO/cardano-cli#1367 · 6 comments · 1 assignee ·
Maintainers usually reply within 1 day
All issues in IntersectMBO/cardano-cli
Similar issues
-
bug good-title pdd
Difficulty 2/5 Under an hour Newbie friendliness 82/100
objectionary/phino#1630 ·
Maintainers usually reply within 1 day