-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Allow selection of multiple utxos in pad_alignment_output and add_value #1858
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is great!
Could you add a unit test (bottom of transaction_builder.rs) that tests the case you outline in your initial comment? If you can, add tests for the prefer_under
flag. So that both cases are properly tested.
2e2631f
to
c34ce77
Compare
Of course. I added 3 new tests to test:
|
f56ab03
to
045731d
Compare
Many people in the Ordicord Discord server have encountered the error, In addition, there may be extra UTXO sats post-inscription because fee estimates may not be precise. This leads to tons of dust UTXOs that need to be consolidated and consume transaction fees. @raphjaph Appreciate you reviewing this. Do the changes from @gmart7t2 that you requested look good? |
this is definitely helpful but I want to point out a potential issue with combining multiple inputs. the fee could get real expensive in these situations. is it possible to put a max-total-fee limit to this command so that you can still have control over the total fees paid for a certain inscription? |
Would The utxo selection code will use the biggest available cardinals in an attempt to minimize the number it uses but you're right that in the worst case it could use hundreds of low value utxos that barely cover their own fee cost. What do you think? |
f891f99
to
045731d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, this looks good! I can't push changes to this branch though. I might have to open a new PR with these changes and merge there. #2303
Merged #2303 which is duplicate of this one. So closing this. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Binance Web3
ord wallet inscribe
only adds at most 1 padding alignment utxo and 1 value utxo.If you try to inscribe a tiny file with 5 cardinal outputs of size 4k sats each in your wallet the inscribe will fail because ord isn't able to use enough inputs to make up the 10k postage.
This commit fixes that.
An example:
We have five 4k outputs:
ord can't inscribe onto any of them:
But with this pull request it can:
Here are the commit tx inputs:
And outputs: