Make large collations downloads work (#2284)

* Make large collations downloads work

* Actually, bump it more to be sure

* Grmlblbl Rust feature unstable nianiania
This commit is contained in:
Pierre Krieger
2021-01-18 14:00:03 +01:00
committed by GitHub
parent 669ccab83f
commit 1c548d9d0b
2 changed files with 153 additions and 138 deletions
+138 -138
View File
File diff suppressed because it is too large Load Diff
+15
View File
@@ -572,6 +572,21 @@ pub fn new_full<RuntimeApi, Executor>(
#[cfg(feature = "real-overseer")]
config.network.extra_sets.extend(polkadot_network_bridge::peer_sets_info());
// TODO: At the moment, the collator protocol uses notifications protocols to download
// collations. Because of DoS-protection measures, notifications protocols have a very limited
// bandwidth capacity, resulting in the collation download taking a long time.
// The lines of code below considerably relaxes this DoS protection in order to circumvent
// this problem. This configuraiton change should preferably not reach any live network, and
// should be removed once the collation protocol is finished.
// Tracking issue: https://github.com/paritytech/polkadot/issues/2283
#[cfg(feature = "real-overseer")]
fn adjust_yamux(cfg: &mut sc_network::config::NetworkConfiguration) {
cfg.yamux_window_size = Some(5 * 1024 * 1024);
}
#[cfg(not(feature = "real-overseer"))]
fn adjust_yamux(_: &mut sc_network::config::NetworkConfiguration) {}
adjust_yamux(&mut config.network);
let (network, network_status_sinks, system_rpc_tx, network_starter) =
service::build_network(service::BuildNetworkParams {
config: &config,