git.delta.rocks / unique-network / refs/commits / c35f6c8d35c5

difftreelog

feat try-runtime subcommand

Yaroslav Bolyukin2022-04-07parent: #8da8a84.patch.diff
in: master

7 files changed

modifiednode/cli/Cargo.tomldiffbeforeafterboth
before · node/cli/Cargo.toml
1################################################################################2# Build Dependencies34[build-dependencies.substrate-build-script-utils]5git = "https://github.com/paritytech/substrate"6branch = "polkadot-v0.9.20"78################################################################################9# Substrate Dependecies1011[dependencies.codec]12default-features = false13features = ['derive']14package = 'parity-scale-codec'15version = '3.1.2'1617[dependencies.frame-benchmarking]18git = "https://github.com/paritytech/substrate"19branch = "polkadot-v0.9.20"2021[dependencies.frame-benchmarking-cli]22git = "https://github.com/paritytech/substrate"23branch = "polkadot-v0.9.20"2425[dependencies.pallet-transaction-payment-rpc]26git = "https://github.com/paritytech/substrate"27branch = "polkadot-v0.9.20"2829[dependencies.substrate-prometheus-endpoint]30git = "https://github.com/paritytech/substrate"31branch = "polkadot-v0.9.20"3233[dependencies.sc-basic-authorship]34git = "https://github.com/paritytech/substrate"35branch = "polkadot-v0.9.20"3637[dependencies.sc-chain-spec]38git = "https://github.com/paritytech/substrate"39branch = "polkadot-v0.9.20"4041[dependencies.sc-cli]42features = ['wasmtime']43git = "https://github.com/paritytech/substrate"44branch = "polkadot-v0.9.20"4546[dependencies.sc-client-api]47git = "https://github.com/paritytech/substrate"48branch = "polkadot-v0.9.20"4950[dependencies.sc-consensus]51git = "https://github.com/paritytech/substrate"52branch = "polkadot-v0.9.20"5354[dependencies.sc-consensus-aura]55git = "https://github.com/paritytech/substrate"56branch = "polkadot-v0.9.20"5758[dependencies.sc-executor]59features = ['wasmtime']60git = "https://github.com/paritytech/substrate"61branch = "polkadot-v0.9.20"6263[dependencies.sc-finality-grandpa]64git = "https://github.com/paritytech/substrate"65branch = "polkadot-v0.9.20"6667[dependencies.sc-keystore]68git = "https://github.com/paritytech/substrate"69branch = "polkadot-v0.9.20"7071[dependencies.sc-rpc]72git = "https://github.com/paritytech/substrate"73branch = "polkadot-v0.9.20"7475[dependencies.sc-rpc-api]76git = "https://github.com/paritytech/substrate"77branch = "polkadot-v0.9.20"7879[dependencies.sc-service]80features = ['wasmtime']81git = "https://github.com/paritytech/substrate"82branch = "polkadot-v0.9.20"8384[dependencies.sc-telemetry]85git = "https://github.com/paritytech/substrate"86branch = "polkadot-v0.9.20"8788[dependencies.sc-transaction-pool]89git = "https://github.com/paritytech/substrate"90branch = "polkadot-v0.9.20"9192[dependencies.sc-tracing]93git = "https://github.com/paritytech/substrate"94branch = "polkadot-v0.9.20"9596[dependencies.sp-block-builder]97git = "https://github.com/paritytech/substrate"98branch = "polkadot-v0.9.20"99100[dependencies.sp-api]101git = "https://github.com/paritytech/substrate"102branch = "polkadot-v0.9.20"103104[dependencies.sp-blockchain]105git = "https://github.com/paritytech/substrate"106branch = "polkadot-v0.9.20"107108[dependencies.sp-consensus]109git = "https://github.com/paritytech/substrate"110branch = "polkadot-v0.9.20"111112[dependencies.sp-consensus-aura]113git = "https://github.com/paritytech/substrate"114branch = "polkadot-v0.9.20"115116[dependencies.sp-core]117git = "https://github.com/paritytech/substrate"118branch = "polkadot-v0.9.20"119120[dependencies.sp-finality-grandpa]121git = "https://github.com/paritytech/substrate"122branch = "polkadot-v0.9.20"123124[dependencies.sp-inherents]125git = "https://github.com/paritytech/substrate"126branch = "polkadot-v0.9.20"127128[dependencies.sp-keystore]129git = "https://github.com/paritytech/substrate"130branch = "polkadot-v0.9.20"131132[dependencies.sp-offchain]133git = "https://github.com/paritytech/substrate"134branch = "polkadot-v0.9.20"135136[dependencies.sp-runtime]137git = "https://github.com/paritytech/substrate"138branch = "polkadot-v0.9.20"139140[dependencies.sp-session]141git = "https://github.com/paritytech/substrate"142branch = "polkadot-v0.9.20"143144[dependencies.sp-timestamp]145git = "https://github.com/paritytech/substrate"146branch = "polkadot-v0.9.20"147148[dependencies.sp-transaction-pool]149git = "https://github.com/paritytech/substrate"150branch = "polkadot-v0.9.20"151152[dependencies.sp-trie]153git = "https://github.com/paritytech/substrate"154branch = "polkadot-v0.9.20"155156[dependencies.substrate-frame-rpc-system]157git = "https://github.com/paritytech/substrate"158branch = "polkadot-v0.9.20"159160[dependencies.sc-network]161git = "https://github.com/paritytech/substrate"162branch = "polkadot-v0.9.20"163164[dependencies.serde]165features = ['derive']166version = '1.0.130'167168[dependencies.serde_json]169version = '1.0.68'170171[dependencies.sc-consensus-manual-seal]172git = "https://github.com/paritytech/substrate"173branch = "polkadot-v0.9.20"174175################################################################################176# Cumulus dependencies177178[dependencies.cumulus-client-consensus-aura]179git = "https://github.com/paritytech/cumulus"180branch = "polkadot-v0.9.20"181182[dependencies.cumulus-client-consensus-common]183git = "https://github.com/paritytech/cumulus"184branch = "polkadot-v0.9.20"185186[dependencies.cumulus-client-collator]187git = "https://github.com/paritytech/cumulus"188branch = "polkadot-v0.9.20"189190[dependencies.cumulus-client-cli]191git = "https://github.com/paritytech/cumulus"192branch = "polkadot-v0.9.20"193194[dependencies.cumulus-client-network]195git = "https://github.com/paritytech/cumulus"196branch = "polkadot-v0.9.20"197198[dependencies.cumulus-primitives-core]199git = "https://github.com/paritytech/cumulus"200branch = "polkadot-v0.9.20"201202[dependencies.cumulus-primitives-parachain-inherent]203git = "https://github.com/paritytech/cumulus"204branch = "polkadot-v0.9.20"205206[dependencies.cumulus-client-service]207git = "https://github.com/paritytech/cumulus"208branch = "polkadot-v0.9.20"209210[dependencies.cumulus-relay-chain-interface]211git = "https://github.com/paritytech/cumulus"212branch = "polkadot-v0.9.20"213214[dependencies.cumulus-relay-chain-inprocess-interface]215git = "https://github.com/paritytech/cumulus"216branch = "polkadot-v0.9.20"217218[dependencies.cumulus-relay-chain-rpc-interface]219git = "https://github.com/paritytech/cumulus"220branch = "polkadot-v0.9.20"221222################################################################################223# Polkadot dependencies224[dependencies.polkadot-primitives]225git = "https://github.com/paritytech/polkadot"226branch = "release-v0.9.20"227228[dependencies.polkadot-service]229git = "https://github.com/paritytech/polkadot"230branch = "release-v0.9.20"231232[dependencies.polkadot-cli]233git = "https://github.com/paritytech/polkadot"234branch = "release-v0.9.20"235236[dependencies.polkadot-test-service]237git = "https://github.com/paritytech/polkadot"238branch = "release-v0.9.20"239240[dependencies.polkadot-parachain]241git = "https://github.com/paritytech/polkadot"242branch = "release-v0.9.20"243244245################################################################################246# Local dependencies247248[dependencies.unique-runtime-common]249default-features = false250path = "../../runtime/common"251252[dependencies.unique-runtime]253path = '../../runtime/unique'254optional = true255256[dependencies.quartz-runtime]257path = '../../runtime/quartz'258optional = true259260[dependencies.opal-runtime]261path = '../../runtime/opal'262263[dependencies.up-data-structs]264path = "../../primitives/data-structs"265default-features = false266267[dependencies.up-rpc]268path = "../../primitives/rpc"269270[dependencies.pallet-transaction-payment-rpc-runtime-api]271git = "https://github.com/paritytech/substrate"272branch = "polkadot-v0.9.20"273274################################################################################275# Package276277[package]278authors = ['Unique Network <support@uniquenetwork.io>']279build = 'build.rs'280description = 'Unique Node'281edition = '2021'282homepage = 'https://unique.network'283license = 'GPLv3'284name = 'unique-node'285repository = 'https://github.com/UniqueNetwork/unique-chain'286version = '0.9.20'287288[[bin]]289name = 'unique-collator'290path = "src/main.rs"291292[package.metadata.docs.rs]293targets = ['x86_64-unknown-linux-gnu']294295[dependencies]296futures = '0.3.17'297log = '0.4.14'298flexi_logger = "0.15.7"299parking_lot = '0.11.2'300clap = "3.1.2"301jsonrpc-core = '18.0.0'302jsonrpc-pubsub = "18.0.0"303tokio = { version = "1.17.0", features = ["time"] }304305fc-rpc-core = { git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.20" }306fc-consensus = { git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.20" }307fc-mapping-sync = { git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.20" }308fc-rpc = { git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.20" }309fc-db = { git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.20" }310fp-rpc = { git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.20" }311pallet-ethereum = { git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.20" }312313unique-rpc = { default-features = false, path = "../rpc" }314315[features]316default = []317runtime-benchmarks = [318    'unique-runtime/runtime-benchmarks',319    'polkadot-service/runtime-benchmarks',320]
after · node/cli/Cargo.toml
1################################################################################2# Build Dependencies34[build-dependencies.substrate-build-script-utils]5git = "https://github.com/paritytech/substrate"6branch = "polkadot-v0.9.20"78################################################################################9# Substrate Dependecies1011[dependencies.codec]12default-features = false13features = ['derive']14package = 'parity-scale-codec'15version = '3.1.2'1617[dependencies.frame-benchmarking]18git = "https://github.com/paritytech/substrate"19branch = "polkadot-v0.9.20"2021[dependencies.frame-benchmarking-cli]22git = "https://github.com/paritytech/substrate"23branch = "polkadot-v0.9.20"2425[dependencies.try-runtime-cli]26git = 'https://github.com/paritytech/substrate.git'27branch = 'polkadot-v0.9.17'2829[dependencies.pallet-transaction-payment-rpc]30git = "https://github.com/paritytech/substrate"31branch = "polkadot-v0.9.20"3233[dependencies.substrate-prometheus-endpoint]34git = "https://github.com/paritytech/substrate"35branch = "polkadot-v0.9.20"3637[dependencies.sc-basic-authorship]38git = "https://github.com/paritytech/substrate"39branch = "polkadot-v0.9.20"4041[dependencies.sc-chain-spec]42git = "https://github.com/paritytech/substrate"43branch = "polkadot-v0.9.20"4445[dependencies.sc-cli]46features = ['wasmtime']47git = "https://github.com/paritytech/substrate"48branch = "polkadot-v0.9.20"4950[dependencies.sc-client-api]51git = "https://github.com/paritytech/substrate"52branch = "polkadot-v0.9.20"5354[dependencies.sc-consensus]55git = "https://github.com/paritytech/substrate"56branch = "polkadot-v0.9.20"5758[dependencies.sc-consensus-aura]59git = "https://github.com/paritytech/substrate"60branch = "polkadot-v0.9.20"6162[dependencies.sc-executor]63features = ['wasmtime']64git = "https://github.com/paritytech/substrate"65branch = "polkadot-v0.9.20"6667[dependencies.sc-finality-grandpa]68git = "https://github.com/paritytech/substrate"69branch = "polkadot-v0.9.20"7071[dependencies.sc-keystore]72git = "https://github.com/paritytech/substrate"73branch = "polkadot-v0.9.20"7475[dependencies.sc-rpc]76git = "https://github.com/paritytech/substrate"77branch = "polkadot-v0.9.20"7879[dependencies.sc-rpc-api]80git = "https://github.com/paritytech/substrate"81branch = "polkadot-v0.9.20"8283[dependencies.sc-service]84features = ['wasmtime']85git = "https://github.com/paritytech/substrate"86branch = "polkadot-v0.9.20"8788[dependencies.sc-telemetry]89git = "https://github.com/paritytech/substrate"90branch = "polkadot-v0.9.20"9192[dependencies.sc-transaction-pool]93git = "https://github.com/paritytech/substrate"94branch = "polkadot-v0.9.20"9596[dependencies.sc-tracing]97git = "https://github.com/paritytech/substrate"98branch = "polkadot-v0.9.20"99100[dependencies.sp-block-builder]101git = "https://github.com/paritytech/substrate"102branch = "polkadot-v0.9.20"103104[dependencies.sp-api]105git = "https://github.com/paritytech/substrate"106branch = "polkadot-v0.9.20"107108[dependencies.sp-blockchain]109git = "https://github.com/paritytech/substrate"110branch = "polkadot-v0.9.20"111112[dependencies.sp-consensus]113git = "https://github.com/paritytech/substrate"114branch = "polkadot-v0.9.20"115116[dependencies.sp-consensus-aura]117git = "https://github.com/paritytech/substrate"118branch = "polkadot-v0.9.20"119120[dependencies.sp-core]121git = "https://github.com/paritytech/substrate"122branch = "polkadot-v0.9.20"123124[dependencies.sp-finality-grandpa]125git = "https://github.com/paritytech/substrate"126branch = "polkadot-v0.9.20"127128[dependencies.sp-inherents]129git = "https://github.com/paritytech/substrate"130branch = "polkadot-v0.9.20"131132[dependencies.sp-keystore]133git = "https://github.com/paritytech/substrate"134branch = "polkadot-v0.9.20"135136[dependencies.sp-offchain]137git = "https://github.com/paritytech/substrate"138branch = "polkadot-v0.9.20"139140[dependencies.sp-runtime]141git = "https://github.com/paritytech/substrate"142branch = "polkadot-v0.9.20"143144[dependencies.sp-session]145git = "https://github.com/paritytech/substrate"146branch = "polkadot-v0.9.20"147148[dependencies.sp-timestamp]149git = "https://github.com/paritytech/substrate"150branch = "polkadot-v0.9.20"151152[dependencies.sp-transaction-pool]153git = "https://github.com/paritytech/substrate"154branch = "polkadot-v0.9.20"155156[dependencies.sp-trie]157git = "https://github.com/paritytech/substrate"158branch = "polkadot-v0.9.20"159160[dependencies.substrate-frame-rpc-system]161git = "https://github.com/paritytech/substrate"162branch = "polkadot-v0.9.20"163164[dependencies.sc-network]165git = "https://github.com/paritytech/substrate"166branch = "polkadot-v0.9.20"167168[dependencies.serde]169features = ['derive']170version = '1.0.130'171172[dependencies.serde_json]173version = '1.0.68'174175[dependencies.sc-consensus-manual-seal]176git = "https://github.com/paritytech/substrate"177branch = "polkadot-v0.9.20"178179################################################################################180# Cumulus dependencies181182[dependencies.cumulus-client-consensus-aura]183git = "https://github.com/paritytech/cumulus"184branch = "polkadot-v0.9.20"185186[dependencies.cumulus-client-consensus-common]187git = "https://github.com/paritytech/cumulus"188branch = "polkadot-v0.9.20"189190[dependencies.cumulus-client-collator]191git = "https://github.com/paritytech/cumulus"192branch = "polkadot-v0.9.20"193194[dependencies.cumulus-client-cli]195git = "https://github.com/paritytech/cumulus"196branch = "polkadot-v0.9.20"197198[dependencies.cumulus-client-network]199git = "https://github.com/paritytech/cumulus"200branch = "polkadot-v0.9.20"201202[dependencies.cumulus-primitives-core]203git = "https://github.com/paritytech/cumulus"204branch = "polkadot-v0.9.20"205206[dependencies.cumulus-primitives-parachain-inherent]207git = "https://github.com/paritytech/cumulus"208branch = "polkadot-v0.9.20"209210[dependencies.cumulus-client-service]211git = "https://github.com/paritytech/cumulus"212branch = "polkadot-v0.9.20"213214[dependencies.cumulus-relay-chain-interface]215git = "https://github.com/paritytech/cumulus"216branch = "polkadot-v0.9.20"217218[dependencies.cumulus-relay-chain-inprocess-interface]219git = "https://github.com/paritytech/cumulus"220branch = "polkadot-v0.9.20"221222[dependencies.cumulus-relay-chain-rpc-interface]223git = "https://github.com/paritytech/cumulus"224branch = "polkadot-v0.9.20"225226################################################################################227# Polkadot dependencies228[dependencies.polkadot-primitives]229git = "https://github.com/paritytech/polkadot"230branch = "release-v0.9.20"231232[dependencies.polkadot-service]233git = "https://github.com/paritytech/polkadot"234branch = "release-v0.9.20"235236[dependencies.polkadot-cli]237git = "https://github.com/paritytech/polkadot"238branch = "release-v0.9.20"239240[dependencies.polkadot-test-service]241git = "https://github.com/paritytech/polkadot"242branch = "release-v0.9.20"243244[dependencies.polkadot-parachain]245git = "https://github.com/paritytech/polkadot"246branch = "release-v0.9.20"247248249################################################################################250# Local dependencies251252[dependencies.unique-runtime-common]253default-features = false254path = "../../runtime/common"255256[dependencies.unique-runtime]257path = '../../runtime/unique'258optional = true259260[dependencies.quartz-runtime]261path = '../../runtime/quartz'262optional = true263264[dependencies.opal-runtime]265path = '../../runtime/opal'266267[dependencies.up-data-structs]268path = "../../primitives/data-structs"269default-features = false270271[dependencies.up-rpc]272path = "../../primitives/rpc"273274[dependencies.pallet-transaction-payment-rpc-runtime-api]275git = "https://github.com/paritytech/substrate"276branch = "polkadot-v0.9.20"277278################################################################################279# Package280281[package]282authors = ['Unique Network <support@uniquenetwork.io>']283build = 'build.rs'284description = 'Unique Node'285edition = '2021'286homepage = 'https://unique.network'287license = 'GPLv3'288name = 'unique-node'289repository = 'https://github.com/UniqueNetwork/unique-chain'290version = '0.9.20'291292[[bin]]293name = 'unique-collator'294path = "src/main.rs"295296[package.metadata.docs.rs]297targets = ['x86_64-unknown-linux-gnu']298299[dependencies]300futures = '0.3.17'301log = '0.4.14'302flexi_logger = "0.15.7"303parking_lot = '0.11.2'304clap = "3.1.2"305jsonrpc-core = '18.0.0'306jsonrpc-pubsub = "18.0.0"307tokio = { version = "1.17.0", features = ["time"] }308309fc-rpc-core = { git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.20" }310fc-consensus = { git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.20" }311fc-mapping-sync = { git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.20" }312fc-rpc = { git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.20" }313fc-db = { git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.20" }314fp-rpc = { git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.20" }315pallet-ethereum = { git = "https://github.com/uniquenetwork/frontier", branch = "unique-polkadot-v0.9.20" }316317unique-rpc = { default-features = false, path = "../rpc" }318319[features]320default = []321runtime-benchmarks = [322    'unique-runtime/runtime-benchmarks',323    'polkadot-service/runtime-benchmarks',324]325try-runtime = []
modifiednode/cli/src/cli.rsdiffbeforeafterboth
--- a/node/cli/src/cli.rs
+++ b/node/cli/src/cli.rs
@@ -55,6 +55,9 @@
 	/// The custom benchmark subcommmand benchmarking runtime pallets.
 	#[clap(subcommand)]
 	Benchmark(frame_benchmarking_cli::BenchmarkCmd),
