sweep: add support for multiple fee preferences to UtxoSweeper #3026
In this PR, we introduce support for arbitrary client fee preferences when accepting input sweep requests. This is possible with the addition of fee rate buckets. Fee rate buckets are buckets that contain inputs with similar fee rates within a specific range, e.g., 1-10 sat/vbyte, 11-20 sat/vbyte, etc. Having these buckets allows us to batch and sweep inputs from different clients with similar fee rates within a single transaction, allowing us to save on chain fees. Implementing these fee rate buckets also lays down the groundwork required for being able to bump the fee rates for particular inputs.
We also get rid of the UtxoSweeper's default fee preference. Any clients using it to sweep inputs specify the same default fee preference to not change their behavior. Each of these can be fine-tuned later on given their use cases.
referenced this pull request
May 17, 2019
Roasbeef left a comment
Will start to run some live tests on testnet+mainnet (mainnet is more interesting since fees are starting to fluctuate more) and will report back if anything stands out (using the other RPC to monitor sweeping progress).