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

Remove hack around Yamux window size #2692

Merged
2 commits merged into from
Apr 9, 2021
Merged
Changes from 1 commit
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
15 changes: 0 additions & 15 deletions node/service/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -733,21 +733,6 @@ pub fn new_full<RuntimeApi, Executor>(
},
});

// 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);

config.network.request_response_protocols.push(sc_finality_grandpa_warp_sync::request_response_config_for_chain(
&config, task_manager.spawn_handle(), backend.clone(), import_setup.1.shared_authority_set().clone(),
));
Expand Down