Skip to content

Resign next remote commit on reconnection - #3157

Merged
t-bast merged 2 commits into
masterfrom
taproot-reconnect-sig
Sep 12, 2025
Merged

Resign next remote commit on reconnection#3157
t-bast merged 2 commits into
masterfrom
taproot-reconnect-sig

Conversation

@t-bast

@t-bast t-bast commented Sep 8, 2025

Copy link
Copy Markdown
Member

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.

In the second commit, we remove the NextRemoteCommit case class, which is otherwise just a dumb wrapper around RemoteCommit.

@t-bast
t-bast requested a review from sstone September 8, 2025 12:50
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
t-bast force-pushed the taproot-reconnect-sig branch from 99c39e8 to ccf8d17 Compare September 11, 2025 09:41
@t-bast
t-bast marked this pull request as ready for review September 11, 2025 09:41
@codecov-commenter

codecov-commenter commented Sep 11, 2025

Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

❌ Patch coverage is 97.56098% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 88.91%. Comparing base (f93d02f) to head (ccf8d17).
⚠️ Report is 108 commits behind head on master.

Files with missing lines Patch % Lines
...in/scala/fr/acinq/eclair/channel/fsm/Channel.scala 90.90% 1 Missing ⚠️
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.
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     
Files with missing lines Coverage Δ
...in/scala/fr/acinq/eclair/channel/Commitments.scala 95.92% <100.00%> (ø)
...c/main/scala/fr/acinq/eclair/channel/Helpers.scala 92.65% <100.00%> (+0.01%) ⬆️
...la/fr/acinq/eclair/channel/fsm/ErrorHandlers.scala 83.41% <100.00%> (ø)
...n/scala/fr/acinq/eclair/json/JsonSerializers.scala 96.00% <ø> (ø)
...ire/internal/channel/version5/ChannelCodecs5.scala 99.48% <100.00%> (-0.52%) ⬇️
...wire/internal/channel/version5/ChannelTypes5.scala 100.00% <100.00%> (ø)
...in/scala/fr/acinq/eclair/channel/fsm/Channel.scala 84.24% <90.90%> (-0.07%) ⬇️

... and 9 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@t-bast
t-bast merged commit 379abc5 into master Sep 12, 2025
1 of 2 checks passed
@t-bast
t-bast deleted the taproot-reconnect-sig branch September 12, 2025 07:39
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.

3 participants