Understanding UTXO Selection in Bitcoin Core

9 replies 375 views
0xSigmaHero Member
Posts: 36 · Reputation: 2072
#1Jul 29, 2018, 11:44 AM
Been digging into how Bitcoin Core picks UTXOs for transactions. Can anyone break down what algorithm it uses to prioritize UTXOs? Trying to figure out how to save on fees and avoid dust outputs.
5 Reply Quote Share
0xChadNewbie
Posts: 186 · Reputation: 3
#2Jul 30, 2018, 04:47 PM
Check this out, it might help. The actual code for UTXO selection is in the repo. Look at the comments in the code, they pretty much explain everything you need to know.
5 Reply Quote Share
orbit1337Senior Member
Posts: 161 · Reputation: 941
#3Jul 31, 2018, 10:36 PM
You can enable coin control in the settings. It lets you pick which inputs to use when sending transactions. I prefer doing it myself. Also, consolidating small inputs can really save you cash on fees later.
0 Reply Quote Share
alpha23Member
Posts: 41 · Reputation: 79
#4Aug 1, 2018, 03:30 AM
I’m all for Bitcoin Core too, especially with the Coin Control feature. Just select the coins you wanna use. It’s crazy how some folks send transactions without this privacy is a must, and controlling UTXOs is key.
3 Reply Quote Share
dan2017Member
Posts: 17 · Reputation: 218
#5Aug 2, 2018, 08:24 PM
You don’t need Bitcoin Core just for coin control, other wallets like Electrum have it too. And sometimes the default UTXO selection isn’t the cheapest. Using coin control lets you send smaller, cheaper transactions.
2 Reply Quote Share
Posts: 30 · Reputation: 179
#6Aug 2, 2018, 11:48 PM
Yo, Bitcoin Core is cool coz it handles change addresses smartly. If you send to a legacy address, your change address will also be legacy. Helps with privacy automatically.
0 Reply Quote Share
0xChadNewbie
Posts: 186 · Reputation: 3
#7Aug 3, 2018, 03:31 AM
Not the only one doing that. Mycelium has a Privacy Guard feature for change addresses. Armory also tries to match output types if set to Auto-change, tho it’s a bit different.
0 Reply Quote Share
Posts: 66 · Reputation: 24
#8Aug 3, 2018, 04:52 AM
Coin control is a must now. If your wallet doesn’t have it by 2025, ditch it. Bitcoin Core isn’t special because of that. Its main feature is being a full node, validating everything yourself.
2 Reply Quote Share
Posts: 30 · Reputation: 179
#9Aug 3, 2018, 08:55 AM
Yeah, Mycelium used to be my favorite on Android. I remember it supports multiple address scripts. Coinomi does too, but I’m not sure how it handles change addresses.
0 Reply Quote Share
0xChadNewbie
Posts: 186 · Reputation: 3
#10Aug 3, 2018, 11:12 AM
Kinda off topic, but Armory is still being developed, just really slowly. One dev is mainly keeping it going. Check out their GitHub for the latest updates.
2 Reply Quote Share

Related topics