multi: add new config option BudgetConfig and NoDeadlineConfTarget

This commit adds a new group config `BudgetConfig` to allow users
specifying their own preference when sweeping outputs. And a new config
option `NoDeadlineConfTarget` is added in case the user wants to use a
different "lazy" conf target.
This commit is contained in:
yyforyongyu
2024-03-19 04:45:05 +08:00
parent c44b8a4b45
commit 0a611aae00
9 changed files with 298 additions and 20 deletions

View File

@@ -1622,6 +1622,57 @@
; causing HTLCs to expire hence potentially losing funds.
; sweeper.maxfeerate=1000
; The conf target to use when sweeping non-time-sensitive outputs. This is
; useful for sweeping outputs that are not time-sensitive, and can be swept at
; a lower fee rate.
; sweeper.nodeadlineconftarget=1008
; An optional config group that's used for the automatic sweep fee estimation.
; The Budget config gives options to limits ones fee exposure when sweeping
; unilateral close outputs and the fee rate calculated from budgets is capped
; at sweeper.maxfeerate. Check the budget config options for more details.
; sweeper.budget=
[sweeper.budget]
; The amount in satoshis to allocate as the budget to pay fees when sweeping
; the to_local output. If set, the budget calculated using the ratio (if set)
; will be capped at this value.
; sweeper.budget.tolocal=
; The ratio of the value in to_local output to allocate as the budget to pay
; fees when sweeping it.
; sweeper.budget.tolocalratio=0.5
; The amount in satoshis to allocate as the budget to pay fees when CPFPing a
; force close tx using the anchor output. If set, the budget calculated using
; the ratio (if set) will be capped at this value.
; sweeper.budget.anchorcpfp=
; The ratio of a special value to allocate as the budget to pay fees when
; CPFPing a force close tx using the anchor output. The special value is the
; sum of all time-sensitive HTLCs on this commitment subtracted by their
; budgets.
; sweeper.budget.anchorcpfpratio=0.5
; The amount in satoshis to allocate as the budget to pay fees when sweeping a
; time-sensitive (first-level) HTLC. If set, the budget calculated using the
; ratio (if set) will be capped at this value.
; sweeper.budget.deadlinehtlc=
; The ratio of the value in a time-sensitive (first-level) HTLC to allocate as
; the budget to pay fees when sweeping it.
; sweeper.budget.deadlinehtlcratio=0.5
; The amount in satoshis to allocate as the budget to pay fees when sweeping a
; non-time-sensitive (second-level) HTLC. If set, the budget calculated using
; the ratio (if set) will be capped at this value.
; sweeper.budget.nodeadlinehtlc=
; The ratio of the value in a non-time-sensitive (second-level) HTLC to
; allocate as the budget to pay fees when sweeping it.
; sweeper.budget.nodeadlinehtlcratio=0.5
[htlcswitch]