-
Notifications
You must be signed in to change notification settings - Fork 1k
Bolt quote updates and improvements #9079
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
8d43e01
869e1fd
3e97373
d18412b
92d3ec1
e4b1287
1cd4331
96760fb
3d2c49c
5b41f68
c94b113
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -5951,19 +5951,30 @@ static void peer_reconnect(struct peer *peer, | |
| "next_funding_txid not recognized."); | ||
| } | ||
|
|
||
| /* "none of those channel_reestablish messages contain | ||
| * my_current_funding_locked or next_funding for a splice transaction" */ | ||
| bool is_splice_active = local_next_funding | ||
| || peer->splice_state->locked_ready[LOCAL] | ||
| || remote_next_funding | ||
| || (recv_tlvs | ||
| && recv_tlvs->my_current_funding_locked | ||
| && !bitcoin_txid_eq( | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This doesn't look correct. Where does it say to check if the
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I did some deep diving on how to satisfy the "is splice transaction" requirement and it looks like we need to store some meta data about the inflight in the DB. Comparing against the I asked tbast what they're doing and they're storing a The idea is Another issue here is logic needs to follow below the BOLT spec reference which it did before this. This code should be moved back to where it was (below the BOLT spec reference), something like
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I Hey @ddustin! You're right that the BOLT #2 says:
The old code had no check for Where I went wrong was the "for a splice transaction" qualifier. I compared the Your |
||
| &recv_tlvs->my_current_funding_locked->my_current_funding_locked_txid, | ||
| &peer->channel->funding.txid)); | ||
|
|
||
| /* BOLT #2: | ||
| * | ||
| * - if `next_commitment_number` is 1 in both the | ||
| * `channel_reestablish` it sent and received: | ||
| * `channel_reestablish` it sent and received: | ||
| * - MUST retransmit `channel_ready`. | ||
| * - otherwise: | ||
| * - MUST NOT retransmit `channel_ready`, but MAY send | ||
| * `channel_ready` with a different `short_channel_id` | ||
| * `alias` field. | ||
| * - MUST NOT retransmit `channel_ready`, but MAY send `channel_ready` with | ||
| * a different `short_channel_id` `alias` field. | ||
| */ | ||
| if (peer->channel_ready[LOCAL] | ||
| && peer->next_index[LOCAL] == 1 | ||
| && next_commitment_number == 1) { | ||
| && next_commitment_number == 1 | ||
| && !is_splice_active) { | ||
| struct tlv_channel_ready_tlvs *tlvs = tlv_channel_ready_tlvs_new(tmpctx); | ||
|
|
||
| tlvs->short_channel_id = &peer->local_alias; | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.