Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Double grandpa gossip duration for Kusama and test networks #5448

Merged
merged 4 commits into from
May 10, 2022
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
6 changes: 3 additions & 3 deletions node/network/approval-distribution/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -138,9 +138,9 @@ impl AggressionConfig {
impl Default for AggressionConfig {
fn default() -> Self {
AggressionConfig {
l1_threshold: Some(10),
l2_threshold: Some(25),
resend_unfinalized_period: Some(5),
l1_threshold: Some(13),
sandreim marked this conversation as resolved.
Show resolved Hide resolved
l2_threshold: Some(28),
resend_unfinalized_period: Some(8),
}
}
}
Expand Down
15 changes: 14 additions & 1 deletion node/service/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1175,9 +1175,22 @@ where
}
}

// Reduce grandpa load on Kusama and test networks. This will slow down finality by
// approximately one slot duration, but will reduce load. We would like to see the impact on
// Kusama, see: https://github.com/paritytech/polkadot/issues/5464
let gossip_duration = if chain_spec.is_versi() ||
chain_spec.is_wococo() ||
chain_spec.is_rococo() ||
chain_spec.is_kusama()
{
Duration::from_millis(2000)
} else {
Duration::from_millis(1000)
};

let config = grandpa::Config {
// FIXME substrate#1578 make this available through chainspec
gossip_duration: Duration::from_millis(1000),
gossip_duration,
justification_period: 512,
name: Some(name),
observer_enabled: false,
Expand Down