-
Notifications
You must be signed in to change notification settings - Fork 411
[Splicing] Tx negotiation during splicing #3736
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 @wpaulino as a reviewer! |
7f6dfbd
to
c3778bc
Compare
1 similar comment
1 similar comment
1 similar comment
1 similar comment
1 similar comment
1 similar comment
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.
Sorry about the late review. We were traveling to an off site last week. Just a high-level pass on the first four commits. Will need to take a closer look at the last one.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3736 +/- ##
==========================================
+ Coverage 89.73% 90.28% +0.55%
==========================================
Files 159 160 +1
Lines 128910 132032 +3122
Branches 128910 132032 +3122
==========================================
+ Hits 115676 119207 +3531
+ Misses 10536 10172 -364
+ Partials 2698 2653 -45 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
88d2e83
to
866368d
Compare
Ready for a new round of review. I have addressed the comments, applied most of them. There is still one to-do (update channel reserve values), that I will do, but the rest is ready for review. |
Ready for a new round of review. All pending and newly raised comments addressed. |
I'm working on shared input support, can be seen in draft PR #3842 . WIP. |
In begin_interactive_funding_tx_construction(), rename is_outbound to is_initiator, to prevent confusion with earlier the role at channel open.
Introduce struct NegotiatingChannelView to perform transaction negotiation logic, on top of both PendingV2Channel (dual-funded channel open) and FundedChannel (splicing).
Fill the logic for including transaction negotiation during splicing, implement the functions: splice_channel, splice_init, splice_ack, funding_tx_constructed. Also extend the test case test_v1_splice_in with the steps for funding negotiation during splicing.
13321b2
to
cabd6be
Compare
ChannelTransactionParameters: clone only unchanged members. Optimize checking twice for pending_splice in splice_ack.
Add Channel.as_negotiating_channel(), and use that to call into the 5 tx_*() methods, so those could be removed from Channel.
cabd6be
to
de1b796
Compare
Instead, rely on the presense of the funding_scope and interactive_tx_constructor optional fields.
Simplify handling of pending_splice field check, get rid of one unwrap().
de1b796
to
367593b
Compare
Comments addressed, summary of pending changes:
|
Let us know when this is ready for another round, no need to wait on #3842 to get more review on this. |
Implementation of transaction negotiation during splicing.
Builds on 3407 and 3443.
Funded(FundedChannel)
is used throughout splicingFundedChannel
andPendingV2Channel
can act as a transaction constructorPendingV2Channel
logic is put behind a trait --FundingTxConstructorV2
RenegotiatingScope
is used to store extra state during splicingFundingChannel
can act as aFundingTxConstructorV2
, using the state fromRenegotiatingScope
(if present)FundedChannel
andFundingTxConstructor
has context(), context accessors are extracted into a common base trait,ChannelContextProvider
(it is also shared byInitialRemoteCommitmentReceiver
).(Also relevant: #3444)