Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove obsolete WatchFundingConfirmed when using RBF #2961

Merged
merged 1 commit into from
Dec 9, 2024

Conversation

t-bast
Copy link
Member

@t-bast t-bast commented Dec 6, 2024

When using RBF for a dual-funded channel or a splice, we set multiple WatchFundingConfirmed for conflicting transactions. When one of those transactions confirms, the others will never confirm: it is wasteful to keep watching for their confirmation.

The watcher doesn't have enough information on its own to efficiently detect that some watches are double-spent: we instead rely on the consumer of the watch to tell the watcher to stop watching the RBF attempts.

Fixes #2954

When using RBF for a dual-funded channel or a splice, we set multiple
`WatchFundingConfirmed` for conflicting transactions. When one of those
transactions confirms, the others will never confirm: it is wasteful to
keep watching for their confirmation.

The watcher doesn't have enough information on its own to efficiently
detect that some watches are double-spent: we instead rely on the
consumer of the watch to tell the watcher to stop watching the RBF
attempts.

Fixes #2954
@t-bast t-bast requested review from remyers and pm47 December 6, 2024 15:44
Copy link
Contributor

@remyers remyers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! If the consumer must proactively rollback RBF funding txs for splices and dual-funding, it seems natural to have the consumer also proactively unwatch them at that point.

@t-bast t-bast merged commit 189e282 into master Dec 9, 2024
1 check passed
@t-bast t-bast deleted the rbf-obsolete-watch-confirmed branch December 9, 2024 13:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Clean-up expired WatchTxConfirmed when RBF is used
2 participants