Skip to content

Allow routing by older scids when we splice #8387

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

Open
wants to merge 10 commits into
base: master
Choose a base branch
from

Conversation

rustyrussell
Copy link
Contributor

We didn't remember old scids, so as soon as we spliced we fail to forward for an hour, until we can send the new channel_announcement and it propagates. Oops!

When we had to use the number to the db_bind call, these annotations made
sense, but since 0bcff1e (for v23.08) we
removed that.

So remove all the counters, which are simple overhead if we want to
change something.

Signed-off-by: Rusty Russell <[email protected]>
…n db.

There can be any number of these, and it will be useful to allow
routing by older scids (when other nodes haven't seen our gossip, or
even before we *can* announce the new post-splice channel).

Signed-off-by: Rusty Russell <[email protected]>
Changelog-Fixed: Protocol: we now allow routing through old short-channel-ids once a splice is done (previously we would refuse, leading to a 6 block gap in service).
Signed-off-by: Rusty Russell <[email protected]>
@rustyrussell rustyrussell added this to the v25.09 milestone Jul 1, 2025
@rustyrussell rustyrussell requested review from ddustin and sangbida July 1, 2025 06:35
Copy link
Collaborator

@ddustin ddustin left a comment

Choose a reason for hiding this comment

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

Makes sense and looks good to me! I think there's a small logic error with the scid chanmap but otherwise I can reason about it and it all makes sense to me. Excited to get splice routing during those 6 blocks. 👍

@rustyrussell rustyrussell force-pushed the guilt/splice-grace-period branch from f4566cd to 3e313e7 Compare July 10, 2025 04:55
@rustyrussell rustyrussell requested a review from ddustin July 10, 2025 04:55
…kup.

This contains real scids, as well as aliases, and old scids.

Signed-off-by: Rusty Russell <[email protected]>
We have a migration which ensures this, but then I discovered that did
*not* address channels without an SCID yet.  So fixed the migration, and
simpligied the code.

Signed-off-by: Rusty Russell <[email protected]>
We allowed NULL for stub channels, but just don't put the stub scid
into the hash tables.  This cleans up all the callers to make it
clear this is a non-optional parameter.

We opencode channel_set_random_local_alias, since there's only one caller now.

Signed-off-by: Rusty Russell <[email protected]>
This replaces the old "iterate through each peer, then each peer's channel" suboptimality.

A bit of care required that we don't expose scids if we're forwarding,
but that was already carefully handled.

Signed-off-by: Rusty Russell <[email protected]>
@rustyrussell rustyrussell force-pushed the guilt/splice-grace-period branch from 3e313e7 to dde28a5 Compare July 14, 2025 06:11
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.

2 participants