You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
lightningd updates the channel's scid when a splice is confirmed on chain. This creates a subtle issue however where lightningd and channeld disagree on the scid for a short period of time.
After the splice is confirmed, channeld sends splice_locked and waits to hear it back. Once it is both sent and received it is considered mutual_splice_locked and will update the scid to its new post-splice value at that point.
If a disconnection and / or restart occurs after confirmation but before mutual_splice_locked, lightningd's new scid value will prevail incorrectly.
The primary fix is to move lightningd's scid update to occur after mutual_splice_lock instead, but this introduces new state complexity:
On boot if splice is confirmed but not mutual_splice_locked, channeld_init should pass in values for splice_state->short_channel_id and splice_state->locked_txid.
If channeld sees these values present in channeld_init, it should know the splice is confirmed but not locked. After reestablish is completed, it should begin the splice_locked procedure.
Upon reestablish if the peer is using the stale scid, we should be okay with it but expect splice_locked within some kind of grace period.
If we receive splice_locked but from our perspective we are already mutual_splice_locked, we should mirror the message back but not reemit any local mutal lock events
Uh oh!
There was an error while loading. Please reload this page.
lightningd
updates the channel'sscid
when a splice is confirmed on chain. This creates a subtle issue however wherelightningd
andchanneld
disagree on thescid
for a short period of time.After the splice is confirmed,
channeld
sendssplice_locked
and waits to hear it back. Once it is both sent and received it is consideredmutual_splice_locked
and will update thescid
to its new post-splice value at that point.If a disconnection and / or restart occurs after confirmation but before
mutual_splice_locked
,lightningd
's newscid
value will prevail incorrectly.The primary fix is to move
lightningd
's scid update to occur after mutual_splice_lock instead, but this introduces new state complexity:mutual_splice_locked
,channeld_init
should pass in values forsplice_state->short_channel_id
andsplice_state->locked_txid
.channeld
sees these values present inchanneld_init
, it should know the splice is confirmed but not locked. Afterreestablish
is completed, it should begin thesplice_locked
procedure.scid
, we should be okay with it but expectsplice_locked
within some kind of grace period.splice_locked
but from our perspective we are alreadymutual_splice_locked
, we should mirror the message back but not reemit any local mutal lock eventsreference for discovery of the issue here: https://github.com/ElementsProject/lightning/pull/6628/files#issuecomment-1729967338
The text was updated successfully, but these errors were encountered: