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

Fix node announce self-advertize and advertize both sides of channels #6412

Conversation

rustyrussell
Copy link
Contributor

@endothermicdev investigated this, and we diagnosed together. It's a regression introduced in v23.05 when we moved "gossip blast" from gossip store into gossipd.

Through the glory of tests, we also fixed a similar issue where we didn't send incoming channel_updates: we never did, but it's a good thing to do!

Fixes: #6410

Alex and I were reading it and I got confused: it's really a simpler loop
than it seems, with all those redundant `continue` statements.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
We do this as suggested by the spec: send our own gossip even if they didn't ask for it.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Copy link
Collaborator

@endothermicdev endothermicdev left a comment

Choose a reason for hiding this comment

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

It's nice to make sure the node_announcements actually get out into the world. Thanks for the quick resolution to this bug report.

ACK 57dfdb0

}

/* If we announced a channel, we should send our own node_announcement */
if (announced_channels && me->bcast.index)
Copy link
Collaborator

Choose a reason for hiding this comment

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

It might be better to leave out the announced_channels flag. I can't think of a scenario where it results in a different outcome than relying on the existence of our node_announcement. Maybe it's useful once there's a spliced channel in progress if we wanted to stop gossiping about it in the interim?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hmm, good thinking! Any failure is weird, and it can't hurt. I'll remove the flag...

@endothermicdev and I found this while investigating a "nobody sees my node_announcement" bug report.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Fixes: ElementsProject#6410
Reported-by: benjaminchodroff on discord
Changelog-Fixed: Protocol: When we send our own gossip when a peer connects, send our node_announcement too (regression in v23.05)
While one side was not produced by us, we have a vested interest in propagating it.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Changelog-Added: Protocol: When we send our own gossip when a peer connects, also send any incoming channel_updates.
@rustyrussell rustyrussell force-pushed the guilt/fix-node-announce-on-connect branch from 57dfdb0 to 4008452 Compare July 20, 2023 02:41
@cdecker
Copy link
Member

cdecker commented Jul 20, 2023

ACK 4008452

Copy link
Collaborator

@endothermicdev endothermicdev left a comment

Choose a reason for hiding this comment

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

ACK 4008452

@rustyrussell rustyrussell merged commit 55d6a13 into ElementsProject:master Jul 20, 2023
38 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Node announcement not reaching peers
3 participants