-
Notifications
You must be signed in to change notification settings - Fork 990
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
Fund calculation inconsistent #582
Comments
It's actually a misleading error message. Would be better phrased as "Too many inputs" or That wallet is almost entirely composed of 50-grin rewards, so that's 500+ inputs in a single TX. I was able to send it in three transactions, then those three into one for the 60000 I was trying to move in the first place. |
I will see what I do for this issue. |
Currently max outputs for each transaction of sending is 500 and hardcoded in the source. So if the amount is more than total amount of 500 UTXO's queried from wallet data, the wallet issues the error of insufficient funds. Options of solution:
Impacts:
@ignopeverell What is your suggestion? |
We can't do 2, that would be too unexpected for the user. The limit exists because by default, we always select as many inputs as possible in a transaction, to reduce both the UTXO set and the fees. But that only makes sense up to a point, hence the limit to avoid being too greedy. But if 500 is actually not enought to cover the whole amount, I think we should allow going over it to satisfy what the user wants to send. So I'd consider it more of a soft limit. |
Then the fix will be to change the query conditions of eligible outputs. The condition will be: if 500 inputs are not enough to cover the whole amount, the wallet increases the number of inputs to cover the whole in a transaction. |
… have selection strategy = all coins. Fixes mimblewimble#582
I made a fix for it, but have not completed thorough tests before commit. I was going to complete it tonight. If your fix is ready to commit, you can go ahead. |
Good! You found the bug in mine :) I got sidetracked looking at https://doc.rust-lang.org/std/primitive.slice.html#method.sort_unstable_by_key and rust-lang/rust#34447 -- but better look at that long after Testnet2 is done. |
…ow' when sending small quantities #396 (#604) * Add 'sent' to wallet info output (#288) * Fund calculation inconsistent (#582) * [wallet] panic: 'attempt to subtract with overflow' when sending small quantities (#396) * [wallet] panic: 'attempt to subtract with overflow' when sending small quantities (#396)
That seems pretty wildly divergent.
That's also like 1/10th of all available grin if I'm calculating right - so I'm guessing it's not properly culling rewards that got orphaned by the main chain.
The text was updated successfully, but these errors were encountered: