Resign next remote commit on reconnection - #3157
Merged
Merged
Conversation
We previously retransmitted our last `commit_sig` on reconnection if it hadn't been received by our peer, without changing it. This can be an issue for taproot channels when remote nodes don't use deterministic nonce derivation, because their nonce may be different on reconnection and our previous `commit_sig` would thus not be valid anymore. We now re-sign the next commitment on reconnection, using the latest nonces we receive from `channel_reestablish`.
It is now just a wrapper around a `RemoteCommit`, so it's not useful and just cumbersome compared to directly using a `RemoteCommit` instance.
t-bast
force-pushed
the
taproot-reconnect-sig
branch
from
September 11, 2025 09:41
99c39e8 to
ccf8d17
Compare
t-bast
marked this pull request as ready for review
September 11, 2025 09:41
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #3157 +/- ##
==========================================
+ Coverage 86.43% 88.91% +2.47%
==========================================
Files 242 218 -24
Lines 22607 20481 -2126
Branches 832 816 -16
==========================================
- Hits 19541 18210 -1331
+ Misses 3066 2271 -795
🚀 New features to boost your workflow:
|
sstone
approved these changes
Sep 11, 2025
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
We previously retransmitted our last
commit_sigon reconnection if it hadn't been received by our peer, without changing it. This can be an issue for taproot channels when remote nodes don't use deterministic nonce derivation, because their nonce may be different on reconnection and our previouscommit_sigwould thus not be valid anymore.We now re-sign the next commitment on reconnection, using the latest nonces we receive from
channel_reestablish.In the second commit, we remove the
NextRemoteCommitcase class, which is otherwise just a dumb wrapper aroundRemoteCommit.