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

fix: Invalid commitment tx signature from peer after processing pending Accept or CloseAccept message #1169

Merged
merged 2 commits into from
Aug 28, 2023

Conversation

holzeis
Copy link
Contributor

@holzeis holzeis commented Aug 28, 2023

Error happens when the pending Accept or CloseAccept message is processed after connection has lost and the channel is re-established again.

The first commit e9bdf05 reproduces the errors reported in #1074 and #1141.
The second commit 5ec59d2 points to the fix in rust-dlc p2pderivatives/rust-dlc#142. Note, this is still pointing to the PR as it is waiting a review. We may want to want for the merge there before merging this PR.

fixes #1074
fixes #1141

Note, already broken channels will not get recovered with that fix and have to be force-closed.

@holzeis holzeis requested review from bonomat and luckysori August 28, 2023 09:37
@holzeis holzeis self-assigned this Aug 28, 2023
@holzeis holzeis changed the title test: Reproduce Invalid commitment tx signature from peer fix: Invalid commitment tx signature from peer after processing pending Accept or CloseAccept message Aug 28, 2023
Copy link
Contributor

@bonomat bonomat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Error happens when the pending `Accept` or `CloseAccept` message is processed after connection has lost and the channel is re-established again.
Drop pending `Accept` and `CloseAccept` messages after peer disconnects.
@holzeis holzeis force-pushed the fix/invalid-commitment-tx-signature-from-peer branch from d5d04a7 to 5ec59d2 Compare August 28, 2023 10:04
@holzeis holzeis enabled auto-merge August 28, 2023 10:07
@holzeis holzeis added this pull request to the merge queue Aug 28, 2023
Merged via the queue into main with commit 9fa60e0 Aug 28, 2023
7 checks passed
@holzeis holzeis deleted the fix/invalid-commitment-tx-signature-from-peer branch August 28, 2023 11:38
@holzeis holzeis restored the fix/invalid-commitment-tx-signature-from-peer branch August 28, 2023 11:46
@klochowicz klochowicz deleted the fix/invalid-commitment-tx-signature-from-peer branch August 28, 2023 16:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants