git.delta.rocks / unique-network / refs/commits / 84a79a5d2b60

difftreelog

build upgrade polkadot to v0.9.7

Yaroslav Bolyukin2021-07-06parent: #ef0b4c2.patch.diff
in: master

15 files changed

modifiednode/cli/Cargo.tomldiffbeforeafterboth
--- a/node/cli/Cargo.toml
+++ b/node/cli/Cargo.toml
@@ -3,7 +3,7 @@
 
 [build-dependencies.substrate-build-script-utils]
 git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.3'
+branch = 'polkadot-v0.9.7'
 version = '3.0.0'
 
 ################################################################################
@@ -17,196 +17,196 @@
 
 [dependencies.frame-benchmarking]
 git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.3'
+branch = 'polkadot-v0.9.7'
 version = '3.0.0'
 
 [dependencies.frame-benchmarking-cli]
 git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.3'
+branch = 'polkadot-v0.9.7'
 version = '3.0.0'
 
 [dependencies.pallet-transaction-payment-rpc]
 git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.3'
+branch = 'polkadot-v0.9.7'
 version = '3.0.0'
 
 [dependencies.substrate-prometheus-endpoint]
 git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.3'
+branch = 'polkadot-v0.9.7'
 version = '0.9.0'
 
 [dependencies.sc-basic-authorship]
 git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.3'
+branch = 'polkadot-v0.9.7'
 version = '0.9.0'
 
 [dependencies.sc-chain-spec]
 git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.3'
+branch = 'polkadot-v0.9.7'
 version = '3.0.0'
 
 [dependencies.sc-cli]
 features = ['wasmtime']
 git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.3'
+branch = 'polkadot-v0.9.7'
 version = '0.9.0'
 
 [dependencies.sc-client-api]
 git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.3'
+branch = 'polkadot-v0.9.7'
 version = '3.0.0'
 
 [dependencies.sc-consensus]
 git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.3'
+branch = 'polkadot-v0.9.7'
 version = '0.9.0'
 
 [dependencies.sc-consensus-aura]
 git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.3'
+branch = 'polkadot-v0.9.7'
 version = '0.9.0'
 
 [dependencies.sc-executor]
 features = ['wasmtime']
 git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.3'
+branch = 'polkadot-v0.9.7'
 version = '0.9.0'
 
 [dependencies.sc-finality-grandpa]
 git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.3'
+branch = 'polkadot-v0.9.7'
 version = '0.9.0'
 
 [dependencies.sc-keystore]
 git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.3'
+branch = 'polkadot-v0.9.7'
 version = '3.0.0'
 
 [dependencies.sc-rpc]
 git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.3'
+branch = 'polkadot-v0.9.7'
 version = '3.0.0'
 
 [dependencies.sc-rpc-api]
 git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.3'
+branch = 'polkadot-v0.9.7'
 version = '0.9.0'
 
 [dependencies.sc-service]
 features = ['wasmtime']
 git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.3'
+branch = 'polkadot-v0.9.7'
 version = '0.9.0'
 
 [dependencies.sc-telemetry]
 git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.3'
+branch = 'polkadot-v0.9.7'
 version = '3.0.0'
 
 [dependencies.sc-transaction-pool]
 git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.3'
+branch = 'polkadot-v0.9.7'
 version = '3.0.0'
 
 [dependencies.sc-tracing]
 git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.3'
+branch = 'polkadot-v0.9.7'
 version = '3.0.0'
 
 [dependencies.sp-block-builder]
 git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.3'
+branch = 'polkadot-v0.9.7'
 version = '3.0.0'
 
 [dependencies.sp-api]
 git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.3'
+branch = 'polkadot-v0.9.7'
 version = '3.0.0'
 
 [dependencies.sp-blockchain]
 git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.3'
+branch = 'polkadot-v0.9.7'
 version = '3.0.0'
 
 [dependencies.sp-consensus]
 git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.3'
+branch = 'polkadot-v0.9.7'
 version = '0.9.0'
 
 [dependencies.sp-consensus-aura]
 git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.3'
+branch = 'polkadot-v0.9.7'
 version = '0.9.0'
 
 [dependencies.sp-core]
 git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.3'
+branch = 'polkadot-v0.9.7'
 version = '3.0.0'
 
 [dependencies.sp-finality-grandpa]
 git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.3'
+branch = 'polkadot-v0.9.7'
 version = '3.0.0'
 
 [dependencies.sp-inherents]
 git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.3'
+branch = 'polkadot-v0.9.7'
 version = '3.0.0'
 
 [dependencies.sp-keystore]
 git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.3'
+branch = 'polkadot-v0.9.7'
 version = '0.9.0'
 
 [dependencies.sp-offchain]
 git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.3'
+branch = 'polkadot-v0.9.7'
 version = '3.0.0'
 
 [dependencies.sp-runtime]
 git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.3'
+branch = 'polkadot-v0.9.7'
 version = '3.0.0'
 
 [dependencies.sp-session]
 git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.3'
+branch = 'polkadot-v0.9.7'
 version = '3.0.0'
 
 [dependencies.sp-timestamp]
 git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.3'
+branch = 'polkadot-v0.9.7'
 version = '3.0.0'
 
 [dependencies.sp-transaction-pool]
 git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.3'
+branch = 'polkadot-v0.9.7'
 version = '3.0.0'
 
 [dependencies.sp-trie]
 git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.3'
+branch = 'polkadot-v0.9.7'
 version = '3.0.0'
 
 [dependencies.substrate-frame-rpc-system]
 git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.3'
+branch = 'polkadot-v0.9.7'
 version = '3.0.0'
 
 [dependencies.pallet-contracts]
 git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.3'
+branch = 'polkadot-v0.9.7'
 version = '3.0.0'
 
 [dependencies.pallet-contracts-rpc]
 git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.3'
+branch = 'polkadot-v0.9.7'
 version = '3.0.0'
 
 
 [dependencies.sc-network]
 git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.3'
+branch = 'polkadot-v0.9.7'
 version = '0.9.0'
 
 [dependencies.serde]
@@ -222,58 +222,58 @@
 
 [dependencies.cumulus-client-consensus-aura]
 git = 'https://github.com/paritytech/cumulus.git'
-branch = 'polkadot-v0.9.3'
+branch = 'polkadot-v0.9.7'
 
 [dependencies.cumulus-client-consensus-common]
 git = 'https://github.com/paritytech/cumulus.git'
-branch = 'polkadot-v0.9.3'
+branch = 'polkadot-v0.9.7'
 
 [dependencies.cumulus-client-collator]
 git = 'https://github.com/paritytech/cumulus.git'
-branch = 'polkadot-v0.9.3'
+branch = 'polkadot-v0.9.7'
 
 [dependencies.cumulus-client-cli]
 git = 'https://github.com/paritytech/cumulus.git'
-branch = 'polkadot-v0.9.3'
+branch = 'polkadot-v0.9.7'
 
 [dependencies.cumulus-client-network]
 git = 'https://github.com/paritytech/cumulus.git'
-branch = 'polkadot-v0.9.3'
+branch = 'polkadot-v0.9.7'
 
 [dependencies.cumulus-primitives-core]
 git = 'https://github.com/paritytech/cumulus.git'
-branch = 'polkadot-v0.9.3'
+branch = 'polkadot-v0.9.7'
 
 [dependencies.cumulus-primitives-parachain-inherent]
 git = 'https://github.com/paritytech/cumulus.git'
-branch = 'polkadot-v0.9.3'
+branch = 'polkadot-v0.9.7'
 
 [dependencies.cumulus-client-service]
 git = 'https://github.com/paritytech/cumulus.git'
-branch = 'polkadot-v0.9.3'
+branch = 'polkadot-v0.9.7'
 
 
 ################################################################################
 # Polkadot dependencies
 [dependencies.polkadot-primitives]
 git = "https://github.com/paritytech/polkadot"
-branch = 'release-v0.9.3'
+branch = 'release-v0.9.7'
 
 [dependencies.polkadot-service]
 git = "https://github.com/paritytech/polkadot"
-branch = 'release-v0.9.3'
+branch = 'release-v0.9.7'
 
 [dependencies.polkadot-cli]
 git = "https://github.com/paritytech/polkadot"
-branch = 'release-v0.9.3'
+branch = 'release-v0.9.7'
 
 [dependencies.polkadot-test-service]
 git = "https://github.com/paritytech/polkadot"
-branch = 'release-v0.9.3'
+branch = 'release-v0.9.7'
 
 [dependencies.polkadot-parachain]
 git = "https://github.com/paritytech/polkadot"
-branch = 'release-v0.9.3'
+branch = 'release-v0.9.7'
 
 
 ################################################################################
@@ -322,7 +322,7 @@
 fc-rpc = { version = "2.0.0-dev", git = "https://github.com/usetech-llc/frontier.git", branch = "injected-transactions-parachain" }
 fc-db = { version = "1.0.0", git = "https://github.com/usetech-llc/frontier.git", branch = "injected-transactions-parachain" }
 fp-rpc = { version = "2.0.0", git = "https://github.com/usetech-llc/frontier.git", branch = "injected-transactions-parachain" }
