sweep: continue sweeping at previous feerate when reaggregating #9422
Labels
fees
Related to the fees paid for transactions (both LN and funding/commitment transactions)
intermediate
Issues suitable for developers moderately familiar with the codebase and LN
utxo sweeping
Milestone
The sweeper currently aggregates HTLC claims with the same deadlines into the same sweep transaction. If the channel peer then claims one of those HTLCs on chain, the sweeper's aggregated transaction becomes invalid. The sweeper then removes the claimed HTLC and reaggregates the remaining HTLC claims into a new transaction.
When this occurs, the fee function gets reset and the feerate for the new transaction starts at the minimum again.
Instead, we should continue following the intended feerate curve after reaggregation.
Implementation
For the current linear fee function, we could make use of the existing
StartingFeeRate
field inSweeperInput.params
to store the previous feerate value when an input is markedPublishFailed
. Then on reaggregation the linear fee function will start there instead of back at the minimum.If we ever add more complex fee functions, we'd need to do something more complicated.
The text was updated successfully, but these errors were encountered: