CoinSelectionSimulator icon indicating copy to clipboard operation
CoinSelectionSimulator copied to clipboard

Lower target gets better results

Open karelbilek opened this issue 8 years ago • 2 comments

(continuation of discussion here https://github.com/bitcoinjs/coinselect/pull/13#discussion_r125195929 )

When I was playing with my JS port, I found out that using "lower" target - only sum of the outputs, without the added costs of tx + outputs - I get better results.

When I tried it on your code, I get better results too. See my branch

https://github.com/runn1ng/CoinSelectionSimulator/commits/experiment_lowtarget

Yeah, it's probabilistic :), but I always get better results with the low target

You can try it yourself. What do you think is the issue, and what is the ideal target?

(By "target", I mean the value that is targeted with the branch search)

karelbilek avatar Jul 03 '17 00:07 karelbilek

It's obvious that a tighter window on the exact match would reduce the fee for the transactions created with a match. However, did you check how it affected the total number of exact matches? Didn't it increase the total fees over the whole simulation? Does it affect the variance of the input set?

murchandamus avatar Jul 03 '17 00:07 murchandamus

When I look on the output, the lower target actually produces more matches. Again you can just check out my branch and try that.

And yes I looked at total cost.

one.murch.bitcoin.coinselection.Wallet Type;total cost
SETRBnB L;71246242
SETRBnB H;73494584

karelbilek avatar Jul 03 '17 00:07 karelbilek