Skip to content

Add BumpTransaction event handler#2089

Merged
TheBlueMatt merged 5 commits intolightningdevkit:mainfrom
wpaulino:bump-transaction-event-handler
Jun 19, 2023
Merged

Add BumpTransaction event handler#2089
TheBlueMatt merged 5 commits intolightningdevkit:mainfrom
wpaulino:bump-transaction-event-handler

Conversation

@wpaulino
Copy link
Contributor

@wpaulino wpaulino commented Mar 8, 2023

This allows users to bump their commitments and HTLC transactions without having to worry about all the little details to do so. Instead, we'll just require them to implement a small shim over their wallet/UTXO source, that grants the event handler permission to spend confirmed UTXOs for the transactions it'll produce.

While the event handler should in most cases produce valid transactions, assuming the provided confirmed UTXOs are valid, it may not produce relayable transactions due to not satisfying certain Replace-By-Fee (RBF) mempool policy requirements. Some of these require that the replacement transactions have a higher feerate and absolute fee than the conflicting transactions it aims to replace. To make sure we adhere to these requirements, we'd have to persist some state for all transactions the event handler has produced, greatly increasing its complexity. While we may consider implementing so in the future, we choose to go with a simple initial version that relies on the OnchainTxHandler's bumping frequency. For each new bumping attempt, the OnchainTxHandler proposes a 25% feerate increase to ensure transactions can propagate under constrained mempool circumstances.

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants