Skip to content
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

Coin selection fails under certain condition #424

Open
cffls opened this issue Feb 15, 2025 · 0 comments
Open

Coin selection fails under certain condition #424

cffls opened this issue Feb 15, 2025 · 0 comments
Labels
good first issue Good for newcomers

Comments

@cffls
Copy link
Collaborator

cffls commented Feb 15, 2025

Describe the bug
Coin selection fails under certain condition.

To Reproduce
Failing test added to this branch https://github.com/Python-Cardano/pycardano/tree/coin_selection_fix

Logs

FAILED test/pycardano/test_txbuilder.py::test_token_transfer_with_change - pycardano.exception.UTxOSelectionException: All UTxO selectors failed.
Requested output:
 {
  'coin': 1492152,
  'multi_asset': {ScriptHash(hex='1f847bb9ac60e869780037c0510dbd89f745316db7ec4fee81ff1e97'): {AssetName(b'dux_1'): 382}},
}
Pre-selected inputs:
 {'coin': 4000000, 'multi_asset': {}}
Additional UTxO pool:
 [{'input': {
  'index': 0,
  'transaction_id': TransactionId(hex='e11efc26f94a3cbf724dc052c43abf36f7a631a831acc6d783f1c9c8c52725c5'),
},
 'output': {
  'address': addr_test1vrs324jltsc0ssuptpa5ngpfk89cps92xa99a2t6vlg6kdqtm5qnv,
  'amount': {
    'coin': 1038710,
    'multi_asset': {ScriptHash(hex='1f847bb9ac60e869780037c0510dbd89f745316db7ec4fee81ff1e97'): {AssetName(b'dux_1'): 1876083}},
  },
  'datum': None,
  'datum_hash': None,
  'post_alonzo': False,
  'script': None,
}}]
Unfulfilled amount:
 {'coin': -3546558, 'multi_asset': {}}

Expected behavior
Coin selection should succeed with provided inputs from the test.

@cffls cffls added the good first issue Good for newcomers label Feb 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant