zebra_network::constants

Constant GET_ADDR_FANOUT

source
pub const GET_ADDR_FANOUT: usize = 1;
Expand description

The number of GetAddr requests sent when crawling for new peers.

ยงSecurity

The fanout should be greater than 2, so that Zebra avoids getting a majority of its initial address book entries from a single peer.

Zebra regularly crawls for new peers, initiating a new crawl every crawl_new_peer_interval.

TODO: Restore the fanout to 3, once fanouts are limited to the number of ready peers (#2214)

In #3110, we changed the fanout to 1, to make sure we actually use cached address responses. With a fanout of 3, we were dropping a lot of responses, because the overall crawl timed out.