-
Notifications
You must be signed in to change notification settings - Fork 991
splice: add zero-conf splice support per BOLT #2 #8985
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
Closed
vincenzopalazzo
wants to merge
5
commits into
ElementsProject:master
from
vincenzopalazzo:claude/eloquent-lehmann
Closed
Changes from 4 commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
7ca893f
splice: add zero-conf splice support per BOLT #2
vincenzopalazzo a0aa161
tests: add test_splice_zeroconf for zero-conf splice support
vincenzopalazzo 32471fa
fix: resolve zeroconf splice and gossip CI failures
vincenzopalazzo 7931c83
fix: address PR review feedback
vincenzopalazzo 7bd121c
fix: handle zeroconf splice reestablish
vincenzopalazzo File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
This is not the right place to be trying to do zero-conf. Instead we should initiate
splice_lockedinchanneldright after sendingtx_signatureswhich occurs inresume_splice_negotiation.This needs to be done with extra care because this flow can occur from initiate, accepter, or during the reestablish flow. We need to make sure it's behaving correctly in each of these flows.
Probably the best approach is to take the code in
handle_funding_depththat confirms the splice and move it out into it's own function so that we can additionally call it fromresume_splice_negotiation.It would be very important to duplicate the tests in
test_splicing_disconnect.pywith this new zero conf splice setting enabled.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.
Addressed in 7bd121c.
I moved zero-conf
splice_lockedinitiation intoresume_splice_negotiation()so we send it immediately after each localtx_signatureswrite, which covers the initiator, accepter, and reestablish paths in one place. For the reconnect cases I also persisti_sent_sigs, cache earlysplice_lockeduntil the local signature path is complete, and treatchannel_readyduring zero-conf reestablish as an implied peersplice_lockedonce we have already sent ours.I also duplicated the disconnect regressions for zero-conf in
tests/test_splicing_disconnect.pyand re-ran the zero-conf happy-path splice test. Verified with targeted runs oftest_splice_zeroconf,test_splice_disconnect_sig_zeroconf, andtest_splice_disconnect_commit_zeroconf.