3

Does anyone know of a good coin selection algorithm in Python that's perhaps similar to the one in Bitcoin Core (currently this: github/bitcoin/src/wallet.cpp (per guidance from stackexchange/1077))?

I see the popular python libraries: pybitcointools and pycoin both seem to be selecting all existing UTXOs which might not be optimal, and might fail @over 100 utxos. Andreas Antonopoulos' "greedy selection algo" is not as efficient as that in wallet.cpp of Bitcoin Core, am I right?

  • Just a note, there is no 'optimal' coin selection algorithm. There are trade-offs between privacy, UTXO set size, and a few other things, as is described well here: bitcoin.stackexchange.com/q/32145/18196. – morsecoder Jul 26 '16 at 20:55
  • I'm currently compiling a master thesis on the topic of coin selection and I'm not aware of a Python implementation of Bitcoin Core's coin selection algorithm. I am however not up-to-date whether there are more Bitcoin wallet implementations in Python. – Murch Jul 27 '16 at 6:11
  • thanks so much @StephenM347 , Murch 's response: bitcoin.stackexchange.com/a/32445/15567 alludes to what I am after, but as he pointed out, there is no such implementation in Python yet. Since I am looking to replicate what Bitcoin Core does(admittedly not optimal), I will code it up in Python from guidance on that post and paste on here later. – kumarz Jul 30 '16 at 10:49
1

I'm currently compiling a master thesis on the topic of coin selection and I'm not aware of a Python implementation of Bitcoin Core's coin selection algorithm.

  • thanks @Murch ! Your response: bitcoin.stackexchange.com/a/32445/15567 alludes to what I am after, but as you pointed out, there is no such implementation in Python yet. Since I am looking to replicate what Bitcoin Core does(admittedly not optimal), I will code it up in Python from guidance on that post and paste on here later. – kumarz Jul 30 '16 at 10:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.