Add explicit limits to notifications sizes and adjust yamux buffer size (#7925)

* Add explicit limits to notifications sizes and adjust yamux buffer size

* Docfix

* Tests

* Document these 10 bytes
This commit is contained in:
Pierre Krieger
2021-01-19 12:00:37 +01:00
committed by GitHub
parent bb46f8ac30
commit 8e04515912
12 changed files with 125 additions and 51 deletions
@@ -672,6 +672,8 @@ pub struct GrandpaParams<Block: BlockT, C, N, SC, VR> {
pub fn grandpa_peers_set_config() -> sc_network::config::NonDefaultSetConfig {
sc_network::config::NonDefaultSetConfig {
notifications_protocol: communication::GRANDPA_PROTOCOL_NAME.into(),
// Notifications reach ~256kiB in size at the time of writing on Kusama and Polkadot.
max_notification_size: 1024 * 1024,
set_config: sc_network::config::SetConfig {
in_peers: 25,
out_peers: 25,