From de61829890ba4790e977c99cb7d9ccb37adb1432 Mon Sep 17 00:00:00 2001 From: zjb0807 Date: Tue, 24 Jan 2023 06:33:44 +0800 Subject: [PATCH 1/2] Fix try-runtime with create-snapshot --- .../cli/src/commands/create_snapshot.rs | 17 +++++++++-------- .../cli/src/commands/execute_block.rs | 13 +++++++------ .../cli/src/commands/follow_chain.rs | 13 +++++++------ .../cli/src/commands/offchain_worker.rs | 9 +++++---- .../cli/src/commands/on_runtime_upgrade.rs | 11 +++++++---- utils/frame/try-runtime/cli/src/lib.rs | 16 +++++++++++++--- 6 files changed, 48 insertions(+), 31 deletions(-) diff --git a/utils/frame/try-runtime/cli/src/commands/create_snapshot.rs b/utils/frame/try-runtime/cli/src/commands/create_snapshot.rs index ef39c3d9846ce..54df3c45b8a44 100644 --- a/utils/frame/try-runtime/cli/src/commands/create_snapshot.rs +++ b/utils/frame/try-runtime/cli/src/commands/create_snapshot.rs @@ -15,7 +15,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -use crate::{build_executor, LiveState, SharedParams, State, LOG_TARGET}; +use crate::{build_executor, Command, LiveState, SharedParams, State, LOG_TARGET}; use sc_executor::sp_wasm_interface::HostFunctions; use sp_runtime::traits::{Block as BlockT, NumberFor}; use std::{fmt::Debug, str::FromStr}; @@ -34,10 +34,11 @@ pub struct CreateSnapshotCmd { pub snapshot_path: Option, } -/// inner command for `Command::CreateSnapshot`. +/// inner cmd for `Command::CreateSnapshot`. pub(crate) async fn create_snapshot( shared: SharedParams, - command: CreateSnapshotCmd, + command: Command, + cmd: CreateSnapshotCmd, ) -> sc_cli::Result<()> where Block: BlockT + serde::de::DeserializeOwned, @@ -48,7 +49,7 @@ where as FromStr>::Err: Debug, HostFns: HostFunctions, { - let snapshot_path = command.snapshot_path; + let snapshot_path = cmd.snapshot_path; if !matches!(shared.runtime, crate::Runtime::Existing) { return Err("creating a snapshot is only possible with --runtime existing.".into()) } @@ -56,13 +57,13 @@ where let path = match snapshot_path { Some(path) => path, None => { - let rpc = ws_client(&command.from.uri).await.unwrap(); + let rpc = ws_client(&cmd.from.uri).await.unwrap(); let remote_spec = StateApi::::runtime_version(&rpc, None).await.unwrap(); let path_str = format!( "{}-{}@{}.snap", remote_spec.spec_name.to_lowercase(), remote_spec.spec_version, - command.from.at.clone().unwrap_or("latest".to_owned()) + cmd.from.at.clone().unwrap_or("latest".to_owned()) ); log::info!(target: LOG_TARGET, "snapshot path not provided (-s), using '{}'", path_str); path_str.into() @@ -70,8 +71,8 @@ where }; let executor = build_executor::(&shared); - let _ = State::Live(command.from) - .into_ext::(&shared, &executor, Some(path.into())) + let _ = State::Live(cmd.from) + .into_ext::(&shared, &command, &executor, Some(path.into())) .await?; Ok(()) diff --git a/utils/frame/try-runtime/cli/src/commands/execute_block.rs b/utils/frame/try-runtime/cli/src/commands/execute_block.rs index ee5e21af5d3ba..20f87bfdaf64f 100644 --- a/utils/frame/try-runtime/cli/src/commands/execute_block.rs +++ b/utils/frame/try-runtime/cli/src/commands/execute_block.rs @@ -16,8 +16,8 @@ // limitations under the License. use crate::{ - build_executor, full_extensions, rpc_err_handler, state_machine_call_with_proof, LiveState, - SharedParams, State, LOG_TARGET, + build_executor, full_extensions, rpc_err_handler, state_machine_call_with_proof, Command, + LiveState, SharedParams, State, LOG_TARGET, }; use parity_scale_codec::Encode; use sc_executor::sp_wasm_interface::HostFunctions; @@ -87,7 +87,8 @@ impl ExecuteBlockCmd { pub(crate) async fn execute_block( shared: SharedParams, - command: ExecuteBlockCmd, + command: Command, + cmd: ExecuteBlockCmd, ) -> sc_cli::Result<()> where Block: BlockT + serde::de::DeserializeOwned, @@ -99,10 +100,10 @@ where HostFns: HostFunctions, { let executor = build_executor::(&shared); - let ext = command.state.into_ext::(&shared, &executor, None).await?; + let ext = cmd.state.into_ext::(&shared, &command, &executor, None).await?; // get the block number associated with this block. - let block_ws_uri = command.block_ws_uri::(); + let block_ws_uri = cmd.block_ws_uri::(); let rpc = ws_client(&block_ws_uri).await?; let next_hash = next_hash_of::(&rpc, ext.block_hash).await?; @@ -126,7 +127,7 @@ where // for now, hardcoded for the sake of simplicity. We might customize them one day. let state_root_check = false; let signature_check = false; - let payload = (block.clone(), state_root_check, signature_check, command.try_state).encode(); + let payload = (block.clone(), state_root_check, signature_check, cmd.try_state).encode(); let _ = state_machine_call_with_proof::( &ext, diff --git a/utils/frame/try-runtime/cli/src/commands/follow_chain.rs b/utils/frame/try-runtime/cli/src/commands/follow_chain.rs index e4f166fe7ada7..962d59a8c2cb8 100644 --- a/utils/frame/try-runtime/cli/src/commands/follow_chain.rs +++ b/utils/frame/try-runtime/cli/src/commands/follow_chain.rs @@ -17,7 +17,7 @@ use crate::{ build_executor, full_extensions, parse, rpc_err_handler, state_machine_call_with_proof, - LiveState, SharedParams, State, LOG_TARGET, + Command, LiveState, SharedParams, State, LOG_TARGET, }; use parity_scale_codec::{Decode, Encode}; use sc_executor::sp_wasm_interface::HostFunctions; @@ -80,7 +80,8 @@ async fn start_subscribing( shared: SharedParams, - command: FollowChainCmd, + command: Command, + cmd: FollowChainCmd, ) -> sc_cli::Result<()> where Block: BlockT + DeserializeOwned, @@ -91,7 +92,7 @@ where as FromStr>::Err: Debug, HostFns: HostFunctions, { - let (rpc, subscription) = start_subscribing::(&command.uri).await?; + let (rpc, subscription) = start_subscribing::(&cmd.uri).await?; let mut finalized_headers: FinalizedHeaders = FinalizedHeaders::new(&rpc, subscription); @@ -130,14 +131,14 @@ where // create an ext at the state of this block, whatever is the first subscription event. if maybe_state_ext.is_none() { let state = State::Live(LiveState { - uri: command.uri.clone(), + uri: cmd.uri.clone(), // a bit dodgy, we have to un-parse the has to a string again and re-parse it // inside. at: Some(hex::encode(header.parent_hash().encode())), pallet: vec![], child_tree: true, }); - let ext = state.into_ext::(&shared, &executor, None).await?; + let ext = state.into_ext::(&shared, &command, &executor, None).await?; maybe_state_ext = Some(ext); } @@ -148,7 +149,7 @@ where state_ext, &executor, "TryRuntime_execute_block", - (block, command.state_root_check, command.try_state.clone()).encode().as_ref(), + (block, cmd.state_root_check, cmd.try_state.clone()).encode().as_ref(), full_extensions(), shared .export_proof diff --git a/utils/frame/try-runtime/cli/src/commands/offchain_worker.rs b/utils/frame/try-runtime/cli/src/commands/offchain_worker.rs index c55de7da64817..4a153e0de085f 100644 --- a/utils/frame/try-runtime/cli/src/commands/offchain_worker.rs +++ b/utils/frame/try-runtime/cli/src/commands/offchain_worker.rs @@ -17,7 +17,7 @@ use crate::{ build_executor, commands::execute_block::next_hash_of, full_extensions, parse, rpc_err_handler, - state_machine_call, LiveState, SharedParams, State, LOG_TARGET, + state_machine_call, Command, LiveState, SharedParams, State, LOG_TARGET, }; use parity_scale_codec::Encode; use sc_executor::sp_wasm_interface::HostFunctions; @@ -65,7 +65,8 @@ impl OffchainWorkerCmd { pub(crate) async fn offchain_worker( shared: SharedParams, - command: OffchainWorkerCmd, + command: Command, + cmd: OffchainWorkerCmd, ) -> sc_cli::Result<()> where Block: BlockT + serde::de::DeserializeOwned, @@ -78,9 +79,9 @@ where { let executor = build_executor(&shared); // we first build the externalities with the remote code. - let ext = command.state.into_ext::(&shared, &executor, None).await?; + let ext = cmd.state.into_ext::(&shared, &command, &executor, None).await?; - let header_ws_uri = command.header_ws_uri::(); + let header_ws_uri = cmd.header_ws_uri::(); let rpc = ws_client(&header_ws_uri).await?; let next_hash = next_hash_of::(&rpc, ext.block_hash).await?; diff --git a/utils/frame/try-runtime/cli/src/commands/on_runtime_upgrade.rs b/utils/frame/try-runtime/cli/src/commands/on_runtime_upgrade.rs index 81f81d6a551b9..f7e7ca2f78513 100644 --- a/utils/frame/try-runtime/cli/src/commands/on_runtime_upgrade.rs +++ b/utils/frame/try-runtime/cli/src/commands/on_runtime_upgrade.rs @@ -15,7 +15,9 @@ // See the License for the specific language governing permissions and // limitations under the License. -use crate::{build_executor, state_machine_call_with_proof, SharedParams, State, LOG_TARGET}; +use crate::{ + build_executor, state_machine_call_with_proof, Command, SharedParams, State, LOG_TARGET, +}; use frame_try_runtime::UpgradeCheckSelect; use parity_scale_codec::{Decode, Encode}; use sc_executor::sp_wasm_interface::HostFunctions; @@ -50,7 +52,8 @@ pub struct OnRuntimeUpgradeCmd { pub(crate) async fn on_runtime_upgrade( shared: SharedParams, - command: OnRuntimeUpgradeCmd, + command: Command, + cmd: OnRuntimeUpgradeCmd, ) -> sc_cli::Result<()> where Block: BlockT + serde::de::DeserializeOwned, @@ -62,13 +65,13 @@ where HostFns: HostFunctions, { let executor = build_executor(&shared); - let ext = command.state.into_ext::(&shared, &executor, None).await?; + let ext = cmd.state.into_ext::(&shared, &command, &executor, None).await?; let (_, encoded_result) = state_machine_call_with_proof::( &ext, &executor, "TryRuntime_on_runtime_upgrade", - command.checks.encode().as_ref(), + cmd.checks.encode().as_ref(), Default::default(), // we don't really need any extensions here. shared.export_proof, )?; diff --git a/utils/frame/try-runtime/cli/src/lib.rs b/utils/frame/try-runtime/cli/src/lib.rs index aac2ad4238431..56bee369c1b69 100644 --- a/utils/frame/try-runtime/cli/src/lib.rs +++ b/utils/frame/try-runtime/cli/src/lib.rs @@ -607,6 +607,7 @@ impl State { pub(crate) async fn into_ext( &self, shared: &SharedParams, + command: &Command, executor: &WasmExecutor, state_snapshot: Option, ) -> sc_cli::Result> @@ -706,9 +707,13 @@ impl State { } } - // whatever runtime we have in store now must have been compiled with try-runtime feature. - if !ensure_try_runtime::(&executor, &mut ext) { - return Err("given runtime is NOT compiled with try-runtime feature!".into()) + // ignore the `create-snapshot` command + if !matches!(command, Command::CreateSnapshot(_)) { + // whatever runtime we have in store now must have been compiled with try-runtime + // feature. + if !ensure_try_runtime::(&executor, &mut ext) { + return Err("given runtime is NOT compiled with try-runtime feature!".into()) + } } Ok(ext) @@ -731,30 +736,35 @@ impl TryRuntimeCmd { Command::OnRuntimeUpgrade(ref cmd) => commands::on_runtime_upgrade::on_runtime_upgrade::( self.shared.clone(), + self.command.clone(), cmd.clone(), ) .await, Command::OffchainWorker(cmd) => commands::offchain_worker::offchain_worker::( self.shared.clone(), + self.command.clone(), cmd.clone(), ) .await, Command::ExecuteBlock(cmd) => commands::execute_block::execute_block::( self.shared.clone(), + self.command.clone(), cmd.clone(), ) .await, Command::FollowChain(cmd) => commands::follow_chain::follow_chain::( self.shared.clone(), + self.command.clone(), cmd.clone(), ) .await, Command::CreateSnapshot(cmd) => commands::create_snapshot::create_snapshot::( self.shared.clone(), + self.command.clone(), cmd.clone(), ) .await, From 2daf1682da3c29fb59a63a5460f12cb85023ea0f Mon Sep 17 00:00:00 2001 From: zjb0807 Date: Tue, 24 Jan 2023 22:11:02 +0800 Subject: [PATCH 2/2] Apply review suggestions --- .../cli/src/commands/create_snapshot.rs | 17 ++++++++--------- .../cli/src/commands/execute_block.rs | 13 ++++++------- .../cli/src/commands/follow_chain.rs | 13 ++++++------- .../cli/src/commands/offchain_worker.rs | 9 ++++----- .../cli/src/commands/on_runtime_upgrade.rs | 11 ++++------- utils/frame/try-runtime/cli/src/lib.rs | 13 +++---------- 6 files changed, 31 insertions(+), 45 deletions(-) diff --git a/utils/frame/try-runtime/cli/src/commands/create_snapshot.rs b/utils/frame/try-runtime/cli/src/commands/create_snapshot.rs index 54df3c45b8a44..8d6144f84c1e8 100644 --- a/utils/frame/try-runtime/cli/src/commands/create_snapshot.rs +++ b/utils/frame/try-runtime/cli/src/commands/create_snapshot.rs @@ -15,7 +15,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -use crate::{build_executor, Command, LiveState, SharedParams, State, LOG_TARGET}; +use crate::{build_executor, LiveState, SharedParams, State, LOG_TARGET}; use sc_executor::sp_wasm_interface::HostFunctions; use sp_runtime::traits::{Block as BlockT, NumberFor}; use std::{fmt::Debug, str::FromStr}; @@ -34,11 +34,10 @@ pub struct CreateSnapshotCmd { pub snapshot_path: Option, } -/// inner cmd for `Command::CreateSnapshot`. +/// inner command for `Command::CreateSnapshot`. pub(crate) async fn create_snapshot( shared: SharedParams, - command: Command, - cmd: CreateSnapshotCmd, + command: CreateSnapshotCmd, ) -> sc_cli::Result<()> where Block: BlockT + serde::de::DeserializeOwned, @@ -49,7 +48,7 @@ where as FromStr>::Err: Debug, HostFns: HostFunctions, { - let snapshot_path = cmd.snapshot_path; + let snapshot_path = command.snapshot_path; if !matches!(shared.runtime, crate::Runtime::Existing) { return Err("creating a snapshot is only possible with --runtime existing.".into()) } @@ -57,13 +56,13 @@ where let path = match snapshot_path { Some(path) => path, None => { - let rpc = ws_client(&cmd.from.uri).await.unwrap(); + let rpc = ws_client(&command.from.uri).await.unwrap(); let remote_spec = StateApi::::runtime_version(&rpc, None).await.unwrap(); let path_str = format!( "{}-{}@{}.snap", remote_spec.spec_name.to_lowercase(), remote_spec.spec_version, - cmd.from.at.clone().unwrap_or("latest".to_owned()) + command.from.at.clone().unwrap_or("latest".to_owned()) ); log::info!(target: LOG_TARGET, "snapshot path not provided (-s), using '{}'", path_str); path_str.into() @@ -71,8 +70,8 @@ where }; let executor = build_executor::(&shared); - let _ = State::Live(cmd.from) - .into_ext::(&shared, &command, &executor, Some(path.into())) + let _ = State::Live(command.from) + .into_ext::(&shared, &executor, Some(path.into()), false) .await?; Ok(()) diff --git a/utils/frame/try-runtime/cli/src/commands/execute_block.rs b/utils/frame/try-runtime/cli/src/commands/execute_block.rs index 20f87bfdaf64f..e054c8ab87932 100644 --- a/utils/frame/try-runtime/cli/src/commands/execute_block.rs +++ b/utils/frame/try-runtime/cli/src/commands/execute_block.rs @@ -16,8 +16,8 @@ // limitations under the License. use crate::{ - build_executor, full_extensions, rpc_err_handler, state_machine_call_with_proof, Command, - LiveState, SharedParams, State, LOG_TARGET, + build_executor, full_extensions, rpc_err_handler, state_machine_call_with_proof, LiveState, + SharedParams, State, LOG_TARGET, }; use parity_scale_codec::Encode; use sc_executor::sp_wasm_interface::HostFunctions; @@ -87,8 +87,7 @@ impl ExecuteBlockCmd { pub(crate) async fn execute_block( shared: SharedParams, - command: Command, - cmd: ExecuteBlockCmd, + command: ExecuteBlockCmd, ) -> sc_cli::Result<()> where Block: BlockT + serde::de::DeserializeOwned, @@ -100,10 +99,10 @@ where HostFns: HostFunctions, { let executor = build_executor::(&shared); - let ext = cmd.state.into_ext::(&shared, &command, &executor, None).await?; + let ext = command.state.into_ext::(&shared, &executor, None, true).await?; // get the block number associated with this block. - let block_ws_uri = cmd.block_ws_uri::(); + let block_ws_uri = command.block_ws_uri::(); let rpc = ws_client(&block_ws_uri).await?; let next_hash = next_hash_of::(&rpc, ext.block_hash).await?; @@ -127,7 +126,7 @@ where // for now, hardcoded for the sake of simplicity. We might customize them one day. let state_root_check = false; let signature_check = false; - let payload = (block.clone(), state_root_check, signature_check, cmd.try_state).encode(); + let payload = (block.clone(), state_root_check, signature_check, command.try_state).encode(); let _ = state_machine_call_with_proof::( &ext, diff --git a/utils/frame/try-runtime/cli/src/commands/follow_chain.rs b/utils/frame/try-runtime/cli/src/commands/follow_chain.rs index 962d59a8c2cb8..d887757b1646e 100644 --- a/utils/frame/try-runtime/cli/src/commands/follow_chain.rs +++ b/utils/frame/try-runtime/cli/src/commands/follow_chain.rs @@ -17,7 +17,7 @@ use crate::{ build_executor, full_extensions, parse, rpc_err_handler, state_machine_call_with_proof, - Command, LiveState, SharedParams, State, LOG_TARGET, + LiveState, SharedParams, State, LOG_TARGET, }; use parity_scale_codec::{Decode, Encode}; use sc_executor::sp_wasm_interface::HostFunctions; @@ -80,8 +80,7 @@ async fn start_subscribing( shared: SharedParams, - command: Command, - cmd: FollowChainCmd, + command: FollowChainCmd, ) -> sc_cli::Result<()> where Block: BlockT + DeserializeOwned, @@ -92,7 +91,7 @@ where as FromStr>::Err: Debug, HostFns: HostFunctions, { - let (rpc, subscription) = start_subscribing::(&cmd.uri).await?; + let (rpc, subscription) = start_subscribing::(&command.uri).await?; let mut finalized_headers: FinalizedHeaders = FinalizedHeaders::new(&rpc, subscription); @@ -131,14 +130,14 @@ where // create an ext at the state of this block, whatever is the first subscription event. if maybe_state_ext.is_none() { let state = State::Live(LiveState { - uri: cmd.uri.clone(), + uri: command.uri.clone(), // a bit dodgy, we have to un-parse the has to a string again and re-parse it // inside. at: Some(hex::encode(header.parent_hash().encode())), pallet: vec![], child_tree: true, }); - let ext = state.into_ext::(&shared, &command, &executor, None).await?; + let ext = state.into_ext::(&shared, &executor, None, true).await?; maybe_state_ext = Some(ext); } @@ -149,7 +148,7 @@ where state_ext, &executor, "TryRuntime_execute_block", - (block, cmd.state_root_check, cmd.try_state.clone()).encode().as_ref(), + (block, command.state_root_check, command.try_state.clone()).encode().as_ref(), full_extensions(), shared .export_proof diff --git a/utils/frame/try-runtime/cli/src/commands/offchain_worker.rs b/utils/frame/try-runtime/cli/src/commands/offchain_worker.rs index 4a153e0de085f..985b04bfb1cac 100644 --- a/utils/frame/try-runtime/cli/src/commands/offchain_worker.rs +++ b/utils/frame/try-runtime/cli/src/commands/offchain_worker.rs @@ -17,7 +17,7 @@ use crate::{ build_executor, commands::execute_block::next_hash_of, full_extensions, parse, rpc_err_handler, - state_machine_call, Command, LiveState, SharedParams, State, LOG_TARGET, + state_machine_call, LiveState, SharedParams, State, LOG_TARGET, }; use parity_scale_codec::Encode; use sc_executor::sp_wasm_interface::HostFunctions; @@ -65,8 +65,7 @@ impl OffchainWorkerCmd { pub(crate) async fn offchain_worker( shared: SharedParams, - command: Command, - cmd: OffchainWorkerCmd, + command: OffchainWorkerCmd, ) -> sc_cli::Result<()> where Block: BlockT + serde::de::DeserializeOwned, @@ -79,9 +78,9 @@ where { let executor = build_executor(&shared); // we first build the externalities with the remote code. - let ext = cmd.state.into_ext::(&shared, &command, &executor, None).await?; + let ext = command.state.into_ext::(&shared, &executor, None, true).await?; - let header_ws_uri = cmd.header_ws_uri::(); + let header_ws_uri = command.header_ws_uri::(); let rpc = ws_client(&header_ws_uri).await?; let next_hash = next_hash_of::(&rpc, ext.block_hash).await?; diff --git a/utils/frame/try-runtime/cli/src/commands/on_runtime_upgrade.rs b/utils/frame/try-runtime/cli/src/commands/on_runtime_upgrade.rs index f7e7ca2f78513..61b5847ed8ffc 100644 --- a/utils/frame/try-runtime/cli/src/commands/on_runtime_upgrade.rs +++ b/utils/frame/try-runtime/cli/src/commands/on_runtime_upgrade.rs @@ -15,9 +15,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -use crate::{ - build_executor, state_machine_call_with_proof, Command, SharedParams, State, LOG_TARGET, -}; +use crate::{build_executor, state_machine_call_with_proof, SharedParams, State, LOG_TARGET}; use frame_try_runtime::UpgradeCheckSelect; use parity_scale_codec::{Decode, Encode}; use sc_executor::sp_wasm_interface::HostFunctions; @@ -52,8 +50,7 @@ pub struct OnRuntimeUpgradeCmd { pub(crate) async fn on_runtime_upgrade( shared: SharedParams, - command: Command, - cmd: OnRuntimeUpgradeCmd, + command: OnRuntimeUpgradeCmd, ) -> sc_cli::Result<()> where Block: BlockT + serde::de::DeserializeOwned, @@ -65,13 +62,13 @@ where HostFns: HostFunctions, { let executor = build_executor(&shared); - let ext = cmd.state.into_ext::(&shared, &command, &executor, None).await?; + let ext = command.state.into_ext::(&shared, &executor, None, true).await?; let (_, encoded_result) = state_machine_call_with_proof::( &ext, &executor, "TryRuntime_on_runtime_upgrade", - cmd.checks.encode().as_ref(), + command.checks.encode().as_ref(), Default::default(), // we don't really need any extensions here. shared.export_proof, )?; diff --git a/utils/frame/try-runtime/cli/src/lib.rs b/utils/frame/try-runtime/cli/src/lib.rs index 56bee369c1b69..dea20febb9c58 100644 --- a/utils/frame/try-runtime/cli/src/lib.rs +++ b/utils/frame/try-runtime/cli/src/lib.rs @@ -607,9 +607,9 @@ impl State { pub(crate) async fn into_ext( &self, shared: &SharedParams, - command: &Command, executor: &WasmExecutor, state_snapshot: Option, + try_runtime_check: bool, ) -> sc_cli::Result> where Block::Hash: FromStr, @@ -707,10 +707,8 @@ impl State { } } - // ignore the `create-snapshot` command - if !matches!(command, Command::CreateSnapshot(_)) { - // whatever runtime we have in store now must have been compiled with try-runtime - // feature. + // whatever runtime we have in store now must have been compiled with try-runtime feature. + if try_runtime_check { if !ensure_try_runtime::(&executor, &mut ext) { return Err("given runtime is NOT compiled with try-runtime feature!".into()) } @@ -736,35 +734,30 @@ impl TryRuntimeCmd { Command::OnRuntimeUpgrade(ref cmd) => commands::on_runtime_upgrade::on_runtime_upgrade::( self.shared.clone(), - self.command.clone(), cmd.clone(), ) .await, Command::OffchainWorker(cmd) => commands::offchain_worker::offchain_worker::( self.shared.clone(), - self.command.clone(), cmd.clone(), ) .await, Command::ExecuteBlock(cmd) => commands::execute_block::execute_block::( self.shared.clone(), - self.command.clone(), cmd.clone(), ) .await, Command::FollowChain(cmd) => commands::follow_chain::follow_chain::( self.shared.clone(), - self.command.clone(), cmd.clone(), ) .await, Command::CreateSnapshot(cmd) => commands::create_snapshot::create_snapshot::( self.shared.clone(), - self.command.clone(), cmd.clone(), ) .await,