From d9b2eaf83b49b7a676d1acf79a6ac402a5c5b3c2 Mon Sep 17 00:00:00 2001 From: Sebastian Kunert Date: Tue, 29 Nov 2022 16:14:01 +0000 Subject: [PATCH] Remove more protocols from minimal collator --- Cargo.lock | 2 -- client/relay-chain-minimal-node/Cargo.toml | 2 -- .../relay-chain-minimal-node/src/network.rs | 19 +------------------ 3 files changed, 1 insertion(+), 22 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 8af14ec6cfa..0b9f7b8f476 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1999,8 +1999,6 @@ dependencies = [ "sc-keystore", "sc-network", "sc-network-common", - "sc-network-light", - "sc-network-sync", "sc-service", "sc-telemetry", "sc-tracing", diff --git a/client/relay-chain-minimal-node/Cargo.toml b/client/relay-chain-minimal-node/Cargo.toml index d6e71e3550d..95c2e96640b 100644 --- a/client/relay-chain-minimal-node/Cargo.toml +++ b/client/relay-chain-minimal-node/Cargo.toml @@ -19,9 +19,7 @@ sc-authority-discovery = { git = "https://github.com/paritytech/substrate", bran sc-client-api = { git = "https://github.com/paritytech/substrate", branch = "master" } sc-keystore = { git = "https://github.com/paritytech/substrate", branch = "master" } sc-network = { git = "https://github.com/paritytech/substrate", branch = "master" } -sc-network-sync = { git = "https://github.com/paritytech/substrate", branch = "master" } sc-network-common = { git = "https://github.com/paritytech/substrate", branch = "master" } -sc-network-light = { git = "https://github.com/paritytech/substrate", branch = "master" } sc-service = { git = "https://github.com/paritytech/substrate", branch = "master" } sc-transaction-pool-api = { git = "https://github.com/paritytech/substrate", branch = "master" } sc-transaction-pool = { git = "https://github.com/paritytech/substrate", branch = "master" } diff --git a/client/relay-chain-minimal-node/src/network.rs b/client/relay-chain-minimal-node/src/network.rs index a85fb8d7377..f15ec021528 100644 --- a/client/relay-chain-minimal-node/src/network.rs +++ b/client/relay-chain-minimal-node/src/network.rs @@ -32,8 +32,6 @@ use sc_network_common::{ Metrics, SyncStatus, }, }; -use sc_network_light::light_client_requests; -use sc_network_sync::{block_request_handler, state_request_handler}; use sc_service::{error::Error, Configuration, NetworkStarter, SpawnTaskHandle}; use sp_consensus::BlockOrigin; use sp_runtime::Justifications; @@ -60,16 +58,6 @@ pub(crate) fn build_collator_network( let BuildCollatorNetworkParams { config, client, spawn_handle, genesis_hash } = params; let protocol_id = config.protocol_id(); - - let block_request_protocol_config = - block_request_handler::generate_protocol_config(&protocol_id, genesis_hash, None); - - let state_request_protocol_config = - state_request_handler::generate_protocol_config(&protocol_id, genesis_hash, None); - - let light_client_request_protocol_config = - light_client_requests::generate_protocol_config(&protocol_id, genesis_hash, None); - let chain_sync = DummyChainSync; let block_announce_config = chain_sync.get_block_announce_proto_config::( protocol_id.clone(), @@ -97,12 +85,7 @@ pub(crate) fn build_collator_network( metrics_registry: config.prometheus_config.as_ref().map(|config| config.registry.clone()), block_announce_config, chain_sync_service: Box::new(DummyChainSyncService::(Default::default())), - request_response_protocol_configs: [ - block_request_protocol_config, - state_request_protocol_config, - light_client_request_protocol_config, - ] - .to_vec(), + request_response_protocol_configs: Vec::new(), }; let network_worker = sc_network::NetworkWorker::new(network_params)?;