From 762f57385862056d56b912321e28f971351fb7ef Mon Sep 17 00:00:00 2001 From: Marcin S Date: Tue, 1 Aug 2023 09:53:01 +0200 Subject: [PATCH] PVF: Fix external workers being required for non-collator full nodes (#7566) * PVF: Fix external workers being required for non-collator full nodes * Fix * Make check more precise > This might as well be if role.is_authority() as there aren't really any nodes > that are both authorities and collators. But if there were a node that is an > authority and a collator, it'd probably want to validate candidates (in its > role as an authority). * Just seeing if this fixes zombienet CI... --- cli/src/cli.rs | 11 ----------- node/service/src/lib.rs | 6 +++--- 2 files changed, 3 insertions(+), 14 deletions(-) diff --git a/cli/src/cli.rs b/cli/src/cli.rs index 00ec54f8d969..b7d884750762 100644 --- a/cli/src/cli.rs +++ b/cli/src/cli.rs @@ -71,17 +71,6 @@ pub enum Subcommand { ChainInfo(sc_cli::ChainInfoCmd), } -#[allow(missing_docs)] -#[derive(Debug, Parser)] -pub struct ValidationWorkerCommand { - /// The path to the validation host's socket. - #[arg(long)] - pub socket_path: String, - /// Calling node implementation version - #[arg(long)] - pub node_impl_version: String, -} - #[allow(missing_docs)] #[derive(Debug, Parser)] #[group(skip)] diff --git a/node/service/src/lib.rs b/node/service/src/lib.rs index efdd01d27321..457b5488ea14 100644 --- a/node/service/src/lib.rs +++ b/node/service/src/lib.rs @@ -909,9 +909,7 @@ pub fn new_full( slot_duration_millis: slot_duration.as_millis() as u64, }; - let candidate_validation_config = if is_collator.is_collator() { - None - } else { + let candidate_validation_config = if role.is_authority() && !is_collator.is_collator() { let (prep_worker_path, exec_worker_path) = workers::determine_workers_paths(workers_path, workers_names, node_version.clone())?; log::info!("🚀 Using prepare-worker binary at: {:?}", prep_worker_path); @@ -927,6 +925,8 @@ pub fn new_full( prep_worker_path, exec_worker_path, }) + } else { + None }; let chain_selection_config = ChainSelectionConfig {