-
Notifications
You must be signed in to change notification settings - Fork 513
Increase channel close delay to 72 blocks #1270
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
base: master
Are you sure you want to change the base?
Conversation
In lightning#1044, we introduced a 12-blocks delay before considering a channel closed when we see a spending confirmation on-chain. This ensures that if the channel was spliced instead of closed, the channel participants are able to broadcast a new `channel_announcement` to the rest of the network. If this new `channel_announcement` is received by renote nodes before the 12-blocks delay, the channel can keep its history in path finding scoring/reputation, which is important. We then realize that 12 blocks probably wasn't enough to allow this to happen: some implementations default to 8 confirmations before sending `splice_locked`, and allow node operators to increase this value. We thus bump this delay to 72 blocks to allow more time before channels are removed from the local graph.
We previously waited for 12 blocks before removing spent channels from our graph: the spec updates this delay to 72 blocks to allow more time for splice announcement in lightning/bolts#1270. We also make this configurable, which can simplify testing and allows nodes to wait even longer if they wish.
We previously waited for 12 blocks before removing spent channels from our graph: the spec updates this delay to 72 blocks to allow more time for splice announcement in lightning/bolts#1270. We also make this configurable, which can simplify testing and allows nodes to wait even longer if they wish.
After a channel has been spent, we temporarily keep it in our graph in case it was spent by a splice transaction: however, we must not rebroadcast the corresponding `channel_announcement` to our peers, who may otherwise think we're spamming them with invalid channels. We don't rebroadcast `channel_update`s either in that case, unless they have the `disable` bit set to 1, which indicates that the channel is likely closed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM ⛩️
07-routing-gossip.md
Outdated
@@ -228,6 +228,7 @@ The receiving node: | |||
- SHOULD store this `channel_announcement`. | |||
- once its funding output has been spent OR reorganized out: | |||
- SHOULD forget a channel after a 72-block delay. | |||
- MUST NOT rebroadcast this `channel_announcement` to its peers. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SHOULD NOT?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done in 5dc8db0
Some implementations don't always check whether channels are spent before relaying gossip, and thus cannot guarantee that they'll only relay unspent channels. We relax the requirements to a `SHOULD NOT` instead of a `MUST NOT` to reflect that.
In #1044, we introduced a 12-blocks delay before considering a channel closed when we see a spending confirmation on-chain. This ensures that if the channel was spliced instead of closed, the channel participants are able to broadcast a new
channel_announcement
to the rest of the network. If this newchannel_announcement
is received by renote nodes before the 12-blocks delay, the channel can keep its history in path finding scoring/reputation, which is important.We then realize that 12 blocks probably wasn't enough to allow this to happen: some implementations default to 8 confirmations before sending
splice_locked
, and allow node operators to increase this value. We thus bump this delay to 72 blocks to allow more time before channels are removed from the local graph.We also add requirements in the 2nd commit to avoid rebroadcasting announcement for spent channels, because our peers may otherwise think we're trying to spam them.