+
+	/// Try runtime
+	TryRuntime(try_runtime_cli::TryRuntimeCmd),
 }
 
 /// Command for exporting the genesis state of the parachain
modifiednode/cli/src/command.rsdiffbeforeafterboth
--- a/node/cli/src/command.rs
+++ b/node/cli/src/command.rs
@@ -49,6 +49,7 @@
 use codec::Encode;
 use cumulus_primitives_core::ParaId;
 use cumulus_client_service::genesis::generate_genesis_block;
+use std::{future::Future, pin::Pin};
 use log::info;
 use polkadot_parachain::primitives::AccountIdConversion;
 use sc_cli::{
@@ -413,6 +414,41 @@
 		Some(Subcommand::Benchmark(..)) => {
 			Err("benchmarking is only available with unique runtime enabled".into())
 		}
+		Some(Subcommand::TryRuntime(cmd)) => {
+			if cfg!(feature = "try-runtime") {
+				let runner = cli.create_runner(cmd)?;
+
+				// grab the task manager.
+				let registry = &runner
+					.config()
+					.prometheus_config
+					.as_ref()
+					.map(|cfg| &cfg.registry);
+				let task_manager =
+					sc_service::TaskManager::new(runner.config().tokio_handle.clone(), *registry)
+						.map_err(|e| format!("Error: {:?}", e))?;
+
+				runner.async_run(|config| -> Result<(Pin<Box<dyn Future<Output = _>>>, _)> {
+					Ok((
+						match config.chain_spec.runtime_id() {
+							#[cfg(feature = "unique-runtime")]
+							RuntimeId::Unique => Box::pin(cmd.run::<Block, UniqueRuntimeExecutor>(config)),
+
+							#[cfg(feature = "quartz-runtime")]
+							RuntimeId::Quartz => Box::pin(cmd.run::<Block, QuartzRuntimeExecutor>(config)),
+
+							RuntimeId::Opal => {
+								Box::pin(cmd.run::<Block, OpalRuntimeExecutor>(config))
+							}
+							RuntimeId::Unknown(chain) => return Err(no_runtime_err!(chain).into()),
+						},
+						task_manager,
+					))
+				})
+			} else {
+				Err("Try-runtime must be enabled by `--features try-runtime`.".into())
+			}
+		}
 		None => {
 			let runner = cli.create_runner(&cli.run.normalize())?;
 			let collator_options = cli.run.collator_options();
modifiedruntime/common/src/runtime_apis.rsdiffbeforeafterboth
--- a/runtime/common/src/runtime_apis.rs
+++ b/runtime/common/src/runtime_apis.rs
@@ -425,6 +425,19 @@
                     Ok(batches)
                 }
             }
