-
Notifications
You must be signed in to change notification settings - Fork 945
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
rustyrussell
wants to merge
10
commits into
ElementsProject:master
Choose a base branch
from
rustyrussell:guilt/splice-grace-period
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Allow routing by older scids when we splice #8387
rustyrussell
wants to merge
10
commits into
ElementsProject:master
from
rustyrussell:guilt/splice-grace-period
+330
−140
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Spoiler: we don't! Signed-off-by: Rusty Russell <[email protected]>
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]>
ddustin
requested changes
Jul 9, 2025
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.
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. 👍
f4566cd
to
3e313e7
Compare
…kup. This contains real scids, as well as aliases, and old scids. Signed-off-by: Rusty Russell <[email protected]>
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]>
…mes. Signed-off-by: Rusty Russell <[email protected]>
3e313e7
to
dde28a5
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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!