Skip to content
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

gossip: delay considering a channel edge deleted for 12-blocks #1004

Merged
merged 1 commit into from
Aug 15, 2022

Conversation

niftynei
Copy link
Collaborator

Allows us time to propagate a splice update (new channel_announcement)

Suggested-By: @t-bast
Co-Authored: @ddustin

Allows us time to propagate a splice update (new channel_announcement)

Suggested-By: @t-bast
Co-Authored: @ddustin
@@ -249,6 +249,10 @@ optional) features will have _odd_ feature bits, while incompatible features
will have _even_ feature bits
(["It's OK to be odd!"](00-introduction.md#glossary-and-terminology-guide)).

A delay of 12-blocks is used when forgetting a channel on funding output spend
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have a hard time parsing "channel on funding output spend". What is exactly meant by that?

Also, nit: s/12-blocks/12 blocks/

Copy link
Collaborator Author

@niftynei niftynei Jun 30, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See L226:

  - once its funding output has been spent OR reorganized out:

@t-bast
Copy link
Collaborator

t-bast commented Jun 24, 2022

I'd like to spend more time exploring the design space for splicing before acking this, sorry if it takes some time before I can comment!

@niftynei
Copy link
Collaborator Author

No worries! Thought I'd go ahead an make a PR for it though.

@TheBlueMatt
Copy link
Collaborator

What's the worry with Just Doing This? It seems good to get moving on this a ways before it's needed.

@Roasbeef
Copy link
Collaborator

What's the worry with Just Doing This? It seems good to get moving on this a ways before it's needed.

IMO in practice the signal will be pretty unreliable due to strictly relying on timely gossip message propagation. There also isn't a good way to track the actual observance of this, since it's more or less just a guideline.

I wrote more about this here, along with a suggestion for a primary chain signal, with the gossip signal (w/e that looks like) being secondary: https://lists.linuxfoundation.org/pipermail/lightning-dev/2022-June/003616.html

@t-bast
Copy link
Collaborator

t-bast commented Jun 28, 2022

That's what I had in mind, my thinking was that the splicing tx would be somehow identifiable as a splicing tx so that we don't need this 12-blocks delay at all. But the issue is that we'd like implementations to deploy code to identify this signal before we actually deploy splicing...

We can also choose to do both: delay considering a channel edge deleted for 12 blocks, which implementations can do today and will help splicing when it happens, even though it's not a perfect solution, and then implement a signal in the splicing tx to improve reliability, that would work for me - but it's only useful if all implementations agree to ship this 12 blocks delay in the short term.

@niftynei
Copy link
Collaborator Author

niftynei commented Jun 30, 2022

Here's a thought (also posted to ML): if you're in possession of a channel_announcement which indicates that it's a splice and you've seen a channel btw the same two peers close, you SHOULD prioritize spreading that gossip message to every peer you're connected to/have a channel with.

This is nice because it uses the on-chain signaling that @Roasbeef proposed, but doesn't require new protocol design, just changing the priority/scope of which you gossip a subset of messages.

This is nicely spam compatible. Splice gossip has a natural rate-limit/real world cost in that triggering the close onchain costs sats; you can't generate a lot of urgent gossip messages w/o sending money to the L1 miners.

@TheBlueMatt
Copy link
Collaborator

I honestly don't really understand this discussion. Gossip is never reliable, it was never meant to be reliable, and its always been best-effort. All nodes cooperate to try to make sure they all have as much a view of the routing table as possible, to ensure they have all the information they can when routing. If you're splicing, you're always going to have some users running today's software that will not be happy seeing the splice on-chain, this is true no matter what we do. If the concern is that 12 blocks isn't enough, well, then we can simply increase the constant, easy-peasy. Making sure splices are identifiable on-chain is wasteful and doesn't solve the issue as stated here except for new nodes, just like waiting to remove channels. Please, lets not over-complicate things...

@cdecker
Copy link
Collaborator

cdecker commented Jul 4, 2022

Agreed with @TheBlueMatt: the gossip is intended as a best effort system, and striving for completeness or timeliness is likely a far deeper Rabbit Hole than we're willing to tackle (now or potentially ever).

As for the actual number, 12 blocks seems like plenty: 6 blocks to make the New version announceable, plus 6 blocks for propagation (see #1001 for a back of the envelope calculation).

Do we also want onchain signaling? I'm not sure we want to make transactions identifiable beyond what we already have, but it might not be a huge loss here (we're gossiping about these outpoints anyway) and a belts and suspenders variant might be sensible.

This is all going to change when we detach gossip from onchain outpoints anyway, so maybe better not to overthink it here?

Copy link
Collaborator

@t-bast t-bast left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK

@t-bast
Copy link
Collaborator

t-bast commented Aug 12, 2022

Shall we merge this now? The previous spec meeting had acks from eclair, cln and ldk and @Roasbeef wasn't opposed to it?

Copy link
Collaborator

@Roasbeef Roasbeef left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🍫

@Roasbeef Roasbeef merged commit 47d325c into lightning:master Aug 15, 2022
ddustin added a commit to ddustin/lightning-rfc that referenced this pull request Aug 16, 2022
Solution is now to wait for 12-blocks for all channel closes as per:

lightning#1004
vincenzopalazzo added a commit to vincenzopalazzo/lnprototest that referenced this pull request Sep 19, 2022
Changelog-Added: gossip: delay considering a channel edge deleted for
12-blocks propose by lightning/bolts#1004

Signed-off-by: Vincenzo Palazzo <[email protected]>
vincenzopalazzo added a commit to vincenzopalazzo/lnprototest that referenced this pull request Sep 20, 2022
Changelog-Added: gossip: delay considering a channel edge deleted for
12-blocks propose by lightning/bolts#1004

Signed-off-by: Vincenzo Palazzo <[email protected]>
t-bast added a commit to t-bast/bolts that referenced this pull request Apr 29, 2024
We introduced a 12-blocks delay for channel closing in lightning#1004, but we
didn't update the requirement in the section about pruning.
t-bast added a commit that referenced this pull request May 7, 2024
We introduced a 12-blocks delay for channel closing in #1004, but we
didn't update the requirement in the section about pruning.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants