diff --git a/prdoc/pr_7014.prdoc b/prdoc/pr_7014.prdoc new file mode 100644 index 0000000000000000000000000000000000000000..e4e0214480a3ed420d402d21395f5e9eb50505f9 --- /dev/null +++ b/prdoc/pr_7014.prdoc @@ -0,0 +1,24 @@ +title: Remove `yamux_window_size` from network config +doc: +- audience: Node Dev + description: |- + # Description + + resolve #6468 + + + + # Checklist + + * [x] My PR includes a detailed description as outlined in the "Description" and its two subsections above. + * [ ] My PR follows the [labeling requirements]( + https://github.com/paritytech/polkadot-sdk/blob/master/docs/contributor/CONTRIBUTING.md#Process + ) of this project (at minimum one label for `T` required) + * External contributors: ask maintainers to put the right label on your PR. + * [ ] I have made corresponding changes to the documentation (if applicable) + * [ ] I have added tests that prove my fix is effective or that my feature works (if applicable) +crates: +- name: sc-cli + bump: major +- name: sc-network + bump: major diff --git a/substrate/client/cli/src/params/network_params.rs b/substrate/client/cli/src/params/network_params.rs index 748b84a50d2ae1cc60a8b5195e14e17615bc865a..c9be0b48d3443927a4267d53658994fc98f339db 100644 --- a/substrate/client/cli/src/params/network_params.rs +++ b/substrate/client/cli/src/params/network_params.rs @@ -275,7 +275,6 @@ impl NetworkParams { allow_non_globals_in_dht, kademlia_disjoint_query_paths: self.kademlia_disjoint_query_paths, kademlia_replication_factor: self.kademlia_replication_factor, - yamux_window_size: None, ipfs_server: self.ipfs_server, sync_mode: self.sync.into(), network_backend: self.network_backend.into(), diff --git a/substrate/client/network/src/config.rs b/substrate/client/network/src/config.rs index 327f79fe6c1306d3ca5f6912b480ea84ffcdb689..1a64f06e74c210f26994a90e54f28801f2a93295 100644 --- a/substrate/client/network/src/config.rs +++ b/substrate/client/network/src/config.rs @@ -650,27 +650,6 @@ pub struct NetworkConfiguration { /// Enable serving block data over IPFS bitswap. pub ipfs_server: bool, - /// Size of Yamux receive window of all substreams. `None` for the default (256kiB). - /// Any value less than 256kiB is invalid. - /// - /// # Context - /// - /// By design, notifications substreams on top of Yamux connections only allow up to `N` bytes - /// to be transferred at a time, where `N` is the Yamux receive window size configurable here. - /// This means, in practice, that every `N` bytes must be acknowledged by the receiver before - /// the sender can send more data. The maximum bandwidth of each notifications substream is - /// therefore `N / round_trip_time`. - /// - /// It is recommended to leave this to `None`, and use a request-response protocol instead if - /// a large amount of data must be transferred. The reason why the value is configurable is - /// that some Substrate users mis-use notification protocols to send large amounts of data. - /// As such, this option isn't designed to stay and will likely get removed in the future. - /// - /// Note that configuring a value here isn't a modification of the Yamux protocol, but rather - /// a modification of the way the implementation works. Different nodes with different - /// configured values remain compatible with each other. - pub yamux_window_size: Option<u32>, - /// Networking backend used for P2P communication. pub network_backend: NetworkBackendType, } @@ -703,7 +682,6 @@ impl NetworkConfiguration { kademlia_disjoint_query_paths: false, kademlia_replication_factor: NonZeroUsize::new(DEFAULT_KADEMLIA_REPLICATION_FACTOR) .expect("value is a constant; constant is non-zero; qed."), - yamux_window_size: None, ipfs_server: false, network_backend: NetworkBackendType::Libp2p, } diff --git a/substrate/client/network/src/litep2p/mod.rs b/substrate/client/network/src/litep2p/mod.rs index e8e132228ca8f82d1a32ff2508b5fe84efc242ca..4f105936ac5632d40a648a2fe11857dc3d110c48 100644 --- a/substrate/client/network/src/litep2p/mod.rs +++ b/substrate/client/network/src/litep2p/mod.rs @@ -321,10 +321,6 @@ impl Litep2pNetworkBackend { yamux_config.set_window_update_mode(litep2p::yamux::WindowUpdateMode::OnRead); yamux_config.set_max_buffer_size(yamux_maximum_buffer_size); - if let Some(yamux_window_size) = config.network_config.yamux_window_size { - yamux_config.set_receive_window(yamux_window_size); - } - yamux_config };