-
Notifications
You must be signed in to change notification settings - Fork 417
Contribute funding inputs on accepting dual-funded channel #3735
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?
Conversation
👋 Thanks for assigning @jkczyz as a reviewer! |
e22fa33
to
fabbf86
Compare
c42f3d0
to
186d66b
Compare
186d66b
to
c7d8e89
Compare
c7d8e89
to
540b8a7
Compare
Looks like this needs a rebase after #3637 |
540b8a7
to
94bf848
Compare
ugh right! |
Don't the first three commits need to be dropped? |
67504f0
to
9f276d8
Compare
Just needs node reload tests but it can still get some initial review. |
9f276d8
to
60f58b1
Compare
@@ -11110,6 +11111,31 @@ where | |||
script_pubkey: funding.get_funding_redeemscript().to_p2wsh(), | |||
}; | |||
|
|||
// Optionally add change output |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wouldn't this already be covered by begin_interactive_funding_tx_construction
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh indeed. begin_interactive_funding_tx_construction
was modified to include that in a previous pre-splicing work. Thanks.
@@ -11110,6 +11111,31 @@ where | |||
script_pubkey: funding.get_funding_redeemscript().to_p2wsh(), | |||
}; | |||
|
|||
// Optionally add change output | |||
let change_script = signer_provider.get_destination_script(context.channel_keys_id) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe let the user optionally provide a change address along with their inputs?
Since the |
🔔 1st Reminder Hey @jkczyz! This PR has been waiting for your review. |
🔔 2nd Reminder Hey @jkczyz! This PR has been waiting for your review. |
Agreed. Apologies for the late response. Back home now. I'll split it into a separate PR and we can discuss changes. |
🔔 3rd Reminder Hey @jkczyz! This PR has been waiting for your review. |
9a2a5ce
to
8006303
Compare
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #3735 +/- ##
==========================================
+ Coverage 88.75% 88.82% +0.07%
==========================================
Files 176 176
Lines 128817 129026 +209
Branches 128817 129026 +209
==========================================
+ Hits 114327 114610 +283
+ Misses 11893 11825 -68
+ Partials 2597 2591 -6
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:
|
🔔 4th Reminder Hey @jkczyz! This PR has been waiting for your review. |
🔔 5th Reminder Hey @jkczyz! This PR has been waiting for your review. |
🔔 6th Reminder Hey @jkczyz! This PR has been waiting for your review. |
🔔 7th Reminder Hey @jkczyz! This PR has been waiting for your review. |
🔔 8th Reminder Hey @jkczyz! This PR has been waiting for your review. |
🔔 9th Reminder Hey @jkczyz! This PR has been waiting for your review. |
🔔 10th Reminder Hey @jkczyz! This PR has been waiting for your review. |
🔔 11th Reminder Hey @jkczyz! This PR has been waiting for your review. |
8006303
to
e17eedb
Compare
35e1689
to
92ca1f1
Compare
…annel We introduce a `ChannelManager::accept_inbound_channel_with_contribution` method allowing contributing to the overall channel capacity of an inbound dual-funded channel by contributing inputs.
We can now run through the case where the acceptor contributes to an inbound channel, with either more value in inputs, or less value, leading to a different `tx_signatures` exchange order. We also cannot use dummy P2WPKH funding inputs and witnesses anymore as `funding_transaction_signed` internally verifies signatures. Hence, we create external keypairs that we can create outputs for and sign with.
92ca1f1
to
c059e03
Compare
We introduce a
ChannelManager::accept_inbound_channel_with_contribution
method allowing contributing to the overall channel capacity of an inbound
dual-funded channel by contributing inputs.