IntersectMBO / cardano-cli

This repository contains sources for the command-line interface (CLI) tool for interacting with the Cardano blockchain.
Apache License 2.0
37 stars 13 forks source link

TX balancing ignores assets in collateral inputs #754

Open Fell-x27 opened 3 months ago

Fell-x27 commented 3 months ago

Description

If you use a "transaction build" command and do not specify collateral size and output, it tries to build a change automatically. But if input has a native asset onboard, balancer ignores it and we get an error "CollateralContainsNonADA".

But if we set explicit collateral out with assets and collateral sum manually - everything is ok.

Here is a tx you can't balance automatically: https://preprod.cardanoscan.io/transaction/f8dfe48eb5314d5a582e5fbeb1a07cbb4606ce3c07527d83cdb2d2c5f23e2e9a

Steps to Reproduce

  1. Build a tx with collateral inputs contained some native assets;
  2. Do not set collateral change, let auto-balancer do its job;
  3. Try to submit;
  4. ...
  5. CollateralContainsNonADA :(

Additional Context

LinuxMint 21 cardano-cli 8.20.3.0 - linux-x86_64 - ghc-8.10 git rev 424983fa186786397f5a99539f51710abf62c37b

Possible Solution

Tx balancer have to move all assets from collateral to change. Just move without any calculations :)

carbolymer commented 3 months ago

Do you observe the same behaviour with latest cardano-cli 8.23.1.0? You'd have to use this node version https://github.com/IntersectMBO/cardano-node/releases/tag/8.11.0-pre (to be released soon) - note that's not a mainnet version.

Fell-x27 commented 3 months ago

Didn't test it.

carbolymer commented 3 months ago

8.11.0-pre is released, so you can find binaries under that tag. Let me know if the issue still persists.

Fell-x27 commented 3 months ago

Let me know if the issue still persists.

It is :(

github-actions[bot] commented 2 months ago

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 120 days.

github-actions[bot] commented 1 month ago

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 120 days.

github-actions[bot] commented 1 week ago

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 120 days.