Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: reduce timeouts and increase bans #5882

Merged
merged 1 commit into from
Oct 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions base_layer/core/src/base_node/sync/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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),
}
}
}
6 changes: 3 additions & 3 deletions common/config/presets/c_base_node.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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 = []
Expand Down
Loading