One of the technical mechanisms that has helped earn bitcoin comparisons to cash is on the verge of a major update.
Called “coin selection,” the term refers to the algorithm that today decides which bits of data come together to create a user’s transaction. Essentially, the coin selection code replicates the process of giving, say, a $10 bill to a cashier for a $7 item and the consumer receiving $3 in change.
But if that doesn’t sound particularly complex, remember bitcoin is experimental software, and this function, while working, isn’t altogether optimized. Making matters worse, the part that perhaps needs tweaking has a direct impact on user costs.
“Bitcoin Core’s original coin selection algorithm actually needs a lot of reworking, especially with regards to transaction fees. It’s inefficient and it ends up doing a weird loop to try to guess the amount of transaction fees that are needed,” Bitcoin Core contributor Andrew Chow told CoinDesk.
Mark Erhardt an engineer at wallet provider BitGo agrees, going so far as to call the algorithm “convoluted” during a recent interview on the podcast Noded.
As such, developers have been working on a new algorithm, dubbed “branch and bound” or “BnB,” which forges together data in a more efficient way, resulting in a small scaling bump and lower transaction fees.
Erhardt first proposed some optimizations nearly two years ago, while Chow was the first developer to code up the changes.
And recently the change was deemed ready to be added to bitcoin’s most popular software implementation, Bitcoin Core, and so was merged into the codebase. Even better for users, the feature should be available for widespread use with the release of the 17th version of the software in the next year or so.
Speaking to the benefits of the changes, Chow said:
“This will let us tidy up the coin selection code a lot and actually make it possible for one person to understand exactly what the coin selection algorithm is doing.”