-
Notifications
You must be signed in to change notification settings - Fork 423
Rework ChannelManager::funding_transaction_signed #4257
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
base: main
Are you sure you want to change the base?
Rework ChannelManager::funding_transaction_signed #4257
Conversation
|
👋 Thanks for assigning @jkczyz as a reviewer! |
Previously, we'd emit a `FundingTransactionReadyForSigning` event once the initial `commitment_signed` is exchanged for a splicing/dual-funding attempt and require users to call back with their signed inputs using `ChannelManager::funding_transaction_signed`. While this approach worked in practice, it prevents us from abandoning a splice if we cannot or no longer wish to sign as the splice has already been committed to by this point. This commit reworks the API such that this is now possible. After exchanging `tx_complete`, we will no longer immediately send our initial `commitment_signed`. We will now emit the `FundingTransactionReadyForSigning` event and wait for the user to call back before releasing both our initial `commitment_signed` and our `tx_signatures`. As a result, the event is now persisted, as there is only one possible path in which it is generated. Note that we continue to only emit the event if a local contribution to negotiated transaction was made. Future work will expose a cancellation API such that we can abandon splice attempts safely (we can just force close the channel with dual-funding).
61719cf to
135605f
Compare
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #4257 +/- ##
==========================================
- Coverage 89.33% 89.31% -0.03%
==========================================
Files 180 180
Lines 139042 139030 -12
Branches 139042 139030 -12
==========================================
- Hits 124219 124172 -47
- Misses 12196 12217 +21
- Partials 2627 2641 +14
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
🔔 1st Reminder Hey @jkczyz! This PR has been waiting for your review. |
|
🔔 2nd Reminder Hey @jkczyz! This PR has been waiting for your review. |
Previously, we'd emit a
FundingTransactionReadyForSigningevent once the initialcommitment_signedis exchanged for a splicing/dual-funding attempt and require users to call back with their signed inputs usingChannelManager::funding_transaction_signed. While this approach worked in practice, it prevents us from abandoning a splice if we cannot or no longer wish to sign as the splice has already been committed to by this point.This commit reworks the API such that this is now possible. After exchanging
tx_complete, we will no longer immediately send our initialcommitment_signed. We will now emit theFundingTransactionReadyForSigningevent and wait for the user to call back before releasing both our initialcommitment_signedand ourtx_signatures. As a result, the event is now persisted, as there is only one possible path in which it is generated. Note that we continue to only emit the event if a local contribution to negotiated transaction was made.Future work will expose a cancellation API such that we can abandon splice attempts safely (we can just force close the channel with dual-funding).