-
Notifications
You must be signed in to change notification settings - Fork 52
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
Automatic collateral selection does not go well with mustNotSpendUtxos
#1581
Comments
Which revision are you on? |
We are on rev: Scenario 1Initial utxo distribution:
Non spendable utxo:
Result of getWalletCollateral
The 1Ada utxo is not chosen as a possible collateral so its not a problem that we forbid spending it. The transaction succeeds without a problem. Scenario 2Initial utxo distribution:
Non spendable utxo:
Result of getWalletCollateral:
In this case the non spendable utxo was also selected as the only available collateral candidate. If we try to submit a transaction in this case, we'll get an error like:
Basically there can be the case where the algorithm will choose only a single utxo as a candidate for a collateral. In this case if this utxo is also non spendable during some transaction, this transaction will fail to be successfully built. |
@jankun4 could you please provide a reproducible test to simplify debugging for us? |
What do you think should be the correct behavior? |
I don't think we can easily provide a minimal test case - we'd need to get the time to build a minimal example approved by our managers.
The correct behaviour would be to never select forbidden UTxOs as a collateral. In case the forbidden UTxOs are the only viable collaterals, this should lead to balancing error. |
When using
mustNotSpendUtxos
andmustNotSpendUtxosWithOutRefs
it sometimes happens that one of the forbidden UTxOs is selected as a collateral. Collateral selection should honour the list of forbidden UTxOs defined by the user.The text was updated successfully, but these errors were encountered: