bdk
bdk copied to clipboard
Improving Coinselection in BDK
Description
Coinselection is the scheme to select a set of utxo, from all the available utxos, to create the most optimum spending transaction. Effective coinselection is beneficial for reducing transaction fees as well as improving operation privacy for a wallet. BDK currently uses two coinselection algorithms, LargestFirst and BranchAndBound.
The aim of the project is to
- include more coinselection algorithms in the library.
- Add a comparative mechanism to evaluate coinselection results from different algos.
- Use the most “effective” algorithm chosen by a “specific metric”.
Expected Outcomes
- General understanding coinselection in Bitcoin protocol.
- Comparative study between different coinselection algorithms.
- Coming up with a metric to compare results of different coinselection algos.
Resources
- What is Coin Selection
- Generic Coin Selection research paper
- Bitcoin Core PR Review Club on "waste metric".
- Proposed waste metric in rust for BDK to compare different coin selection algorithms.
- BDK Coin selection improvement idea.
- Coin Selection Literature.
- Scaling Bitcoin 2016, Milan, Coin Selection PPT
- Scaling Bitcoin 2016, Milan, Coin Selection Transcript
Skills Required
- Experience with git. Guide
- Basic familiarity with rust. First seven chapters of the book
- Familiarity with Bitcoin’s Coin Selection algorithms.
- Familiarity with BDK’s coinselection module.
Mentor(s)
@danielabrozzoni
Difficulty : Medium
Competency Test (optional)
- Install rust, compile and run all bdk examples and tests.
- Read through the BDK docs.
- Make a dummy wallet with BDK with different blockchain backends.
- Familiarity with basic rust, should be able to write custom trait implementations on foreign structures.
Additional reading on coin selection.
Recent: https://bitcoincore.reviews/22009 #435 #120
Historical: https://murch.one/wp-content/uploads/2016/11/erhardt2016coinselection.pdf https://scalingbitcoin.org/milan2016/presentations/D2%20-%204%20-%20Mark%20Erhardt.pdf https://scalingbitcoin.org/transcript/milan2016/coin-selection
Hey, I am Tejasvi and I am looking forward to contributing to this project. I am new to rust so currently I am learning it. I have thoroughly gone through the research paper on coin selection. What should be my next step?
Hi @Tejasvigupta are you part of the summer of bitcoin group? And if so have you already gone through their screening? https://guide.summerofbitcoin.org/about/how-it-works
Hi @notmandatory I am a member of the summer of bitcoin group and I have already gone through their screening round.
Closing this issue until we have officially move coin selection out of bdk_wallet
and into a new bdk_coin_select
crate.