From d2fc01755bd51faefddc4ecb72526d83ffb59020 Mon Sep 17 00:00:00 2001 From: Henry de Valence Date: Fri, 13 Nov 2020 10:52:39 -0800 Subject: [PATCH] zebrad: more reasonable concurrent block limit This helps prevent overloading the network with too many concurrent block requests. On a fast network, we're likely to still have enough room to saturate our bandwidth. In the worst case, with 2MB blocks, downloading 50 blocks concurrently is 100MB of queued downloads. If we need to download this in 20 seconds to avoid peer connection timeouts, the implied worst-case minimum speed is 5MB/s. In practice, this minimum speed will likely be much lower. --- zebrad/src/config.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zebrad/src/config.rs b/zebrad/src/config.rs index 0112edf6..dde94a13 100644 --- a/zebrad/src/config.rs +++ b/zebrad/src/config.rs @@ -157,7 +157,7 @@ pub struct SyncSection { impl Default for SyncSection { fn default() -> Self { Self { - max_concurrent_block_requests: 1_000, + max_concurrent_block_requests: 50, lookahead_limit: 2_000, } }