From 3fd800275abfd7ef0de214d6ac0ae3e980a41762 Mon Sep 17 00:00:00 2001 From: Bo QIU <35757521+boqiu@users.noreply.github.com> Date: Wed, 6 Nov 2024 18:25:08 +0800 Subject: [PATCH] Improve rate limit for UDP discovery (#261) --- node/network/src/config.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/node/network/src/config.rs b/node/network/src/config.rs index e7fbd21..d2eb392 100644 --- a/node/network/src/config.rs +++ b/node/network/src/config.rs @@ -157,8 +157,8 @@ impl Default for Config { let filter_rate_limiter = Some( discv5::RateLimiterBuilder::new() .total_n_every(300, Duration::from_secs(1)) // Allow bursts, average 300 per second - .ip_n_every(300, Duration::from_secs(1)) // Allow bursts, average 300 per second - .node_n_every(300, Duration::from_secs(1)) // Allow bursts, average 300 per second + .ip_n_every(9, Duration::from_secs(1)) // Allow bursts, average 9 per second + .node_n_every(8, Duration::from_secs(1)) // Allow bursts, average 8 per second .build() .expect("The total rate limit has been specified"), );