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?

kumarz
  • 231
  • 1
  • 6
  • 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: http://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 06:11
  • thanks so much @StephenM347 , Murch 's response: http://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 Answers1

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.

Murch
  • 75,206
  • 34
  • 186
  • 622
  • 1
    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