ElementsProject / libwally-core

Useful primitives for wallets
Other
281 stars 135 forks source link

Asset coin selection + misc fixes #394

Closed jgriffiths closed 1 year ago

jgriffiths commented 1 year ago

Some misc fixes including fixing the wheel CI build. Update secp-zkp to the latest master.

Adds wally_coinselect_assets for performing optimized coin selection for assets (aggressive solution space reduction, checks >600M permutations/sec on Ryzen 7 5700U).

Includes a squashed/slightly updated https://github.com/ElementsProject/libwally-core/pull/390 for merging.

LeoComandini commented 1 year ago

utACK 58669b8a38eeffd22b2e58638b0bfbb0f9d5cb06, with minor comment, core review.

Perhaps we want someone else to have a look at the last commit, I'm not particularly confident of my review. Or maybe we are fine with testing it via GDK.

jgriffiths commented 1 year ago

Perhaps we want someone else to have a look at the last commit, I'm not particularly confident of my review. Or maybe we are fine with testing it via GDK.

I had the algorithm and its assumptions pre-reviewed by @instagibbs prior to pushing this PR. A gdk change to switch to this call for asset UTXO selection is WIP and will be tested there.

Note that I've done a fair amount of testing much of which isn't really amenable to being tested in wally, given many outlier tests (e.g. huge UTXO sets with very large io_ratios) can take a very long time to run.