From a1b5a4be844fe2f7a6ad3b8bed5a148f273a41be Mon Sep 17 00:00:00 2001 From: SW van Heerden Date: Fri, 27 Oct 2023 16:09:34 +0200 Subject: [PATCH] reduce latency and timeouts --- base_layer/core/src/base_node/sync/config.rs | 8 ++++---- common/config/presets/c_base_node.toml | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/base_layer/core/src/base_node/sync/config.rs b/base_layer/core/src/base_node/sync/config.rs index 5e11deb94f..cb9afb1528 100644 --- a/base_layer/core/src/base_node/sync/config.rs +++ b/base_layer/core/src/base_node/sync/config.rs @@ -56,13 +56,13 @@ pub struct BlockchainSyncConfig { impl Default for BlockchainSyncConfig { fn default() -> Self { Self { - initial_max_sync_latency: Duration::from_secs(30), + initial_max_sync_latency: Duration::from_secs(15), max_latency_increase: Duration::from_secs(2), - ban_period: Duration::from_secs(30 * 60), - short_ban_period: Duration::from_secs(60), + ban_period: Duration::from_secs(60 * 60 * 2), // 2 hours + short_ban_period: Duration::from_secs(240), // 4 mins forced_sync_peers: Default::default(), validation_concurrency: 6, - rpc_deadline: Duration::from_secs(30), + rpc_deadline: Duration::from_secs(15), } } } diff --git a/common/config/presets/c_base_node.toml b/common/config/presets/c_base_node.toml index f7566a029d..d47e48d1a1 100644 --- a/common/config/presets/c_base_node.toml +++ b/common/config/presets/c_base_node.toml @@ -120,13 +120,13 @@ track_reorgs = true [base_node.state_machine] # The initial max sync latency. If a peer fails to stream a header/block within this deadline another sync peer will be # selected. If there are no further peers the sync will be restarted with an increased by `max_latency_increase`. -#blockchain_sync_config.initial_max_sync_latency = 30 +#blockchain_sync_config.initial_max_sync_latency = 15 # If all sync peers exceed latency increase allowed latency by this value #blockchain_sync_config.max_latency_increase =2 # Longer ban period for potentially malicious infractions (protocol violations etc.) -#blockchain_sync_config.ban_period = 1_800 # 30 * 60 +#blockchain_sync_config.ban_period = 7_200 # 2 * 60 * 60 # Short ban period for infractions that are likely not malicious (slow to respond spotty connections etc) -#blockchain_sync_config.short_ban_period = 60 +#blockchain_sync_config.short_ban_period = 240 # An allowlist of sync peers from which to sync. No other peers will be selected for sync. If empty sync peers # are chosen based on their advertised chain metadata. #blockchain_sync_config.forced_sync_peers = []