Skip to content

Conversation

@t-bast
Copy link
Member

@t-bast t-bast commented Dec 12, 2024

As pointed out in lightning/bolts#1214, when reconnecting a partially signed interactive-tx session, we should set next_commitment_number to the current commitment number if we haven't received our peer's commit_sig, which tells them they need to retransmit it.

That's not what we're currently doing: we're currently setting this value to the next commitment number, regardless of whether or not we have received our peer's commit_sig. And we always retransmit our commit_sig if our peer is setting next_funding_txid, even if they have already received it.

More importantly, if our peer behaves correctly and sends us the current commitment number, we will think that they're late and will halt, waiting for them to send error. This commit fixes that by allowing our peers to use the current commitment number when they set next_funding_txid.

Note that this doesn't yet make us spec-compliant, but in order to guarantee backwards-compatibility, we must first deploy that change before we can start removing spurious commit_sig retransmissions.

…umber`

As pointed out in lightning/bolts#1214, when
reconnecting a partially signed `interactive-tx` session, we should
set `next_commitment_number` to the current commitment number if we
haven't received our peer's `commit_sig`, which tells them they need
to retransmit it.

That's not what we're currently doing: we're currently setting this
value to the next commitment number, regardless of whether or not
we have received our peer's `commit_sig`. And we always retransmit
our `commit_sig` if our peer is setting `next_funding_txid`, even
if they have already received it.

More importantly, if our peer behaves correctly and sends us the
current commitment number, we will think that they're late and will
halt, waiting for them to send `error`. This commit fixes that by
allowing our peers to use the current commitment number when they
set `next_funding_txid`.

Note that this doesn't yet make us spec-compliant, but in order to
guarantee backwards-compatibility, we must first deploy that change
before we can start removing spurious `commit_sig` retransmissions.
@t-bast t-bast merged commit ef1a029 into master Jan 9, 2025
1 check passed
@t-bast t-bast deleted the allow-next-funding-txid-with-previous-commitment branch January 9, 2025 12:15
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