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

Wallet: Bad input selection with >50 coin objects results in InsufficientCoinBalance in command 0 #4316

Open
Thoralf-M opened this issue Nov 30, 2024 · 0 comments
Labels
wallet Issues related to the IOTA Wallet

Comments

@Thoralf-M
Copy link
Member

Bug description

Sending or staking with the coins split over many objects results in this error InsufficientCoinBalance in command 0.
Instead of having many inputs, the wallet just tries to split the required amount from a coin object and then fails if it has insufficient funds.
Example tx to send https://explorer.rebased.iota.org/txblock/7iP64PHnpG55YgCSdUZcHN2oedFAugS4ydgo9SG9S88V?deviceId=a68ffc39-4a1e-4362-ad35-9f2c50b9e1e6&network=testnet (I had enough funds, split over 500 objects).
Example tx to stake https://explorer.rebased.iota.org/txblock/59mWXHFh2jvWXLouWAW6z2fTQodys3jcHMjiKtmVLnCK?deviceId=a68ffc39-4a1e-4362-ad35-9f2c50b9e1e6&network=testnet

Steps To reproduce the bug

  1. Split funds into many >50 objects
  2. Send a transaction that requires the coins of >50 objects

Expected behaviour

If there are many objects, the wallet should check how many of them are required to fulfill the needed amount and provide merge them for the gas payment. Why does it only merge 50 currently? 256 is the max_gas_payment_objects, so at least this would be an easy improvement already.
If it's still not enough, it could provide more inputs separated from the gas coin and use the amount from there. Alternatively if that's too complex logic for the wallet, it could at least display an error message that the funds are split over too many objects and that they should be consolidated.

Actual behaviour

Wallet merges only 50 coin objects for the gas coin and then tries to split the required amount from this gas coin, without checking if it has enough balance

Errors

InsufficientCoinBalance in command 0

@Thoralf-M Thoralf-M added the wallet Issues related to the IOTA Wallet label Nov 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wallet Issues related to the IOTA Wallet
Projects
None yet
Development

No branches or pull requests

1 participant