Skip to content

Commit 2783361

Browse files
committed
fix(p2p): increase rate limit from 100 to 10000 msg/window
The previous limit of 100 messages per second was too low for active validators running consensus, storage sync, and heartbeats. Bootstrap validator was getting rate limited, blocking all P2P traffic. Changes: - DEFAULT_RATE_LIMIT: 100 -> 10000 (100x increase) - RATE_LIMIT_WINDOW_MS: 1000 -> 10000 (1s -> 10s window) This allows ~1000 messages/sec sustained throughput.
1 parent 80a4ddc commit 2783361

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

crates/p2p-consensus/src/network.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -695,10 +695,10 @@ impl Default for PeerMapping {
695695
}
696696

697697
/// Default rate limit: maximum messages per second per signer
698-
const DEFAULT_RATE_LIMIT: u32 = 100;
698+
const DEFAULT_RATE_LIMIT: u32 = 10000;
699699

700700
/// Rate limit sliding window in milliseconds (1 second)
701-
const RATE_LIMIT_WINDOW_MS: i64 = 1000;
701+
const RATE_LIMIT_WINDOW_MS: i64 = 10000;
702702

703703
/// Nonce expiry time in milliseconds (5 minutes)
704704
const NONCE_EXPIRY_MS: i64 = 5 * 60 * 1000;

0 commit comments

Comments
 (0)