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 gossip flood from self-advertizement #6546

Merged

Conversation

rustyrussell
Copy link
Contributor

This is a fun one, but I got to implement Fischer-Yates shuffle!

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
…els.

dump_our_gossip() is mainly useful for propagating our gossip when we
are poorly connected, not when we have many peers.  @whitslack
reported excessive memory use queueing messages on a large node, so we
limit it beyond the first 5 peers, to 5 channels each.

This assumes we have ~ the same number of peers as channels, which
is probably reasonable.

In the long term, we should move this to connectd, which is properly
equipped to trickle out these messages.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Fixes: ElementsProject#6540
@rustyrussell rustyrussell added this to the v23.08 milestone Aug 11, 2023
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.

Looks good to me. I like that the full gamut is streamed to the first 5 peers. (I was getting ready to do some statistics before realizing this.)

ACK 232967d

@rustyrussell rustyrussell merged commit dbe8ac3 into ElementsProject:master Aug 11, 2023
39 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants