Last active
November 20, 2024 17:33
-
-
Save ddustin/10f4cfd1e5d84395c9678ea90f1a7f7f to your computer and use it in GitHub Desktop.
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
Question of reestablish and `tx_abort`. | |
We two nodes, l1 and l2 who are doing an interactive splice. Both sides have sent `tx_complete` and the splice has reached the signing phase. | |
By signature ordering rules, l2 signs first. | |
``` | |
l1 l2 | |
<- commit_sig | |
*l1 restarts* | |
``` | |
Nodes reconnect and reestablish flow begins. l1 has dropped the splice candidate as it never got to signing and l2 kept it as it. | |
``` | |
l1 l2 | |
<- channel_reestablish (w/splice txid) | |
tx_abort -> | |
<- tx_abort | |
``` | |
l1 is aborting for this reason: `We are initiating tx_abort for reason: next_funding_txid not recognized. Sending tx_abort.` | |
# Here is the question | |
Under CLN's behavior, we would always restart the channel flow from the very begining. This means another `channel_reestablish` message along with the rest of the normal new connection flow. | |
Under Eclair's behavior, `tx_abort` continues the channel in place and no new `channel_reestablish` message is sent. | |
Switching CLN to Eclair's behavior we new abort the reestablish and the rest of the reestablish flow is simply aborted. This is showing up in tests because `channel_ready` is no longer firing. | |
This raises a larger question though of it is safe to `tx_abort` mid-reestablish given the complex nature of a reestablish and how this might effect other things that depending on it be performed precisely -- including future reestablish needs that may arise. | |
I believe special casing our `resume_splice_negotiation` with this logic may address the issue: | |
``` | |
/* If `recv_commitments` true and msg_received `tx_abort`: | |
* - If !have_i_signed_inflight() | |
* - DROP inflight on master | |
* - If this is during a reestablish: | |
* - send tx_abort and return | |
* - otherwise | |
* - go into check_tx_abort flow | |
* - otherwise | |
* - We have sent a sig and we cannot drop inflight | |
* - If this is during a reestablish: | |
* - send tx_abort and return | |
* - otherwise | |
* - go into check_tx_abort flow | |
*/ | |
``` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment