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

gossipd: don't send zombie node announcements, load from store correctly #6066

Closed

Conversation

endothermicdev
Copy link
Collaborator

This addresses two issues with gossipd:

Node announcements were mistakenly broadcast for zombie channels (but not the update.)

Zombie flagged channels were mistaken for private channels and ignored during loading, leaving behind the original. This leads to problems for gossip store consumers and during gossip store reloading.

Changelog-Fixed: gossipd: no longer broadcasts node_announcement without update.
Changelog-Fixed: gossip_store: no longer corrupted by failure to load channel announcement.

This can happen while loading from the store, leading to the channel
announcement being ignored. This leads to a duplicate channel announcement
being added, corrupting the gossip_store.

Zombie channel announcements also do not need to be rebroadcast.

Changelog-Fixed: gossip_store: no longer corrupted by failure to load channel announcement.
Changelog-Fixed: gossipd: no longer broadcasts node_announcement without update.
Investigating ElementsProject#6065, the channel_amount gossip_store addendum may be
inadvertently broadcast. Flagging it will tell any gossip_store consumers
to ignore.
Copy link
Contributor

@rustyrussell rustyrussell left a comment

Choose a reason for hiding this comment

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

I think this makes the code even less, nor more, readable.

Comment on lines 73 to 81
static inline bool is_chan_public(const struct chan *chan)
{
/* When loading from the gossip_store, zombie channels may also
* temporarily be in the unannounced channel list. However, only public
* channels may be zombies. */
if (chan->half[0].zombie || chan->half[1].zombie)
return true;
return chan->bcast.timestamp != 0;
}
Copy link
Contributor

Choose a reason for hiding this comment

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

No, this is too ugly to live, and I can't tell what else this might break. These fields may even be uninitialized in some cases.

Let's drop this zombie flag for the point release.

@endothermicdev
Copy link
Collaborator Author

Closed for now in favor of #6069.

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