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

Don't send splice_locked before tx_signatures #2741

Merged
merged 1 commit into from
Sep 13, 2023

Conversation

t-bast
Copy link
Member

@t-bast t-bast commented Sep 12, 2023

When reconnecting in the middle of signing a splice, we must ensure that splice_locked is sent after tx_signatures. Otherwise when using 0-conf we may retransmit splice_locked before tx_signatures, which our peer will ignore because they don't have a corresponding fully signed commitment.

This may eventually lead to a mismatch where one side thinks that the splice has been locked and the other doesn't, so one side will send more signatures which results in a force-close.

It should never happen though, because we only send splice_locked once the transaction has been published (zero-conf) or confirmed. Once that happened, we will never retransmit tx_signatures (because we run into that condition), so we'll never mix tx_signatures and splice_locked. But it is more future-proof to make that change, in case we later change our behavior to re-send tx_signatures even if the transaction was already published or confirmed.

When reconnecting in the middle of signing a splice, we must ensure that
splice_locked is sent *after* tx_signatures. Otherwise when using 0-conf
we may retransmit splice_locked before tx_signatures, which our peer will
ignore because they don't have a corresponding fully signed commitment.
@t-bast t-bast requested a review from pm47 September 12, 2023 09:40
@t-bast t-bast changed the title Don't send splice_locked before tx_signatures Don't send splice_locked before commitment_signed Sep 12, 2023
@t-bast t-bast changed the title Don't send splice_locked before commitment_signed Don't send splice_locked before tx_signatures Sep 12, 2023
@t-bast t-bast merged commit 948b4b9 into master Sep 13, 2023
1 check passed
@t-bast t-bast deleted the splice-locked-after-tx-sigs branch September 13, 2023 13:40
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.

2 participants