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

Commits on Aug 11, 2023

  1. common: add tal_arr_randomize() to shuffle an array.

    Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
    rustyrussell committed Aug 11, 2023
    Configuration menu
    Copy the full SHA
    463f8a5 View commit details
    Browse the repository at this point in the history
  2. gossipd: reduce gossip self-advertizement if we have many peers/chann…

    …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 committed Aug 11, 2023
    Configuration menu
    Copy the full SHA
    232967d View commit details
    Browse the repository at this point in the history