-
Notifications
You must be signed in to change notification settings - Fork 2.3k
sweeper+contractcourt: deadline aware HTLC claims & commitment confirmation #4215
Copy link
Copy link
Closed
Closed
Copy link
Labels
P1MUST be fixed or reviewedMUST be fixed or reviewedanchorschain handlingcommitmentsCommitment transactions containing the state of the channelCommitment transactions containing the state of the channelcontractsfeesRelated to the fees paid for transactions (both LN and funding/commitment transactions)Related to the fees paid for transactions (both LN and funding/commitment transactions)safetyGeneral label for issues/PRs related to the safety of using the softwareGeneral label for issues/PRs related to the safety of using the software
Milestone
Metadata
Metadata
Assignees
Labels
P1MUST be fixed or reviewedMUST be fixed or reviewedanchorschain handlingcommitmentsCommitment transactions containing the state of the channelCommitment transactions containing the state of the channelcontractsfeesRelated to the fees paid for transactions (both LN and funding/commitment transactions)Related to the fees paid for transactions (both LN and funding/commitment transactions)safetyGeneral label for issues/PRs related to the safety of using the softwareGeneral label for issues/PRs related to the safety of using the software
Type
Fields
Give feedbackNo fields configured for issues without a type.
Projects
Status
✅ Done
One of the primary goals of anchor outputs is to be able to adjust fee rates to ensure that both the commitment transaction and the possibly contested HTLCs on the transaction get into the block in time. With our inclusion of anchor output enabled commitments, we're now able to do this using CPFP on the main commitment transaction, and either RBF or attaching a new input+output pair for the HTLC transactions. As we're concerned with the critical case of proper multi-hop HTLC resolution, we should expand all sub-systems related to commitment confirmation and HTLC claims to be able to ratchet up the fee rate with a deadline: the expiry of the CTLV delta between HTLC pairs.
Steps to Completion
Expand the commitment anchor sweeping by the sweeper to allow the caller to specify a new constraint: a confirmation deadline. We visited this route in the past with the hypothetical "super sweeper" sub-system. One open question here still is: do we bump each block we aren't confirmed until we reach a max fee, or do we wait for a period of T blocks, then rachet all the way up to our final fee.
Expose this new deadline formation in either
PendingChannels, orPendingSweeps(walletkit sub-server).Dynamically bump the posted transaction fee as we gradually approach the deadline
This is related to #610, as we'll also want the initiator of the channel to be able to set the base commitment fee, and also update it as they wish. In addition, after that issue, we should start to target a higher confirmation goal (in blocks) than we do atm, since we only want to ensure the fee is enough to land in the mempool. Once in the mempool, we should use CPFP to bump accordingly as described above.