+
+            #[cfg(feature = "try-runtime")]
+            impl frame_try_runtime::TryRuntime<Block> for Runtime {
+                fn on_runtime_upgrade() -> (Weight, Weight) {
+                    log::info!("try-runtime::on_runtime_upgrade unique-chain.");
+                    let weight = Executive::try_runtime_upgrade().unwrap();
+                    (weight, RuntimeBlockWeights::get().max_block)
+                }
+
+                fn execute_block_no_check(block: Block) -> Weight {
+                    Executive::execute_block_no_check(block)
+                }
+            }
         }
     }
 }
modifiedruntime/opal/Cargo.tomldiffbeforeafterboth
--- a/runtime/opal/Cargo.toml
+++ b/runtime/opal/Cargo.toml
@@ -38,6 +38,11 @@
     'sp-runtime/runtime-benchmarks',
     'xcm-builder/runtime-benchmarks',
 ]
+try-runtime = [
+    'frame-try-runtime',
+    'frame-executive/try-runtime',
+    'frame-system/try-runtime',
+]
 std = [
     'codec/std',
     'cumulus-pallet-aura-ext/std',
@@ -46,6 +51,7 @@
     'cumulus-pallet-xcmp-queue/std',
     'cumulus-primitives-core/std',
     'cumulus-primitives-utility/std',
+    'frame-try-runtime/std',
     'frame-executive/std',
     'frame-support/std',
     'frame-system/std',
@@ -121,6 +127,12 @@
 optional = true
 branch = "polkadot-v0.9.20"
 
+[dependencies.frame-try-runtime]
+default-features = false
+git = 'https://github.com/paritytech/substrate.git'
+optional = true
+branch = 'polkadot-v0.9.17'
+
 [dependencies.frame-executive]
 default-features = false
 git = "https://github.com/paritytech/substrate"
@@ -375,6 +387,7 @@
 # local dependencies
 
 [dependencies]
+log = { version = "0.4.16", default-features = false }
 unique-runtime-common = { path = "../common", default-features = false }
 scale-info = { version = "2.0.1", default-features = false, features = [
     "derive",
modifiedruntime/quartz/Cargo.tomldiffbeforeafterboth
--- a/runtime/quartz/Cargo.toml
+++ b/runtime/quartz/Cargo.toml
@@ -38,6 +38,11 @@
     'sp-runtime/runtime-benchmarks',
     'xcm-builder/runtime-benchmarks',
 ]
+try-runtime = [
+    'frame-try-runtime',
+    'frame-executive/try-runtime',
+    'frame-system/try-runtime',
+]
 std = [
     'codec/std',
     'cumulus-pallet-aura-ext/std',
@@ -46,6 +51,7 @@
     'cumulus-pallet-xcmp-queue/std',
     'cumulus-primitives-core/std',
     'cumulus-primitives-utility/std',
+    'frame-try-runtime/std',
     'frame-executive/std',
     'frame-support/std',
     'frame-system/std',
@@ -121,6 +127,12 @@
 optional = true
 branch = "polkadot-v0.9.20"
 
+[dependencies.frame-try-runtime]
+default-features = false
+git = 'https://github.com/paritytech/substrate.git'
+optional = true
+branch = 'polkadot-v0.9.17'
+
 [dependencies.frame-executive]
 default-features = false
 git = "https://github.com/paritytech/substrate"
@@ -375,6 +387,7 @@
 # local dependencies
 
 [dependencies]
+log = { version = "0.4.16", default-features = false }
 unique-runtime-common = { path = "../common", default-features = false }
 scale-info = { version = "2.0.1", default-features = false, features = [
     "derive",
modifiedruntime/unique/Cargo.tomldiffbeforeafterboth
--- a/runtime/unique/Cargo.toml
+++ b/runtime/unique/Cargo.toml
@@ -38,6 +38,11 @@
     'sp-runtime/runtime-benchmarks',
     'xcm-builder/runtime-benchmarks',
 ]
+try-runtime = [
+    'frame-try-runtime',
+    'frame-executive/try-runtime',
+    'frame-system/try-runtime',
+]
 std = [
     'codec/std',
     'cumulus-pallet-aura-ext/std',
@@ -46,6 +51,7 @@
     'cumulus-pallet-xcmp-queue/std',
     'cumulus-primitives-core/std',
     'cumulus-primitives-utility/std',
+    'frame-try-runtime/std',
     'frame-executive/std',
     'frame-support/std',
     'frame-system/std',
@@ -121,6 +127,12 @@
 optional = true
 branch = "polkadot-v0.9.20"
 
+[dependencies.frame-try-runtime]
+default-features = false
+git = 'https://github.com/paritytech/substrate.git'
+optional = true
+branch = 'polkadot-v0.9.17'
+
 [dependencies.frame-executive]
 default-features = false
 git = "https://github.com/paritytech/substrate"
@@ -375,6 +387,7 @@
 # local dependencies
 
 [dependencies]
+log = { version = "0.4.16", default-features = false }
 unique-runtime-common = { path = "../common", default-features = false }
 scale-info = { version = "2.0.1", default-features = false, features = [
     "derive",