Skip to content

Commit 09cc9a9

Browse files
committed
2760
1 parent 868cf2f commit 09cc9a9

File tree

1 file changed

+42
-0
lines changed

1 file changed

+42
-0
lines changed

_posts/2023-12-06-#2760.md

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
---
2+
layout: pr
3+
date: 2023-00-00
4+
title: "Fix infinite loop when closing a pre-funding channel"
5+
pr: 2760
6+
authors: [jbesraa]
7+
components: ["channel-establishment", "channel-funding"]
8+
host: jbesraa
9+
status: upcoming
10+
commit:
11+
---
12+
13+
## Notes
14+
Creating a channel involves exchanging multiple messages with a
15+
connected peer, which does not always end up successfully.
16+
Specificly, in the current implemntation an infinite loop might occur
17+
in the funding step.
18+
19+
PR #2760 Addresses this issue.
20+
21+
+-------+ +-------+
22+
| |--(1)- open_channel ---->| |
23+
| |<-(2)- accep_channel ----| |
24+
| |--(3)- funding_created ->| |
25+
| |<-(4)- funding_signed ---| |
26+
| |--(5)- channel_ready --->| |
27+
| A |<-(6)- channel_ready ---| B |
28+
+-------+ +-------+
29+
30+
* Channel establishment(v1) is the process of creating a channel with a
31+
connected peer, as detailed here [lightning/bolt02].
32+
33+
## Questions
34+
1. Did you review the PR? [Concept ACK, approach ACK, tested ACK, or NACK](https://github.com/lightningdevkit/rust-lightning/blob/master/CONTRIBUTING.md#peer-review)?
35+
2. In the original code we have a loop inside `close_channel_internal`,
36+
in which scenario it goes indefintly?
37+
3. why are we able to drop `force_close_channel_with_peer` from
38+
`close_channel_internal`, and `funding_created` msg from `SignerResumeUpdate`?
39+
4. question about v2 channel establishemnt
40+
5. question about v2 channel establishemnt
41+
42+
[lightning/bolt02]: https://github.com/lightning/bolts/blob/master/02-peer-protocol.md#channel-establishment.

0 commit comments

Comments
 (0)