This repository was archived by the owner on Mar 1, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 12
Improve instructions (and testing) about multi-output transactions #190
Comments
4 tasks
@paweljakubas I am just thinking about it but I believe we forgot to update the documentation about this. Unfortunately, since errors aren't included in Servant types, we don't really generate automatically any docs for them and they still have to be added manually in here: |
@paweljakubas - lgtm 👍 except for documentation update mentioned above ^^. As discussed, I have also added one additional test triggering |
1 task
This was referenced Feb 1, 2019
iohk-bors bot
referenced
this issue
in input-output-hk/cardano-sl
Feb 1, 2019
4058: Support UtxoNotEnoughFragmented error r=KtorZ a=paweljakubas Add multioutput integration tests Fix Lens accesses and confusion between WalAddress vs WalletAddress vs V1 Address ## Description This is backport of cardano-foundation/cardano-wallet#190 ## Linked issue <!--- Put here the relevant issue from YouTrack --> Co-authored-by: Pawel Jakubas <[email protected]>
1 task
Closing this one as the documentation point has been covered and, more test addded. Also successfully backported into |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Context
The new coin selection algorithm has some limitations that aren't clearly stated from the documentation (nor in the specification actually). And a few points about multi-outputs transactions are still unresolved.
The coin selection can't split a UTxO across multiple outputs. In order to make a multi-outputs transaction, there should be several available UTxO.
Decision
When trying to make a transaction with more outputs than available UTxO, the API fails with
CoinSelHardErrUtxoExhausted
which isn't really helpful from a user point of view. Ideally, we would improve the error message and suggest a possible fix or, way of approaching the error (by suggesting to have a look at the utxo fragmentation through the utxo statistics endpoint).Also, we want to add integration tests illustrating the scenario above (failing and successful one) and, with this, extend the API documentation to explain how to deal with multi-outputs transactions and what are the limitations.
Acceptance Criterias
/api/v1/wallets/{walletId}/statistics
Development Plan
PR
develop
develop
develop
develop
develop
develop
QA
When the number of transaction outputs is greater than the number of utxo new error is triggered two tests in Transaction section of integration tests are added that cover the situation.
When the number of transaction outputs is greater than the number of utxo new error is triggered . Previously it the following error was triggered:
which is a bit misleading.
Now, the following error is expected:
which here indicates situation that there is 1 utxo lacking to cover all outputs of a given transaction.
Here, we are expecting the following msg :
The corresponding tests were added to integration test suite (
cardano-wallet/test/integration/Test/Integration/Scenario/Transactions.hs
) :Situations were this error is detected :
(see added integration tests for details)
Here, one should expect not
NotEnoughMoney
butUtxoNotEnoughFragmented
Why, because we try to send transaction from source wallet that does not have utxo to one output and here we trigger
UtxoNotEnoughFragmented
How to reproduce scenario :
The text was updated successfully, but these errors were encountered: