-
Notifications
You must be signed in to change notification settings - Fork 922
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
Fix node announce self-advertize and advertize both sides of channels #6412
Conversation
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 <[email protected]>
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 <[email protected]>
34f018c
to
57dfdb0
Compare
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.
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
gossipd/gossipd.c
Outdated
} | ||
|
||
/* If we announced a channel, we should send our own node_announcement */ | ||
if (announced_channels && me->bcast.index) |
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.
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?
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.
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 <[email protected]> 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 <[email protected]> Changelog-Added: Protocol: When we send our own gossip when a peer connects, also send any incoming channel_updates.
57dfdb0
to
4008452
Compare
ACK 4008452 |
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.
ACK 4008452
@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