Skip to main content

MAX_RATE_ENTRIES

Constant MAX_RATE_ENTRIES 

Source
pub const MAX_RATE_ENTRIES: usize = 131_072;
Expand description

Hard cap on distinct source addresses tracked for rate limiting (memory bound). Set to 2x MAX_REGISTRATIONS as generous headroom for legitimate distinct sources (registered peers plus in-flight lookups/relays from addresses that never register) while still bounding memory against a flood of packets from many distinct (or spoofed) source addresses.