From 0ffd50e7c358f45fbf4866b0432958fac11b9944 Mon Sep 17 00:00:00 2001 From: Serban Iorga Date: Wed, 19 Apr 2023 15:36:16 +0300 Subject: [PATCH] Test deployments fixes (#2057) * Fix node_impl_version error ``` error: unexpected argument '--node-impl-version' found tip: to pass '--node-impl-version' as a value, use '-- --node-impl-version' Usage: rialto-bridge-node prepare-worker For more information, try '--help'. ``` * Fix rialto-parachain not producing blocks We must have at least 2 validators for each collator --- bridges/bin/rialto/node/src/cli.rs | 10 +++++++--- bridges/bin/rialto/node/src/command.rs | 10 ++++++++-- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/bridges/bin/rialto/node/src/cli.rs b/bridges/bin/rialto/node/src/cli.rs index 98323c9d9ca65..c39efed4ce986 100644 --- a/bridges/bin/rialto/node/src/cli.rs +++ b/bridges/bin/rialto/node/src/cli.rs @@ -68,15 +68,15 @@ pub enum Subcommand { Inspect(node_inspect::cli::InspectCmd), /// Benchmark runtime pallets. - #[clap(subcommand)] + #[command(subcommand)] Benchmark(frame_benchmarking_cli::BenchmarkCmd), /// FOR INTERNAL USE: analog of the "prepare-worker" command of the polkadot binary. - #[clap(name = "prepare-worker", hide = true)] + #[command(name = "prepare-worker", hide = true)] PvfPrepareWorker(ValidationWorkerCommand), /// FOR INTERNAL USE: analog of the "execute-worker" command of the polkadot binary. - #[clap(name = "execute-worker", hide = true)] + #[command(name = "execute-worker", hide = true)] PvfExecuteWorker(ValidationWorkerCommand), } @@ -84,5 +84,9 @@ pub enum Subcommand { #[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, } diff --git a/bridges/bin/rialto/node/src/command.rs b/bridges/bin/rialto/node/src/command.rs index 0bff2e523b498..a21b3a88d2c23 100644 --- a/bridges/bin/rialto/node/src/command.rs +++ b/bridges/bin/rialto/node/src/command.rs @@ -164,7 +164,10 @@ pub fn run() -> sc_cli::Result<()> { builder.with_colors(false); let _ = builder.init(); - polkadot_node_core_pvf::prepare_worker_entrypoint(&cmd.socket_path, None); + polkadot_node_core_pvf::prepare_worker_entrypoint( + &cmd.socket_path, + Some(&cmd.node_impl_version), + ); Ok(()) }, Some(crate::cli::Subcommand::PvfExecuteWorker(cmd)) => { @@ -172,7 +175,10 @@ pub fn run() -> sc_cli::Result<()> { builder.with_colors(false); let _ = builder.init(); - polkadot_node_core_pvf::execute_worker_entrypoint(&cmd.socket_path, None); + polkadot_node_core_pvf::execute_worker_entrypoint( + &cmd.socket_path, + Some(&cmd.node_impl_version), + ); Ok(()) }, None => {