-pallet-ethereum = { version = "2.0.0-dev", git = "https://github.com/usetech-llc/frontier.git", branch = "injected-transactions-parachain" }
+pallet-ethereum = { version = "3.0.0-dev", git = "https://github.com/usetech-llc/frontier.git", branch = "injected-transactions-parachain" }
 
 nft-rpc = { path = "../rpc" }
 
modifiednode/cli/src/chain_spec.rsdiffbeforeafterboth
--- a/node/cli/src/chain_spec.rs
+++ b/node/cli/src/chain_spec.rs
@@ -160,23 +160,23 @@
 				.to_vec(),
 			changes_trie_config: Default::default(),
 		},
-		pallet_balances: BalancesConfig {
+		balances: BalancesConfig {
 			balances: endowed_accounts
 				.iter()
 				.cloned()
 				.map(|k| (k, 1 << 70))
 				.collect(),
 		},
-		pallet_treasury: Default::default(),
-		pallet_sudo: SudoConfig { key: root_key },
-		pallet_vesting: VestingConfig {
+		treasury: Default::default(),
+		sudo: SudoConfig { key: root_key },
+		vesting: VestingConfig {
 			vesting: vested_accounts
 				.iter()
 				.cloned()
 				.map(|k| (k, 1000, 100, 1 << 98))
 				.collect(),
 		},
-		pallet_nft: NftConfig {
+		nft: NftConfig {
 			collection_id: vec![(
 				1,
 				Collection {
@@ -215,13 +215,13 @@
 			},
 		},
 		parachain_info: nft_runtime::ParachainInfoConfig { parachain_id: id },
-		pallet_aura: nft_runtime::AuraConfig {
+		aura: nft_runtime::AuraConfig {
 			authorities: initial_authorities,
 		},
-		cumulus_pallet_aura_ext: Default::default(),
-		pallet_evm: EVMConfig {
+		aura_ext: Default::default(),
+		evm: EVMConfig {
 			accounts: BTreeMap::new(),
 		},
-		pallet_ethereum: EthereumConfig {},
+		ethereum: EthereumConfig {},
 	}
 }
modifiednode/cli/src/command.rsdiffbeforeafterboth
before · node/cli/src/command.rs
1// This file is part of Substrate.23// Copyright (C) 2017-2021 Parity Technologies (UK) Ltd.4// SPDX-License-Identifier: Apache-2.056// Licensed under the Apache License, Version 2.0 (the "License");7// you may not use this file except in compliance with the License.8// You may obtain a copy of the License at9//10// 	http://www.apache.org/licenses/LICENSE-2.011//12// Unless required by applicable law or agreed to in writing, software13// distributed under the License is distributed on an "AS IS" BASIS,14// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.15// See the License for the specific language governing permissions and16// limitations under the License.1718use crate::{19	chain_spec,20	cli::{Cli, RelayChainCli, Subcommand},21	service::{new_partial, ParachainRuntimeExecutor},22};23use codec::Encode;24use cumulus_primitives_core::ParaId;25use cumulus_client_service::genesis::generate_genesis_block;26use log::info;27use nft_runtime::Block;28use polkadot_parachain::primitives::AccountIdConversion;29use sc_cli::{30	ChainSpec, CliConfiguration, DefaultConfigurationValues, ImportParams, KeystoreParams,31	NetworkParams, Result, RuntimeVersion, SharedParams, SubstrateCli,32};33use sc_service::{34	config::{BasePath, PrometheusConfig},35};36use sp_core::hexdisplay::HexDisplay;37use sp_runtime::traits::Block as BlockT;38use std::{io::Write, net::SocketAddr};3940fn load_spec(41	id: &str,42	para_id: ParaId,43) -> std::result::Result<Box<dyn sc_service::ChainSpec>, String> {44	Ok(match id {45		"dev" => Box::new(chain_spec::development_config(para_id)),46		"" | "local" => Box::new(chain_spec::local_testnet_config(para_id)),47		path => Box::new(chain_spec::ChainSpec::from_json_file(48			std::path::PathBuf::from(path),49		)?),50	})51}5253impl SubstrateCli for Cli {54	fn impl_name() -> String {55		"Parachain Collator Template".into()56	}5758	fn impl_version() -> String {59		env!("SUBSTRATE_CLI_IMPL_VERSION").into()60	}6162	fn description() -> String {63		format!(64			"Parachain Collator Template\n\nThe command-line arguments provided first will be \65		passed to the parachain node, while the arguments provided after -- will be passed \66		to the relaychain node.\n\n\67		{} [parachain-args] -- [relaychain-args]",68			Self::executable_name()69		)70	}7172	fn author() -> String {73		env!("CARGO_PKG_AUTHORS").into()74	}7576	fn support_url() -> String {77		"https://github.com/substrate-developer-hub/substrate-parachain-template/issues/new".into()78	}7980	fn copyright_start_year() -> i32 {81		201782	}8384	fn load_spec(&self, id: &str) -> std::result::Result<Box<dyn sc_service::ChainSpec>, String> {85		load_spec(id, self.run.parachain_id.unwrap_or(200).into())86	}8788	fn native_runtime_version(_: &Box<dyn ChainSpec>) -> &'static RuntimeVersion {89		&nft_runtime::VERSION90	}91}9293impl SubstrateCli for RelayChainCli {94	fn impl_name() -> String {95		"Parachain Collator Template".into()96	}9798	fn impl_version() -> String {99		env!("SUBSTRATE_CLI_IMPL_VERSION").into()100	}101102	fn description() -> String {103		"Parachain Collator Template\n\nThe command-line arguments provided first will be \104		passed to the parachain node, while the arguments provided after -- will be passed \105		to the relaychain node.\n\n\106		parachain-collator [parachain-args] -- [relaychain-args]"107			.into()108	}109110	fn author() -> String {111		env!("CARGO_PKG_AUTHORS").into()112	}113114	fn support_url() -> String {115		"https://github.com/substrate-developer-hub/substrate-parachain-template/issues/new".into()116	}117118	fn copyright_start_year() -> i32 {119		2017120	}121122	fn load_spec(&self, id: &str) -> std::result::Result<Box<dyn sc_service::ChainSpec>, String> {123		polkadot_cli::Cli::from_iter([RelayChainCli::executable_name()].iter()).load_spec(id)124	}125126	fn native_runtime_version(chain_spec: &Box<dyn ChainSpec>) -> &'static RuntimeVersion {127		polkadot_cli::Cli::native_runtime_version(chain_spec)128	}129}130131#[allow(clippy::borrowed_box)]132fn extract_genesis_wasm(chain_spec: &Box<dyn sc_service::ChainSpec>) -> Result<Vec<u8>> {133	let mut storage = chain_spec.build_storage()?;134135	storage136		.top137		.remove(sp_core::storage::well_known_keys::CODE)138		.ok_or_else(|| "Could not find wasm file in genesis state!".into())139}140141macro_rules! construct_async_run {142	(|$components:ident, $cli:ident, $cmd:ident, $config:ident| $( $code:tt )* ) => {{143		let runner = $cli.create_runner($cmd)?;144		runner.async_run(|$config| {145			let $components = new_partial::<146				_147			>(148				&$config,149				crate::service::parachain_build_import_queue,150			)?;151			let task_manager = $components.task_manager;152			{ $( $code )* }.map(|v| (v, task_manager))153		})154	}}155}156157/// Parse command line arguments into service configuration.158pub fn run() -> Result<()> {159	let cli = Cli::from_args();160161	match &cli.subcommand {162		Some(Subcommand::BuildSpec(cmd)) => {163			let runner = cli.create_runner(cmd)?;164			runner.sync_run(|config| cmd.run(config.chain_spec, config.network))165		}166		Some(Subcommand::CheckBlock(cmd)) => {167			construct_async_run!(|components, cli, cmd, config| {168				Ok(cmd.run(components.client, components.import_queue))169			})170		}171		Some(Subcommand::ExportBlocks(cmd)) => {172			construct_async_run!(|components, cli, cmd, config| {173				Ok(cmd.run(components.client, config.database))174			})175		}176		Some(Subcommand::ExportState(cmd)) => {177			construct_async_run!(|components, cli, cmd, config| {178				Ok(cmd.run(components.client, config.chain_spec))179			})180		}181		Some(Subcommand::ImportBlocks(cmd)) => {182			construct_async_run!(|components, cli, cmd, config| {183				Ok(cmd.run(components.client, components.import_queue))184			})185		}186		Some(Subcommand::PurgeChain(cmd)) => {187			let runner = cli.create_runner(cmd)?;188189			runner.sync_run(|config| {190				let polkadot_cli = RelayChainCli::new(191					&config,192					[RelayChainCli::executable_name()]193						.iter()194						.chain(cli.relaychain_args.iter()),195				);196197				let polkadot_config = SubstrateCli::create_configuration(198					&polkadot_cli,199					&polkadot_cli,200					config.task_executor.clone(),201				)202				.map_err(|err| format!("Relay chain argument error: {}", err))?;203204				cmd.run(config, polkadot_config)205			})206		}207		Some(Subcommand::Revert(cmd)) => construct_async_run!(|components, cli, cmd, config| {208			Ok(cmd.run(components.client, components.backend))209		}),210		Some(Subcommand::ExportGenesisState(params)) => {211			let mut builder = sc_cli::LoggerBuilder::new("");212			builder.with_profiling(sc_tracing::TracingReceiver::Log, "");213			let _ = builder.init();214215			let block: Block = generate_genesis_block(&load_spec(216				&params.chain.clone().unwrap_or_default(),217				params.parachain_id.unwrap_or(200).into(),218			)?)?;219			let raw_header = block.header().encode();220			let output_buf = if params.raw {221				raw_header222			} else {223				format!("0x{:?}", HexDisplay::from(&block.header().encode())).into_bytes()224			};225226			if let Some(output) = &params.output {227				std::fs::write(output, output_buf)?;228			} else {229				std::io::stdout().write_all(&output_buf)?;230			}231232			Ok(())233		}234		Some(Subcommand::ExportGenesisWasm(params)) => {235			let mut builder = sc_cli::LoggerBuilder::new("");236			builder.with_profiling(sc_tracing::TracingReceiver::Log, "");237			let _ = builder.init();238239			let raw_wasm_blob =240				extract_genesis_wasm(&cli.load_spec(&params.chain.clone().unwrap_or_default())?)?;241			let output_buf = if params.raw {242				raw_wasm_blob243			} else {244				format!("0x{:?}", HexDisplay::from(&raw_wasm_blob)).into_bytes()245			};246247			if let Some(output) = &params.output {248				std::fs::write(output, output_buf)?;249			} else {250				std::io::stdout().write_all(&output_buf)?;251			}252253			Ok(())254		}255		Some(Subcommand::Benchmark(cmd)) => {256			if cfg!(feature = "runtime-benchmarks") {257				let runner = cli.create_runner(cmd)?;258259				runner.sync_run(|config| cmd.run::<Block, ParachainRuntimeExecutor>(config))260			} else {261				Err("Benchmarking wasn't enabled when building the node. \262				You can enable it with `--features runtime-benchmarks`."263					.into())264			}265		}266		None => {267			let runner = cli.create_runner(&cli.run.normalize())?;268269			runner.run_node_until_exit(|config| async move {270				// TODO271				let key = sp_core::Pair::generate().0;272273				let para_id =274					chain_spec::Extensions::try_get(&*config.chain_spec).map(|e| e.para_id);275276				let polkadot_cli = RelayChainCli::new(277					&config,278					[RelayChainCli::executable_name()]279						.iter()280						.chain(cli.relaychain_args.iter()),281				);282283				let id = ParaId::from(cli.run.parachain_id.or(para_id).unwrap_or(200));284285				let parachain_account =286					AccountIdConversion::<polkadot_primitives::v0::AccountId>::into_account(&id);287288				let block: Block =289					generate_genesis_block(&config.chain_spec).map_err(|e| format!("{:?}", e))?;290				let genesis_state = format!("0x{:?}", HexDisplay::from(&block.header().encode()));291292				let task_executor = config.task_executor.clone();293				let polkadot_config =294					SubstrateCli::create_configuration(&polkadot_cli, &polkadot_cli, task_executor)295						.map_err(|err| format!("Relay chain argument error: {}", err))?;296297				info!("Parachain id: {:?}", id);298				info!("Parachain Account: {}", parachain_account);299				info!("Parachain genesis state: {}", genesis_state);300				info!(301					"Is collating: {}",302					if config.role.is_authority() {303						"yes"304					} else {305						"no"306					}307				);308309				crate::service::start_node(config, key, polkadot_config, id)310					.await311					.map(|r| r.0)312					.map_err(Into::into)313			})314		}315	}316}317318impl DefaultConfigurationValues for RelayChainCli {319	fn p2p_listen_port() -> u16 {320		30334321	}322323	fn rpc_ws_listen_port() -> u16 {324		9945325	}326327	fn rpc_http_listen_port() -> u16 {328		9934329	}330331	fn prometheus_listen_port() -> u16 {332		9616333	}334}335336impl CliConfiguration<Self> for RelayChainCli {337	fn shared_params(&self) -> &SharedParams {338		self.base.base.shared_params()339	}340341	fn import_params(&self) -> Option<&ImportParams> {342		self.base.base.import_params()343	}344345	fn network_params(&self) -> Option<&NetworkParams> {346		self.base.base.network_params()347	}348349	fn keystore_params(&self) -> Option<&KeystoreParams> {350		self.base.base.keystore_params()351	}352353	fn base_path(&self) -> Result<Option<BasePath>> {354		Ok(self355			.shared_params()356			.base_path()357			.or_else(|| self.base_path.clone().map(Into::into)))358	}359360	fn rpc_http(&self, default_listen_port: u16) -> Result<Option<SocketAddr>> {361		self.base.base.rpc_http(default_listen_port)362	}363364	fn rpc_ipc(&self) -> Result<Option<String>> {365		self.base.base.rpc_ipc()366	}367368	fn rpc_ws(&self, default_listen_port: u16) -> Result<Option<SocketAddr>> {369		self.base.base.rpc_ws(default_listen_port)370	}371372	fn prometheus_config(&self, default_listen_port: u16) -> Result<Option<PrometheusConfig>> {373		self.base.base.prometheus_config(default_listen_port)374	}375376	fn init<C: SubstrateCli>(&self) -> Result<()> {377		unreachable!("PolkadotCli is never initialized; qed");378	}379380	fn chain_id(&self, is_dev: bool) -> Result<String> {381		let chain_id = self.base.base.chain_id(is_dev)?;382383		Ok(if chain_id.is_empty() {384			self.chain_id.clone().unwrap_or_default()385		} else {386			chain_id387		})388	}389390	fn role(&self, is_dev: bool) -> Result<sc_service::Role> {391		self.base.base.role(is_dev)392	}393394	fn transaction_pool(&self) -> Result<sc_service::config::TransactionPoolOptions> {395		self.base.base.transaction_pool()396	}397398	fn state_cache_child_ratio(&self) -> Result<Option<usize>> {399		self.base.base.state_cache_child_ratio()400	}401402	fn rpc_methods(&self) -> Result<sc_service::config::RpcMethods> {403		self.base.base.rpc_methods()404	}405406	fn rpc_ws_max_connections(&self) -> Result<Option<usize>> {407		self.base.base.rpc_ws_max_connections()408	}409410	fn rpc_cors(&self, is_dev: bool) -> Result<Option<Vec<String>>> {411		self.base.base.rpc_cors(is_dev)412	}413414	fn telemetry_external_transport(&self) -> Result<Option<sc_service::config::ExtTransport>> {415		self.base.base.telemetry_external_transport()416	}417418	fn default_heap_pages(&self) -> Result<Option<u64>> {419		self.base.base.default_heap_pages()420	}421422	fn force_authoring(&self) -> Result<bool> {423		self.base.base.force_authoring()424	}425426	fn disable_grandpa(&self) -> Result<bool> {427		self.base.base.disable_grandpa()428	}429430	fn max_runtime_instances(&self) -> Result<Option<usize>> {431		self.base.base.max_runtime_instances()432	}433434	fn announce_block(&self) -> Result<bool> {435		self.base.base.announce_block()436	}437438	fn telemetry_endpoints(439		&self,440		chain_spec: &Box<dyn ChainSpec>,441	) -> Result<Option<sc_telemetry::TelemetryEndpoints>> {442		self.base.base.telemetry_endpoints(chain_spec)443	}444}
after · node/cli/src/command.rs
1// This file is part of Substrate.23// Copyright (C) 2017-2021 Parity Technologies (UK) Ltd.4// SPDX-License-Identifier: Apache-2.056// Licensed under the Apache License, Version 2.0 (the "License");7// you may not use this file except in compliance with the License.8// You may obtain a copy of the License at9//10// 	http://www.apache.org/licenses/LICENSE-2.011//12// Unless required by applicable law or agreed to in writing, software13// distributed under the License is distributed on an "AS IS" BASIS,14// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.15// See the License for the specific language governing permissions and16// limitations under the License.1718use crate::{19	chain_spec,20	cli::{Cli, RelayChainCli, Subcommand},21	service::{new_partial, ParachainRuntimeExecutor},22};23use codec::Encode;24use cumulus_primitives_core::ParaId;25use cumulus_client_service::genesis::generate_genesis_block;26use log::info;27use nft_runtime::Block;28use polkadot_parachain::primitives::AccountIdConversion;29use sc_cli::{30	ChainSpec, CliConfiguration, DefaultConfigurationValues, ImportParams, KeystoreParams,31	NetworkParams, Result, RuntimeVersion, SharedParams, SubstrateCli,32};33use sc_service::{34	config::{BasePath, PrometheusConfig},35};36use sp_core::hexdisplay::HexDisplay;37use sp_runtime::traits::Block as BlockT;38use std::{io::Write, net::SocketAddr};3940fn load_spec(41	id: &str,42	para_id: ParaId,43) -> std::result::Result<Box<dyn sc_service::ChainSpec>, String> {44	Ok(match id {45		"dev" => Box::new(chain_spec::development_config(para_id)),46		"" | "local" => Box::new(chain_spec::local_testnet_config(para_id)),47		path => Box::new(chain_spec::ChainSpec::from_json_file(48			std::path::PathBuf::from(path),49		)?),50	})51}5253impl SubstrateCli for Cli {54	fn impl_name() -> String {55		"Parachain Collator Template".into()56	}5758	fn impl_version() -> String {59		env!("SUBSTRATE_CLI_IMPL_VERSION").into()60	}6162	fn description() -> String {63		format!(64			"Parachain Collator Template\n\nThe command-line arguments provided first will be \65		passed to the parachain node, while the arguments provided after -- will be passed \66		to the relaychain node.\n\n\67		{} [parachain-args] -- [relaychain-args]",68			Self::executable_name()69		)70	}7172	fn author() -> String {73		env!("CARGO_PKG_AUTHORS").into()74	}7576	fn support_url() -> String {77		"https://github.com/substrate-developer-hub/substrate-parachain-template/issues/new".into()78	}7980	fn copyright_start_year() -> i32 {81		201782	}8384	fn load_spec(&self, id: &str) -> std::result::Result<Box<dyn sc_service::ChainSpec>, String> {85		load_spec(id, self.run.parachain_id.unwrap_or(200).into())86	}8788	fn native_runtime_version(_: &Box<dyn ChainSpec>) -> &'static RuntimeVersion {89		&nft_runtime::VERSION90	}91}9293impl SubstrateCli for RelayChainCli {94	fn impl_name() -> String {95		"Parachain Collator Template".into()96	}9798	fn impl_version() -> String {99		env!("SUBSTRATE_CLI_IMPL_VERSION").into()100	}101102	fn description() -> String {103		"Parachain Collator Template\n\nThe command-line arguments provided first will be \104		passed to the parachain node, while the arguments provided after -- will be passed \105		to the relaychain node.\n\n\106		parachain-collator [parachain-args] -- [relaychain-args]"107			.into()108	}109110	fn author() -> String {111		env!("CARGO_PKG_AUTHORS").into()112	}113114	fn support_url() -> String {115		"https://github.com/substrate-developer-hub/substrate-parachain-template/issues/new".into()116	}117118	fn copyright_start_year() -> i32 {119		2017120	}121122	fn load_spec(&self, id: &str) -> std::result::Result<Box<dyn sc_service::ChainSpec>, String> {123		polkadot_cli::Cli::from_iter([RelayChainCli::executable_name()].iter()).load_spec(id)124	}125126	fn native_runtime_version(chain_spec: &Box<dyn ChainSpec>) -> &'static RuntimeVersion {127		polkadot_cli::Cli::native_runtime_version(chain_spec)128	}129}130131#[allow(clippy::borrowed_box)]132fn extract_genesis_wasm(chain_spec: &Box<dyn sc_service::ChainSpec>) -> Result<Vec<u8>> {133	let mut storage = chain_spec.build_storage()?;134135	storage136		.top137		.remove(sp_core::storage::well_known_keys::CODE)138		.ok_or_else(|| "Could not find wasm file in genesis state!".into())139}140141macro_rules! construct_async_run {142	(|$components:ident, $cli:ident, $cmd:ident, $config:ident| $( $code:tt )* ) => {{143		let runner = $cli.create_runner($cmd)?;144		runner.async_run(|$config| {145			let $components = new_partial::<146				_147			>(148				&$config,149				crate::service::parachain_build_import_queue,150			)?;151			let task_manager = $components.task_manager;152			{ $( $code )* }.map(|v| (v, task_manager))153		})154	}}155}156157/// Parse command line arguments into service configuration.158pub fn run() -> Result<()> {159	let cli = Cli::from_args();160161	match &cli.subcommand {162		Some(Subcommand::BuildSpec(cmd)) => {163			let runner = cli.create_runner(cmd)?;164			runner.sync_run(|config| cmd.run(config.chain_spec, config.network))165		}166		Some(Subcommand::CheckBlock(cmd)) => {167			construct_async_run!(|components, cli, cmd, config| {168				Ok(cmd.run(components.client, components.import_queue))169			})170		}171		Some(Subcommand::ExportBlocks(cmd)) => {172			construct_async_run!(|components, cli, cmd, config| {173				Ok(cmd.run(components.client, config.database))174			})175		}176		Some(Subcommand::ExportState(cmd)) => {177			construct_async_run!(|components, cli, cmd, config| {178				Ok(cmd.run(components.client, config.chain_spec))179			})180		}181		Some(Subcommand::ImportBlocks(cmd)) => {182			construct_async_run!(|components, cli, cmd, config| {183				Ok(cmd.run(components.client, components.import_queue))184			})185		}186		Some(Subcommand::PurgeChain(cmd)) => {187			let runner = cli.create_runner(cmd)?;188189			runner.sync_run(|config| {190				let polkadot_cli = RelayChainCli::new(191					&config,192					[RelayChainCli::executable_name()]193						.iter()194						.chain(cli.relaychain_args.iter()),195				);196197				let polkadot_config = SubstrateCli::create_configuration(198					&polkadot_cli,199					&polkadot_cli,200					config.task_executor.clone(),201				)202				.map_err(|err| format!("Relay chain argument error: {}", err))?;203204				cmd.run(config, polkadot_config)205			})206		}207		Some(Subcommand::Revert(cmd)) => construct_async_run!(|components, cli, cmd, config| {208			Ok(cmd.run(components.client, components.backend))209		}),210		Some(Subcommand::ExportGenesisState(params)) => {211			let mut builder = sc_cli::LoggerBuilder::new("");212			builder.with_profiling(sc_tracing::TracingReceiver::Log, "");213			let _ = builder.init();214215			let block: Block = generate_genesis_block(&load_spec(216				&params.chain.clone().unwrap_or_default(),217				params.parachain_id.unwrap_or(200).into(),218			)?)?;219			let raw_header = block.header().encode();220			let output_buf = if params.raw {221				raw_header222			} else {223				format!("0x{:?}", HexDisplay::from(&block.header().encode())).into_bytes()224			};225226			if let Some(output) = &params.output {227				std::fs::write(output, output_buf)?;228			} else {229				std::io::stdout().write_all(&output_buf)?;230			}231232			Ok(())233		}234		Some(Subcommand::ExportGenesisWasm(params)) => {235			let mut builder = sc_cli::LoggerBuilder::new("");236			builder.with_profiling(sc_tracing::TracingReceiver::Log, "");237			let _ = builder.init();238239			let raw_wasm_blob =240				extract_genesis_wasm(&cli.load_spec(&params.chain.clone().unwrap_or_default())?)?;241			let output_buf = if params.raw {242				raw_wasm_blob243			} else {244				format!("0x{:?}", HexDisplay::from(&raw_wasm_blob)).into_bytes()245			};246247			if let Some(output) = &params.output {248				std::fs::write(output, output_buf)?;249			} else {250				std::io::stdout().write_all(&output_buf)?;251			}252253			Ok(())254		}255		Some(Subcommand::Benchmark(cmd)) => {256			if cfg!(feature = "runtime-benchmarks") {257				let runner = cli.create_runner(cmd)?;258259				runner.sync_run(|config| cmd.run::<Block, ParachainRuntimeExecutor>(config))260			} else {261				Err("Benchmarking wasn't enabled when building the node. \262				You can enable it with `--features runtime-benchmarks`."263					.into())264			}265		}266		None => {267			let runner = cli.create_runner(&cli.run.normalize())?;268269			runner.run_node_until_exit(|config| async move {270				let para_id =271					chain_spec::Extensions::try_get(&*config.chain_spec).map(|e| e.para_id);272273				let polkadot_cli = RelayChainCli::new(274					&config,275					[RelayChainCli::executable_name()]276						.iter()277						.chain(cli.relaychain_args.iter()),278				);279280				let id = ParaId::from(cli.run.parachain_id.or(para_id).unwrap_or(200));281282				let parachain_account =283					AccountIdConversion::<polkadot_primitives::v0::AccountId>::into_account(&id);284285				let block: Block =286					generate_genesis_block(&config.chain_spec).map_err(|e| format!("{:?}", e))?;287				let genesis_state = format!("0x{:?}", HexDisplay::from(&block.header().encode()));288289				let task_executor = config.task_executor.clone();290				let polkadot_config =291					SubstrateCli::create_configuration(&polkadot_cli, &polkadot_cli, task_executor)292						.map_err(|err| format!("Relay chain argument error: {}", err))?;293294				info!("Parachain id: {:?}", id);295				info!("Parachain Account: {}", parachain_account);296				info!("Parachain genesis state: {}", genesis_state);297				info!(298					"Is collating: {}",299					if config.role.is_authority() {300						"yes"301					} else {302						"no"303					}304				);305306				crate::service::start_node(config, polkadot_config, id)307					.await308					.map(|r| r.0)309					.map_err(Into::into)310			})311		}312	}313}314315impl DefaultConfigurationValues for RelayChainCli {316	fn p2p_listen_port() -> u16 {317		30334318	}319320	fn rpc_ws_listen_port() -> u16 {321		9945322	}323324	fn rpc_http_listen_port() -> u16 {325		9934326	}327328	fn prometheus_listen_port() -> u16 {329		9616330	}331}332333impl CliConfiguration<Self> for RelayChainCli {334	fn shared_params(&self) -> &SharedParams {335		self.base.base.shared_params()336	}337338	fn import_params(&self) -> Option<&ImportParams> {339		self.base.base.import_params()340	}341342	fn network_params(&self) -> Option<&NetworkParams> {343		self.base.base.network_params()344	}345346	fn keystore_params(&self) -> Option<&KeystoreParams> {347		self.base.base.keystore_params()348	}349350	fn base_path(&self) -> Result<Option<BasePath>> {351		Ok(self352			.shared_params()353			.base_path()354			.or_else(|| self.base_path.clone().map(Into::into)))355	}356357	fn rpc_http(&self, default_listen_port: u16) -> Result<Option<SocketAddr>> {358		self.base.base.rpc_http(default_listen_port)359	}360361	fn rpc_ipc(&self) -> Result<Option<String>> {362		self.base.base.rpc_ipc()363	}364365	fn rpc_ws(&self, default_listen_port: u16) -> Result<Option<SocketAddr>> {366		self.base.base.rpc_ws(default_listen_port)367	}368369	fn prometheus_config(&self, default_listen_port: u16) -> Result<Option<PrometheusConfig>> {370		self.base.base.prometheus_config(default_listen_port)371	}372373	fn init<C: SubstrateCli>(&self) -> Result<()> {374		unreachable!("PolkadotCli is never initialized; qed");375	}376377	fn chain_id(&self, is_dev: bool) -> Result<String> {378		let chain_id = self.base.base.chain_id(is_dev)?;379380		Ok(if chain_id.is_empty() {381			self.chain_id.clone().unwrap_or_default()382		} else {383			chain_id384		})385	}386387	fn role(&self, is_dev: bool) -> Result<sc_service::Role> {388		self.base.base.role(is_dev)389	}390391	fn transaction_pool(&self) -> Result<sc_service::config::TransactionPoolOptions> {392		self.base.base.transaction_pool()393	}394395	fn state_cache_child_ratio(&self) -> Result<Option<usize>> {396		self.base.base.state_cache_child_ratio()397	}398399	fn rpc_methods(&self) -> Result<sc_service::config::RpcMethods> {400		self.base.base.rpc_methods()401	}402403	fn rpc_ws_max_connections(&self) -> Result<Option<usize>> {404		self.base.base.rpc_ws_max_connections()405	}406407	fn rpc_cors(&self, is_dev: bool) -> Result<Option<Vec<String>>> {408		self.base.base.rpc_cors(is_dev)409	}410411	fn telemetry_external_transport(&self) -> Result<Option<sc_service::config::ExtTransport>> {412		self.base.base.telemetry_external_transport()413	}414415	fn default_heap_pages(&self) -> Result<Option<u64>> {416		self.base.base.default_heap_pages()417	}418419	fn force_authoring(&self) -> Result<bool> {420		self.base.base.force_authoring()421	}422423	fn disable_grandpa(&self) -> Result<bool> {424		self.base.base.disable_grandpa()425	}426427	fn max_runtime_instances(&self) -> Result<Option<usize>> {428		self.base.base.max_runtime_instances()429	}430431	fn announce_block(&self) -> Result<bool> {432		self.base.base.announce_block()433	}434435	fn telemetry_endpoints(436		&self,437		chain_spec: &Box<dyn ChainSpec>,438	) -> Result<Option<sc_telemetry::TelemetryEndpoints>> {439		self.base.base.telemetry_endpoints(chain_spec)440	}441}
modifiednode/cli/src/service.rsdiffbeforeafterboth
--- a/node/cli/src/service.rs
+++ b/node/cli/src/service.rs
@@ -23,9 +23,6 @@
 };
 use cumulus_primitives_core::ParaId;
 
-// Polkadot Imports
-use polkadot_primitives::v1::CollatorPair;
-
 // Substrate Imports
 use sc_client_api::ExecutorProvider;
 pub use sc_executor::NativeExecutor;
@@ -159,7 +156,7 @@
 		config.transaction_pool.clone(),
 		config.role.is_authority().into(),
 		config.prometheus_registry(),
-		task_manager.spawn_handle(),
+		task_manager.spawn_essential_handle(),
 		client.clone(),
 	);
 
@@ -202,7 +199,6 @@
 #[sc_tracing::logging::prefix_logs_with("Parachain")]
 async fn start_node_impl<BIQ, BIC>(
 	parachain_config: Configuration,
-	collator_key: CollatorPair,
 	polkadot_config: Configuration,
 	id: ParaId,
 	build_import_queue: BIQ,
@@ -244,15 +240,12 @@
 		telemetry_worker_handle,
 	) = params.other;
 
-	let relay_chain_full_node = cumulus_client_service::build_polkadot_full_node(
-		polkadot_config,
-		collator_key.clone(),
-		telemetry_worker_handle,
-	)
-	.map_err(|e| match e {
-		polkadot_service::Error::Sub(x) => x,
-		s => format!("{}", s).into(),
-	})?;
+	let relay_chain_full_node =
+		cumulus_client_service::build_polkadot_full_node(polkadot_config, telemetry_worker_handle)
+			.map_err(|e| match e {
+				polkadot_service::Error::Sub(x) => x,
+				s => format!("{}", s).into(),
+			})?;
 
 	let client = params.client.clone();
 	let backend = params.backend.clone();
@@ -269,7 +262,7 @@
 	let transaction_pool = params.transaction_pool.clone();
 	let mut task_manager = params.task_manager;
 	let import_queue = cumulus_client_service::SharedImportQueue::new(params.import_queue);
-	let (network, network_status_sinks, system_rpc_tx, start_network) =
+	let (network, system_rpc_tx, start_network) =
 		sc_service::build_network(sc_service::BuildNetworkParams {
 			config: &parachain_config,
 			client: client.clone(),
@@ -317,7 +310,6 @@
 		keystore: params.keystore_container.sync_keystore(),
 		backend: backend.clone(),
 		network: network.clone(),
-		network_status_sinks,
 		system_rpc_tx,
 		telemetry: telemetry.as_mut(),
 	})?;
@@ -348,7 +340,6 @@
 			announce_block,
 			client: client.clone(),
 			task_manager: &mut task_manager,
-			collator_key,
 			relay_chain_full_node,
 			spawner,
 			parachain_consensus,
@@ -415,13 +406,11 @@
 /// Start a normal parachain node.
 pub async fn start_node(
 	parachain_config: Configuration,
-	collator_key: CollatorPair,
 	polkadot_config: Configuration,
 	id: ParaId,
 ) -> sc_service::error::Result<(TaskManager, Arc<FullClient>)> {
 	start_node_impl::<_, _>(
 		parachain_config,
-		collator_key,
 		polkadot_config,
 		id,
 		parachain_build_import_queue,
modifiednode/rpc/Cargo.tomldiffbeforeafterboth
--- a/node/rpc/Cargo.toml
+++ b/node/rpc/Cargo.toml
@@ -13,33 +13,33 @@
 futures = { version = "0.3.1", features = ["compat"] }
 jsonrpc-core = "15.0.0"
 jsonrpc-pubsub = "15.0.0"
-pallet-contracts-rpc = { version = "3.0", git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.3' }
-pallet-transaction-payment-rpc = { version = "3.0", git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.3' }
-pallet-transaction-payment-rpc-runtime-api = { version = "3.0", git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.3' }
-sc-client-api = { version = "3.0", git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.3' }
-sc-consensus-aura = { version = "0.9", git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.3' }
-sc-consensus-epochs = { version = "0.9", git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.3' }
-sc-finality-grandpa = { version = "0.9", git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.3' }
-sc-finality-grandpa-rpc = { version = "0.9", git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.3' }
-sc-keystore = { version = "3.0", git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.3' }
-sc-network = { version = "0.9", git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.3' }
-sc-rpc-api = { version = "0.9", git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.3' }
-sc-rpc = { version = "3.0", git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.3' }
-sc-service = { version = "0.9", git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.3' }
-sp-api = { version = "3.0", git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.3' }
-sp-block-builder = { version = "3.0", git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.3' }
-sp-blockchain = { version = "3.0", git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.3' }
-sp-consensus = { version = "0.9", git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.3' }
-sp-consensus-aura = { version = "0.9", git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.3' }
-sp-core = { version = "3.0", git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.3' }
-sp-offchain = { version = "3.0", git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.3' }
-sp-runtime = { version = "3.0", git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.3' }
-sp-storage = { version = "3.0", git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.3' }
-sp-session = { version = "3.0", git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.3' }
-sp-transaction-pool = { version = "3.0", git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.3' }
-sc-transaction-pool = { version = "3.0", git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.3' }
-sc-transaction-graph = { version = "3.0", git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.3' }
-substrate-frame-rpc-system = { version = "3.0", git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.3' }
+pallet-contracts-rpc = { version = "3.0", git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.7' }
+pallet-transaction-payment-rpc = { version = "3.0", git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.7' }
+pallet-transaction-payment-rpc-runtime-api = { version = "3.0", git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.7' }
+sc-client-api = { version = "3.0", git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.7' }
+sc-consensus-aura = { version = "0.9", git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.7' }
+sc-consensus-epochs = { version = "0.9", git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.7' }
+sc-finality-grandpa = { version = "0.9", git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.7' }
+sc-finality-grandpa-rpc = { version = "0.9", git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.7' }
+sc-keystore = { version = "3.0", git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.7' }
+sc-network = { version = "0.9", git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.7' }
+sc-rpc-api = { version = "0.9", git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.7' }
+sc-rpc = { version = "3.0", git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.7' }
+sc-service = { version = "0.9", git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.7' }
+sp-api = { version = "3.0", git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.7' }
+sp-block-builder = { version = "3.0", git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.7' }
+sp-blockchain = { version = "3.0", git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.7' }
+sp-consensus = { version = "0.9", git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.7' }
+sp-consensus-aura = { version = "0.9", git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.7' }
+sp-core = { version = "3.0", git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.7' }
+sp-offchain = { version = "3.0", git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.7' }
+sp-runtime = { version = "3.0", git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.7' }
+sp-storage = { version = "3.0", git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.7' }
+sp-session = { version = "3.0", git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.7' }
+sp-transaction-pool = { version = "3.0", git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.7' }
+sc-transaction-pool = { version = "3.0", git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.7' }
+sc-transaction-graph = { version = "3.0", git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.7' }
+substrate-frame-rpc-system = { version = "3.0", git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.7' }
 tokio = { version = "0.2.13", features = ["macros", "sync"] }
 
 pallet-ethereum = { git = "https://github.com/usetech-llc/frontier.git", branch = "injected-transactions-parachain" }
modifiedpallets/contract-helpers/Cargo.tomldiffbeforeafterboth
--- a/pallets/contract-helpers/Cargo.toml
+++ b/pallets/contract-helpers/Cargo.toml
@@ -15,11 +15,11 @@
 version = '0.1.0'
 
 [dependencies]
-frame-support = { default-features = false, version = '3.0.0', git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.3' }
-frame-system = { default-features = false, version = '3.0.0', git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.3' }
-pallet-contracts = { default-features = false, version = '3.0.0', git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.3' }
-sp-runtime = { default-features = false, version = '3.0.0', git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.3' }
-sp-std = { default-features = false, version = '3.0.0', git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.3' }
+frame-support = { default-features = false, version = '3.0.0', git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.7' }
+frame-system = { default-features = false, version = '3.0.0', git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.7' }
+pallet-contracts = { default-features = false, version = '3.0.0', git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.7' }
+sp-runtime = { default-features = false, version = '3.0.0', git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.7' }
+sp-std = { default-features = false, version = '3.0.0', git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.7' }
 
 [features]
 default = ["std"]
modifiedpallets/contract-helpers/src/lib.rsdiffbeforeafterboth
--- a/pallets/contract-helpers/src/lib.rs
+++ b/pallets/contract-helpers/src/lib.rs
@@ -75,7 +75,7 @@
 	#[pallet::call]
 	impl<T: Config> Pallet<T> {
 		#[pallet::weight(0)]
-		fn toggle_sponsoring(
+		pub fn toggle_sponsoring(
 			origin: OriginFor<T>,
 			contract: T::AccountId,
 			sponsoring: bool,
@@ -95,7 +95,7 @@
 		}
 
 		#[pallet::weight(0)]
-		fn toggle_allowlist(
+		pub fn toggle_allowlist(
 			origin: OriginFor<T>,
 			contract: T::AccountId,
 			enabled: bool,
@@ -115,7 +115,7 @@
 		}
 
 		#[pallet::weight(0)]
-		fn toggle_allowed(
+		pub fn toggle_allowed(
 			origin: OriginFor<T>,
 			contract: T::AccountId,
 			user: T::AccountId,
@@ -136,7 +136,7 @@
 		}
 
 		#[pallet::weight(0)]
-		fn set_sponsoring_rate_limit(
+		pub fn set_sponsoring_rate_limit(
 			origin: OriginFor<T>,
 			contract: T::AccountId,
 			rate_limit: T::BlockNumber,
modifiedpallets/inflation/Cargo.tomldiffbeforeafterboth
--- a/pallets/inflation/Cargo.toml
+++ b/pallets/inflation/Cargo.toml
@@ -43,43 +43,43 @@
 default-features = false
 optional = true
 git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.3'
+branch = 'polkadot-v0.9.7'
 version = '3.0.0'
 
 [dependencies.frame-support]
 default-features = false
 git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.3'
+branch = 'polkadot-v0.9.7'
 version = '3.0.0'
 
 [dependencies.frame-system]
 default-features = false
 git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.3'
+branch = 'polkadot-v0.9.7'
 version = '3.0.0'
 
 [dependencies.pallet-balances]
 default-features = false
 git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.3'
+branch = 'polkadot-v0.9.7'
 version = '3.0.0'
 
 [dependencies.pallet-timestamp]
 default-features = false
 git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.3'
+branch = 'polkadot-v0.9.7'
 version = '3.0.0'
 
 [dependencies.pallet-randomness-collective-flip]
 default-features = false
 git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.3'
+branch = 'polkadot-v0.9.7'
 version = '3.0.0'
 
 [dependencies.sp-std]
 default-features = false
 git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.3'
+branch = 'polkadot-v0.9.7'
 version = '3.0.0'
 
 [dependencies.serde]
@@ -90,18 +90,18 @@
 [dependencies.sp-runtime]
 default-features = false
 git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.3'
+branch = 'polkadot-v0.9.7'
 version = '3.0.0'
 
 [dependencies.sp-core]
 default-features = false
 git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.3'
+branch = 'polkadot-v0.9.7'
 version = '3.0.0'
 
 [dependencies.sp-io]
 default-features = false
 git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.3'
+branch = 'polkadot-v0.9.7'
 version = '3.0.0'
 
modifiedpallets/nft-charge-transaction/Cargo.tomldiffbeforeafterboth
--- a/pallets/nft-charge-transaction/Cargo.toml
+++ b/pallets/nft-charge-transaction/Cargo.toml
@@ -20,15 +20,15 @@
 
 [dependencies]
 serde = { version = "1.0.119", default-features = false }
-frame-support = { default-features = false, version = '3.0.0', git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.3' }
-frame-system = { default-features = false, version = '3.0.0', git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.3' }
-pallet-balances = { default-features = false, version = '3.0.0', git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.3' }
-pallet-transaction-payment = { default-features = false, version = "3.0.0", git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.3' }
-sp-std = { default-features = false, version = '3.0.0', git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.3' }
-frame-benchmarking = { default-features = false, version = "3.0.0", optional = true, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.3' }
-sp-core = { default-features = false, version = '3.0.0', git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.3' }
-sp-io = { default-features = false, version = '3.0.0', git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.3' }
-sp-runtime = { default-features = false, version = '3.0.0', git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.3' }
+frame-support = { default-features = false, version = '3.0.0', git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.7' }
+frame-system = { default-features = false, version = '3.0.0', git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.7' }
+pallet-balances = { default-features = false, version = '3.0.0', git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.7' }
+pallet-transaction-payment = { default-features = false, version = "3.0.0", git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.7' }
+sp-std = { default-features = false, version = '3.0.0', git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.7' }
+frame-benchmarking = { default-features = false, version = "3.0.0", optional = true, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.7' }
+sp-core = { default-features = false, version = '3.0.0', git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.7' }
+sp-io = { default-features = false, version = '3.0.0', git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.7' }
+sp-runtime = { default-features = false, version = '3.0.0', git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.7' }
 
 pallet-nft-transaction-payment = { default-features = false, path="../nft-transaction-payment" }
 
modifiedpallets/nft-transaction-payment/Cargo.tomldiffbeforeafterboth
--- a/pallets/nft-transaction-payment/Cargo.toml
+++ b/pallets/nft-transaction-payment/Cargo.toml
@@ -20,14 +20,14 @@
 
 [dependencies]
 serde = { version = "1.0.119", default-features = false }
-frame-support = { default-features = false, version = '3.0.0', git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.3' }
-frame-system = { default-features = false, version = '3.0.0', git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.3' }
-pallet-transaction-payment = { default-features = false, version = "3.0.0", git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.3' }
-sp-std = { default-features = false, version = '3.0.0', git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.3' }
-frame-benchmarking = { default-features = false, version = "3.0.0", optional = true, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.3' }
-sp-core = { default-features = false, version = '3.0.0', git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.3' }
-sp-io = { default-features = false, version = '3.0.0', git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.3' }
-sp-runtime = { default-features = false, version = '3.0.0', git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.3' }
+frame-support = { default-features = false, version = '3.0.0', git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.7' }
+frame-system = { default-features = false, version = '3.0.0', git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.7' }
+pallet-transaction-payment = { default-features = false, version = "3.0.0", git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.7' }
+sp-std = { default-features = false, version = '3.0.0', git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.7' }
+frame-benchmarking = { default-features = false, version = "3.0.0", optional = true, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.7' }
+sp-core = { default-features = false, version = '3.0.0', git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.7' }
+sp-io = { default-features = false, version = '3.0.0', git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.7' }
+sp-runtime = { default-features = false, version = '3.0.0', git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.7' }
 
 up-sponsorship = { default-features = false, path = "../../primitives/sponsorship", version = "0.1.0" }
 
modifiedpallets/nft/Cargo.tomldiffbeforeafterboth
--- a/pallets/nft/Cargo.toml
+++ b/pallets/nft/Cargo.toml
@@ -56,55 +56,55 @@
 default-features = false
 optional = true
 git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.3'
+branch = 'polkadot-v0.9.7'
 version = '3.0.0'
 
 [dependencies.frame-support]
 default-features = false
 git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.3'
+branch = 'polkadot-v0.9.7'
 version = '3.0.0'
 
 [dependencies.frame-system]
 default-features = false
 git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.3'
+branch = 'polkadot-v0.9.7'
 version = '3.0.0'
 
 [dependencies.pallet-balances]
 default-features = false
 git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.3'
+branch = 'polkadot-v0.9.7'
 version = '3.0.0'
 
 [dependencies.pallet-timestamp]
 default-features = false
 git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.3'
+branch = 'polkadot-v0.9.7'
 version = '3.0.0'
 
 [dependencies.pallet-randomness-collective-flip]
 default-features = false
 git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.3'
+branch = 'polkadot-v0.9.7'
 version = '3.0.0'
 
 [dependencies.sp-std]
 default-features = false
 git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.3'
+branch = 'polkadot-v0.9.7'
 version = '3.0.0'
 
 [dependencies.pallet-contracts]
 default-features = false
 git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.3'
+branch = 'polkadot-v0.9.7'
 version = '3.0.0'
 
 [dependencies.pallet-transaction-payment]
 default-features = false
 git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.3'
+branch = 'polkadot-v0.9.7'
 version = '3.0.0'
 
 [dependencies.serde]
@@ -115,19 +115,19 @@
 [dependencies.sp-runtime]
 default-features = false
 git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.3'
+branch = 'polkadot-v0.9.7'
 version = '3.0.0'
 
 [dependencies.sp-core]
 default-features = false
 git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.3'
+branch = 'polkadot-v0.9.7'
 version = '3.0.0'
 
 [dependencies.sp-io]
 default-features = false
 git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.3'
+branch = 'polkadot-v0.9.7'
 version = '3.0.0'
 
 
@@ -149,12 +149,12 @@
 ethereum-tx-sign = { version = "3.0.4", optional = true }
 ethereum = { default-features = false, version = "0.7.1" }
 rlp = { default-features = false, version = "0.5.0" }
-sp-api = { default-features = false, version = '3.0.0', git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.3" }
+sp-api = { default-features = false, version = '3.0.0', git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.7" }
 
 evm-coder = { default-features = false, path = "../../crates/evm-coder" }
 primitive-types = { version = "0.9.0", default-features = false, features = ["serde_no_std"] }
 
-pallet-evm = { default-features = false, version = "4.0.0-dev", git = "https://github.com/usetech-llc/frontier.git", branch = "injected-transactions-parachain" }
-pallet-ethereum = { default-features = false, version = "2.0.0-dev", git = "https://github.com/usetech-llc/frontier.git", branch = "injected-transactions-parachain" }
+pallet-evm = { default-features = false, version = "5.0.0-dev", git = "https://github.com/usetech-llc/frontier.git", branch = "injected-transactions-parachain" }
+pallet-ethereum = { default-features = false, version = "3.0.0-dev", git = "https://github.com/usetech-llc/frontier.git", branch = "injected-transactions-parachain" }
 fp-evm = { default-features = false, version = '2.0.0', git = "https://github.com/usetech-llc/frontier.git", branch = "injected-transactions-parachain" }
 hex-literal = "0.3.1"
\ No newline at end of file
modifiedpallets/scheduler/Cargo.tomldiffbeforeafterboth
--- a/pallets/scheduler/Cargo.toml
+++ b/pallets/scheduler/Cargo.toml
@@ -12,19 +12,19 @@
 [dependencies]
 serde = { version = "1.0.119", default-features = false }
 codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false }
-frame-support = { default-features = false, version = '3.0.0', git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.3' }
-frame-system = { default-features = false, version = '3.0.0', git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.3' }
-sp-runtime = { default-features = false, version = '3.0.0', git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.3' }
-sp-std = { default-features = false, version = '3.0.0', git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.3' }
-sp-io = { default-features = false, version = '3.0.0', git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.3' }
-frame-benchmarking = { default-features = false, version = '3.0.0', optional = true, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.3' }
+frame-support = { default-features = false, version = '3.0.0', git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.7' }
+frame-system = { default-features = false, version = '3.0.0', git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.7' }
+sp-runtime = { default-features = false, version = '3.0.0', git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.7' }
+sp-std = { default-features = false, version = '3.0.0', git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.7' }
+sp-io = { default-features = false, version = '3.0.0', git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.7' }
+frame-benchmarking = { default-features = false, version = '3.0.0', optional = true, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.7' }
 
 up-sponsorship = { default-features = false, path = "../../primitives/sponsorship", version = "0.1.0" }
 log = { version = "0.4.14", default-features = false }
 
 [dev-dependencies]
-sp-core = { default-features = false, version = '3.0.0', git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.3' }
-substrate-test-utils = { version = "3.0.0", git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.3' }
+sp-core = { default-features = false, version = '3.0.0', git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.7' }
+substrate-test-utils = { version = "3.0.0", git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.7' }
 
 [features]
 default = ["std"]
modifiedprimitives/nft/Cargo.tomldiffbeforeafterboth
--- a/primitives/nft/Cargo.toml
+++ b/primitives/nft/Cargo.toml
@@ -11,11 +11,11 @@
 [dependencies]
 codec = { package = "parity-scale-codec", version = "2.0.0", default-features = false, features = ['derive'] }
 serde = { version = "1.0.119", features = ['derive'], default-features = false }
-frame-support = { default-features = false, version = '3.0.0', git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.3' }
-frame-system = { default-features = false, version = '3.0.0', git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.3' }
-pallet-contracts = { default-features = false, version = '3.0.0', git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.3' }
-sp-core = { version = "3.0.0", default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.3' }
-sp-runtime = { version = "3.0.0", default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.3' }
+frame-support = { default-features = false, version = '3.0.0', git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.7' }
+frame-system = { default-features = false, version = '3.0.0', git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.7' }
+pallet-contracts = { default-features = false, version = '3.0.0', git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.7' }
+sp-core = { version = "3.0.0", default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.7' }
+sp-runtime = { version = "3.0.0", default-features = false, git = 'https://github.com/paritytech/substrate.git', branch = 'polkadot-v0.9.7' }
 
 [features]
 default = ["std"]
modifiedruntime/Cargo.tomldiffbeforeafterboth
--- a/runtime/Cargo.toml
+++ b/runtime/Cargo.toml
@@ -95,38 +95,38 @@
 default-features = false
 git = 'https://github.com/paritytech/substrate.git'
 optional = true
-branch = 'polkadot-v0.9.3'
+branch = 'polkadot-v0.9.7'
 version = '3.0.0'
 
 [dependencies.frame-executive]
 default-features = false
 git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.3'
+branch = 'polkadot-v0.9.7'
 version = '3.0.0'
 
 [dependencies.frame-support]
 default-features = false
 git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.3'
+branch = 'polkadot-v0.9.7'
 version = '3.0.0'
 
 [dependencies.frame-system]
 default-features = false
 git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.3'
+branch = 'polkadot-v0.9.7'
 version = '3.0.0'
 
 [dependencies.frame-system-benchmarking]
 default-features = false
 git = 'https://github.com/paritytech/substrate.git'
 optional = true
-branch = 'polkadot-v0.9.3'
+branch = 'polkadot-v0.9.7'
 version = '3.0.0'
 
 [dependencies.frame-system-rpc-runtime-api]
 default-features = false
 git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.3'
+branch = 'polkadot-v0.9.7'
 version = '3.0.0'
 
 [dependencies.hex-literal]
@@ -142,152 +142,152 @@
 [dependencies.pallet-aura]
 default-features = false
 git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.3'
+branch = 'polkadot-v0.9.7'
 version = '3.0.0'
 
 [dependencies.pallet-balances]
 default-features = false
 git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.3'
+branch = 'polkadot-v0.9.7'
 version = '3.0.0'
 
 # Contracts specific packages
 [dependencies.pallet-contracts]
 git = 'https://github.com/paritytech/substrate.git'
 default-features = false
-branch = 'polkadot-v0.9.3'
+branch = 'polkadot-v0.9.7'
 version = '3.0.0'
 
 [dependencies.pallet-contracts-primitives]
 git = 'https://github.com/paritytech/substrate.git'
 default-features = false
-branch = 'polkadot-v0.9.3'
+branch = 'polkadot-v0.9.7'
 version = '3.0.0'
 
 [dependencies.pallet-contracts-rpc-runtime-api]
 git = 'https://github.com/paritytech/substrate.git'
 default-features = false
-branch = 'polkadot-v0.9.3'
+branch = 'polkadot-v0.9.7'
 version = '3.0.0'
 
 [dependencies.pallet-randomness-collective-flip]
 default-features = false
 git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.3'
+branch = 'polkadot-v0.9.7'
 version = '3.0.0'
 
 [dependencies.pallet-sudo]
 default-features = false
 git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.3'
+branch = 'polkadot-v0.9.7'
 version = '3.0.0'
 
 [dependencies.pallet-timestamp]
 default-features = false
 git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.3'
+branch = 'polkadot-v0.9.7'
 version = '3.0.0'
 
 [dependencies.pallet-transaction-payment]
 default-features = false
 git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.3'
+branch = 'polkadot-v0.9.7'
 version = '3.0.0'
 
 [dependencies.pallet-transaction-payment-rpc-runtime-api]
 default-features = false
 git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.3'
+branch = 'polkadot-v0.9.7'
 version = '3.0.0'
 
 [dependencies.pallet-treasury]
 default-features = false
 git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.3'
+branch = 'polkadot-v0.9.7'
 version = '3.0.0'
 
 [dependencies.pallet-vesting]
 default-features = false
 git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.3'
+branch = 'polkadot-v0.9.7'
 version = '3.0.0'
 
 [dependencies.sp-arithmetic]
 default-features = false
 git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.3'
+branch = 'polkadot-v0.9.7'
 version = '3.0.0'
 
 [dependencies.sp-api]
 default-features = false
 git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.3'
+branch = 'polkadot-v0.9.7'
 version = '3.0.0'
 
 [dependencies.sp-block-builder]
 default-features = false
 git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.3'
+branch = 'polkadot-v0.9.7'
 version = '3.0.0'
 
 [dependencies.sp-core]
 default-features = false
 git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.3'
+branch = 'polkadot-v0.9.7'
 version = '3.0.0'
 
 [dependencies.sp-consensus-aura]
 default-features = false
 git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.3'
+branch = 'polkadot-v0.9.7'
 version = '0.9.0'
 
 [dependencies.sp-inherents]
 default-features = false
 git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.3'
+branch = 'polkadot-v0.9.7'
 version = '3.0.0'
 
 [dependencies.sp-io]
 default-features = false
 git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.3'
+branch = 'polkadot-v0.9.7'
 version = '3.0.0'
 
 [dependencies.sp-offchain]
 default-features = false
 git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.3'
+branch = 'polkadot-v0.9.7'
 version = '3.0.0'
 
 [dependencies.sp-runtime]
 default-features = false
 git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.3'
+branch = 'polkadot-v0.9.7'
 version = '3.0.0'
 
 [dependencies.sp-session]
 default-features = false
 git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.3'
+branch = 'polkadot-v0.9.7'
 version = '3.0.0'
 
 [dependencies.sp-std]
 default-features = false
 git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.3'
+branch = 'polkadot-v0.9.7'
 version = '3.0.0'
 
 [dependencies.sp-transaction-pool]
 default-features = false
 git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.3'
+branch = 'polkadot-v0.9.7'
 version = '3.0.0'
 
 [dependencies.sp-version]
 default-features = false
 git = 'https://github.com/paritytech/substrate.git'
-branch = 'polkadot-v0.9.3'
+branch = 'polkadot-v0.9.7'
 version = '3.0.0'
 
 [dependencies.smallvec]
@@ -299,42 +299,47 @@
 [dependencies.parachain-info]
 default-features = false
 git = 'https://github.com/paritytech/cumulus.git'
-branch = 'polkadot-v0.9.3'
+branch = 'polkadot-v0.9.7'
 version = '0.1.0'
 
 [dependencies.cumulus-pallet-aura-ext]
 git = 'https://github.com/paritytech/cumulus.git'
-branch = 'polkadot-v0.9.3'
+branch = 'polkadot-v0.9.7'
 default-features = false
 
 [dependencies.cumulus-pallet-parachain-system]
 git = 'https://github.com/paritytech/cumulus.git'
-branch = 'polkadot-v0.9.3'
+branch = 'polkadot-v0.9.7'
 default-features = false
 
 [dependencies.cumulus-primitives-core]
 git = 'https://github.com/paritytech/cumulus.git'
-branch = 'polkadot-v0.9.3'
+branch = 'polkadot-v0.9.7'
 default-features = false
 
 [dependencies.cumulus-pallet-xcm]
 git = 'https://github.com/paritytech/cumulus.git'
-branch = 'polkadot-v0.9.3'
+branch = 'polkadot-v0.9.7'
 default-features = false
 
 [dependencies.cumulus-pallet-dmp-queue]
 git = 'https://github.com/paritytech/cumulus.git'
-branch = 'polkadot-v0.9.3'
+branch = 'polkadot-v0.9.7'
 default-features = false
 
 [dependencies.cumulus-pallet-xcmp-queue]
 git = 'https://github.com/paritytech/cumulus.git'
-branch = 'polkadot-v0.9.3'
+branch = 'polkadot-v0.9.7'
 default-features = false
 
 [dependencies.cumulus-primitives-utility]
 git = 'https://github.com/paritytech/cumulus.git'
-branch = 'polkadot-v0.9.3'
+branch = 'polkadot-v0.9.7'
+default-features = false
+
+[dependencies.cumulus-primitives-timestamp]
+git = 'https://github.com/paritytech/cumulus.git'
+branch = 'polkadot-v0.9.7'
 default-features = false
 
 ################################################################################
@@ -342,27 +347,27 @@
 
 [dependencies.polkadot-parachain]
 git = 'https://github.com/paritytech/polkadot'
-branch = 'release-v0.9.3'
+branch = 'release-v0.9.7'
 default-features = false
 
 [dependencies.xcm]
 git = 'https://github.com/paritytech/polkadot'
-branch = 'release-v0.9.3'
+branch = 'release-v0.9.7'
 default-features = false
 
 [dependencies.xcm-builder]
 git = 'https://github.com/paritytech/polkadot'
-branch = 'release-v0.9.3'
+branch = 'release-v0.9.7'
 default-features = false
 
 [dependencies.xcm-executor]
 git = 'https://github.com/paritytech/polkadot'
-branch = 'release-v0.9.3'
+branch = 'release-v0.9.7'
 default-features = false
 
 [dependencies.pallet-xcm]
 git = 'https://github.com/paritytech/polkadot'
-branch = 'release-v0.9.3'
+branch = 'release-v0.9.7'
 default-features = false
 
 
@@ -379,8 +384,8 @@
 pallet-nft-transaction-payment = { path = '../pallets/nft-transaction-payment', default-features = false, version = '3.0.0' }
 pallet-nft-charge-transaction = { path = '../pallets/nft-charge-transaction', default-features = false, version = '3.0.0' }
 
-pallet-evm = { default-features = false, version = "4.0.0-dev", git = "https://github.com/usetech-llc/frontier.git", branch = "injected-transactions-parachain" }
-pallet-ethereum = { default-features = false, version = "2.0.0-dev", git = "https://github.com/usetech-llc/frontier.git", branch = "injected-transactions-parachain" }
+pallet-evm = { default-features = false, version = "5.0.0-dev", git = "https://github.com/usetech-llc/frontier.git", branch = "injected-transactions-parachain" }
+pallet-ethereum = { default-features = false, version = "3.0.0-dev", git = "https://github.com/usetech-llc/frontier.git", branch = "injected-transactions-parachain" }
 fp-rpc = { default-features = false, version = "2.0.0", git = "https://github.com/usetech-llc/frontier.git", branch = "injected-transactions-parachain" }
 
 ################################################################################
modifiedruntime/src/lib.rsdiffbeforeafterboth
--- a/runtime/src/lib.rs
+++ b/runtime/src/lib.rs
@@ -250,6 +250,7 @@
 	type BlockGasLimit = BlockGasLimit;
 	type FeeCalculator = ();
 	type GasWeightMapping = ();
+	type BlockHashMapping = pallet_ethereum::EthereumBlockHashMapping;
 	type CallOrigin = EnsureAddressTruncated;
 	type WithdrawOrigin = EnsureAddressTruncated;
 	type AddressMapping = HashedAddressMapping<Self::Hashing>;
@@ -287,6 +288,8 @@
 	type EvmSubmitLog = pallet_evm::Pallet<Runtime>;
 }
 
+impl pallet_randomness_collective_flip::Config for Runtime {}
+
 impl system::Config for Runtime {
 	/// The data to be stored in an account.
 	type AccountData = pallet_balances::AccountData<Balance>;
@@ -355,6 +358,8 @@
 
 impl pallet_balances::Config for Runtime {
 	type MaxLocks = MaxLocks;
+	type MaxReserves = ();
+	type ReserveIdentifier = [u8; 8];
 	/// The type for recording an account's balance.
 	type Balance = Balance;
 	/// The ubiquitous event type.
@@ -1153,7 +1158,31 @@
 	}
 }
 
+struct CheckInherents;
+
+impl cumulus_pallet_parachain_system::CheckInherents<Block> for CheckInherents {
+	fn check_inherents(
+		block: &Block,
+		relay_state_proof: &cumulus_pallet_parachain_system::RelayChainStateProof,
+	) -> sp_inherents::CheckInherentsResult {
+		let relay_chain_slot = relay_state_proof
+			.read_slot()
+			.expect("Could not read the relay chain slot from the proof");
+
+		let inherent_data =
+			cumulus_primitives_timestamp::InherentDataProvider::from_relay_chain_slot_and_duration(
+				relay_chain_slot,
+				sp_std::time::Duration::from_secs(6),
+			)
+			.create_inherent_data()
+			.expect("Could not create the timestamp inherent data");
+
+		inherent_data.check_extrinsics(&block)
+	}
+}
+
 cumulus_pallet_parachain_system::register_validate_block!(
-	Runtime,
-	cumulus_pallet_aura_ext::BlockExecutor::<Runtime, Executive>,
+	Runtime = Runtime,
+	BlockExecutor = cumulus_pallet_aura_ext::BlockExecutor::<Runtime, Executive>,
+	CheckInherents = CheckInherents,
 );