difftreelog
build upgrade polkadot to v0.9.7
in: master
15 files changed
node/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" }
node/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 {},
}
}
node/cli/src/command.rsdiffbeforeafterboth--- a/node/cli/src/command.rs
+++ b/node/cli/src/command.rs
@@ -267,9 +267,6 @@
let runner = cli.create_runner(&cli.run.normalize())?;
runner.run_node_until_exit(|config| async move {
- // TODO
- let key = sp_core::Pair::generate().0;
-
let para_id =
chain_spec::Extensions::try_get(&*config.chain_spec).map(|e| e.para_id);
@@ -306,7 +303,7 @@
}
);
- crate::service::start_node(config, key, polkadot_config, id)
+ crate::service::start_node(config, polkadot_config, id)
.await
.map(|r| r.0)
.map_err(Into::into)
node/cli/src/service.rsdiffbeforeafterboth1//! Service and ServiceFactory implementation. Specialized wrapper over substrate service.23//4// This file is subject to the terms and conditions defined in5// file 'LICENSE', which is part of this source code package.6//78// std9use std::sync::Arc;10use std::sync::Mutex;11use std::collections::BTreeMap;12use std::collections::HashMap;1314// Local Runtime Types15use nft_runtime::RuntimeApi;1617// Cumulus Imports18use cumulus_client_consensus_aura::{build_aura_consensus, BuildAuraConsensusParams, SlotProportion};19use cumulus_client_consensus_common::ParachainConsensus;20use cumulus_client_network::build_block_announce_validator;21use cumulus_client_service::{22 prepare_node_config, start_collator, start_full_node, StartCollatorParams, StartFullNodeParams,23};24use cumulus_primitives_core::ParaId;2526// Polkadot Imports27use polkadot_primitives::v1::CollatorPair;2829// Substrate Imports30use sc_client_api::ExecutorProvider;31pub use sc_executor::NativeExecutor;32use sc_executor::native_executor_instance;33use sc_network::NetworkService;34use sc_service::{BasePath, Configuration, PartialComponents, Role, TaskManager};35use sc_telemetry::{Telemetry, TelemetryHandle, TelemetryWorker, TelemetryWorkerHandle};36use sp_consensus::SlotData;37use sp_keystore::SyncCryptoStorePtr;38use sp_runtime::traits::BlakeTwo256;39use substrate_prometheus_endpoint::Registry;4041// Frontier Imports42use fc_rpc_core::types::FilterPool;43use fc_rpc_core::types::PendingTransactions;4445// Runtime type overrides46type BlockNumber = u32;47type Header = sp_runtime::generic::Header<BlockNumber, sp_runtime::traits::BlakeTwo256>;48pub type Block = sp_runtime::generic::Block<Header, sp_runtime::OpaqueExtrinsic>;49type Hash = sp_core::H256;5051// Native executor instance.52native_executor_instance!(53 pub ParachainRuntimeExecutor,54 nft_runtime::api::dispatch,55 nft_runtime::native_version,56 frame_benchmarking::benchmarking::HostFunctions,57);5859pub fn open_frontier_backend(config: &Configuration) -> Result<Arc<fc_db::Backend<Block>>, String> {60 let config_dir = config61 .base_path62 .as_ref()63 .map(|base_path| base_path.config_dir(config.chain_spec.id()))64 .unwrap_or_else(|| {65 BasePath::from_project("", "", "nft").config_dir(config.chain_spec.id())66 });67 let database_dir = config_dir.join("frontier").join("db");6869 Ok(Arc::new(fc_db::Backend::<Block>::new(70 &fc_db::DatabaseSettings {71 source: fc_db::DatabaseSettingsSrc::RocksDb {72 path: database_dir,73 cache_size: 0,74 },75 },76 )?))77}7879type Executor = ParachainRuntimeExecutor;8081type FullClient = sc_service::TFullClient<Block, RuntimeApi, Executor>;82type FullBackend = sc_service::TFullBackend<Block>;83type FullSelectChain = sc_consensus::LongestChain<FullBackend, Block>;8485/// Starts a `ServiceBuilder` for a full service.86///87/// Use this macro if you don't actually need the full service, but just the builder in order to88/// be able to perform chain operations.89#[allow(clippy::type_complexity)]90pub fn new_partial<BIQ>(91 config: &Configuration,92 build_import_queue: BIQ,93) -> Result<94 PartialComponents<95 FullClient,96 FullBackend,97 FullSelectChain,98 sp_consensus::DefaultImportQueue<Block, FullClient>,99 sc_transaction_pool::FullPool<Block, FullClient>,100 (101 Option<Telemetry>,102 PendingTransactions,103 Option<FilterPool>,104 Arc<fc_db::Backend<Block>>,105 Option<TelemetryWorkerHandle>,106 ),107 >,108 sc_service::Error,109>110where111 sc_client_api::StateBackendFor<FullBackend, Block>: sp_api::StateBackend<BlakeTwo256>,112 Executor: sc_executor::NativeExecutionDispatch + 'static,113 BIQ: FnOnce(114 Arc<FullClient>,115 &Configuration,116 Option<TelemetryHandle>,117 &TaskManager,118 ) -> Result<sp_consensus::DefaultImportQueue<Block, FullClient>, sc_service::Error>,119{120 let _telemetry = config121 .telemetry_endpoints122 .clone()123 .filter(|x| !x.is_empty())124 .map(|endpoints| -> Result<_, sc_telemetry::Error> {125 let worker = TelemetryWorker::new(16)?;126 let telemetry = worker.handle().new_telemetry(endpoints);127 Ok((worker, telemetry))128 })129 .transpose()?;130131 let telemetry = config132 .telemetry_endpoints133 .clone()134 .filter(|x| !x.is_empty())135 .map(|endpoints| -> Result<_, sc_telemetry::Error> {136 let worker = TelemetryWorker::new(16)?;137 let telemetry = worker.handle().new_telemetry(endpoints);138 Ok((worker, telemetry))139 })140 .transpose()?;141142 let (client, backend, keystore_container, task_manager) =143 sc_service::new_full_parts::<Block, RuntimeApi, Executor>(144 config,145 telemetry.as_ref().map(|(_, telemetry)| telemetry.handle()),146 )?;147 let client = Arc::new(client);148149 let telemetry_worker_handle = telemetry.as_ref().map(|(worker, _)| worker.handle());150151 let telemetry = telemetry.map(|(worker, telemetry)| {152 task_manager.spawn_handle().spawn("telemetry", worker.run());153 telemetry154 });155156 let select_chain = sc_consensus::LongestChain::new(backend.clone());157158 let transaction_pool = sc_transaction_pool::BasicPool::new_full(159 config.transaction_pool.clone(),160 config.role.is_authority().into(),161 config.prometheus_registry(),162 task_manager.spawn_handle(),163 client.clone(),164 );165166 let pending_transactions: PendingTransactions = Some(Arc::new(Mutex::new(HashMap::new())));167168 let filter_pool: Option<FilterPool> = Some(Arc::new(Mutex::new(BTreeMap::new())));169170 let frontier_backend = open_frontier_backend(config)?;171172 let import_queue = build_import_queue(173 client.clone(),174 config,175 telemetry.as_ref().map(|telemetry| telemetry.handle()),176 &task_manager,177 )?;178179 let params = PartialComponents {180 backend,181 client,182 import_queue,183 keystore_container,184 task_manager,185 transaction_pool,186 select_chain,187 other: (188 telemetry,189 pending_transactions,190 filter_pool,191 frontier_backend,192 telemetry_worker_handle,193 ),194 };195196 Ok(params)197}198199/// Start a node with the given parachain `Configuration` and relay chain `Configuration`.200///201/// This is the actual implementation that is abstract over the executor and the runtime api.202#[sc_tracing::logging::prefix_logs_with("Parachain")]203async fn start_node_impl<BIQ, BIC>(204 parachain_config: Configuration,205 collator_key: CollatorPair,206 polkadot_config: Configuration,207 id: ParaId,208 build_import_queue: BIQ,209 build_consensus: BIC,210) -> sc_service::error::Result<(TaskManager, Arc<FullClient>)>211where212 sc_client_api::StateBackendFor<FullBackend, Block>: sp_api::StateBackend<BlakeTwo256>,213 Executor: sc_executor::NativeExecutionDispatch + 'static,214 BIQ: FnOnce(215 Arc<FullClient>,216 &Configuration,217 Option<TelemetryHandle>,218 &TaskManager,219 ) -> Result<sp_consensus::DefaultImportQueue<Block, FullClient>, sc_service::Error>,220 BIC: FnOnce(221 Arc<FullClient>,222 Option<&Registry>,223 Option<TelemetryHandle>,224 &TaskManager,225 &polkadot_service::NewFull<polkadot_service::Client>,226 Arc<sc_transaction_pool::FullPool<Block, FullClient>>,227 Arc<NetworkService<Block, Hash>>,228 SyncCryptoStorePtr,229 bool,230 ) -> Result<Box<dyn ParachainConsensus<Block>>, sc_service::Error>,231{232 if matches!(parachain_config.role, Role::Light) {233 return Err("Light client not supported!".into());234 }235236 let parachain_config = prepare_node_config(parachain_config);237238 let params = new_partial::<BIQ>(¶chain_config, build_import_queue)?;239 let (240 mut telemetry,241 pending_transactions,242 filter_pool,243 frontier_backend,244 telemetry_worker_handle,245 ) = params.other;246247 let relay_chain_full_node = cumulus_client_service::build_polkadot_full_node(248 polkadot_config,249 collator_key.clone(),250 telemetry_worker_handle,251 )252 .map_err(|e| match e {253 polkadot_service::Error::Sub(x) => x,254 s => format!("{}", s).into(),255 })?;256257 let client = params.client.clone();258 let backend = params.backend.clone();259 let block_announce_validator = build_block_announce_validator(260 relay_chain_full_node.client.clone(),261 id,262 Box::new(relay_chain_full_node.network.clone()),263 relay_chain_full_node.backend.clone(),264 );265266 let force_authoring = parachain_config.force_authoring;267 let validator = parachain_config.role.is_authority();268 let prometheus_registry = parachain_config.prometheus_registry().cloned();269 let transaction_pool = params.transaction_pool.clone();270 let mut task_manager = params.task_manager;271 let import_queue = cumulus_client_service::SharedImportQueue::new(params.import_queue);272 let (network, network_status_sinks, system_rpc_tx, start_network) =273 sc_service::build_network(sc_service::BuildNetworkParams {274 config: ¶chain_config,275 client: client.clone(),276 transaction_pool: transaction_pool.clone(),277 spawn_handle: task_manager.spawn_handle(),278 import_queue: import_queue.clone(),279 on_demand: None,280 block_announce_validator_builder: Some(Box::new(|_| block_announce_validator)),281 })?;282283 let subscription_executor = sc_rpc::SubscriptionTaskExecutor::new(task_manager.spawn_handle());284 let rpc_client = client.clone();285 let rpc_pool = transaction_pool.clone();286 let select_chain = params.select_chain.clone();287 let is_authority = parachain_config.role.clone().is_authority();288 let rpc_network = network.clone();289 let rpc_extensions_builder = Box::new(move |deny_unsafe, _| {290 let full_deps = nft_rpc::FullDeps {291 backend: frontier_backend.clone(),292 deny_unsafe,293 client: rpc_client.clone(),294 pool: rpc_pool.clone(),295 // TODO: Unhardcode296 enable_dev_signer: false,297 filter_pool: filter_pool.clone(),298 network: rpc_network.clone(),299 pending_transactions: pending_transactions.clone(),300 select_chain: select_chain.clone(),301 is_authority,302 // TODO: Unhardcode303 max_past_logs: 10000,304 };305306 nft_rpc::create_full::<_, _, _, RuntimeApi, _>(full_deps, subscription_executor.clone())307 });308309 sc_service::spawn_tasks(sc_service::SpawnTasksParams {310 on_demand: None,311 remote_blockchain: None,312 rpc_extensions_builder,313 client: client.clone(),314 transaction_pool: transaction_pool.clone(),315 task_manager: &mut task_manager,316 config: parachain_config,317 keystore: params.keystore_container.sync_keystore(),318 backend: backend.clone(),319 network: network.clone(),320 network_status_sinks,321 system_rpc_tx,322 telemetry: telemetry.as_mut(),323 })?;324325 let announce_block = {326 let network = network.clone();327 Arc::new(move |hash, data| network.announce_block(hash, data))328 };329330 if validator {331 let parachain_consensus = build_consensus(332 client.clone(),333 prometheus_registry.as_ref(),334 telemetry.as_ref().map(|t| t.handle()),335 &task_manager,336 &relay_chain_full_node,337 transaction_pool,338 network,339 params.keystore_container.sync_keystore(),340 force_authoring,341 )?;342343 let spawner = task_manager.spawn_handle();344345 let params = StartCollatorParams {346 para_id: id,347 block_status: client.clone(),348 announce_block,349 client: client.clone(),350 task_manager: &mut task_manager,351 collator_key,352 relay_chain_full_node,353 spawner,354 parachain_consensus,355 import_queue,356 };357358 start_collator(params).await?;359 } else {360 let params = StartFullNodeParams {361 client: client.clone(),362 announce_block,363 task_manager: &mut task_manager,364 para_id: id,365 relay_chain_full_node,366 };367368 start_full_node(params)?;369 }370371 start_network.start_network();372373 Ok((task_manager, client))374}375376/// Build the import queue for the the parachain runtime.377pub fn parachain_build_import_queue(378 client: Arc<FullClient>,379 config: &Configuration,380 telemetry: Option<TelemetryHandle>,381 task_manager: &TaskManager,382) -> Result<sp_consensus::DefaultImportQueue<Block, FullClient>, sc_service::Error> {383 let slot_duration = cumulus_client_consensus_aura::slot_duration(&*client)?;384385 cumulus_client_consensus_aura::import_queue::<386 sp_consensus_aura::sr25519::AuthorityPair,387 _,388 _,389 _,390 _,391 _,392 _,393 >(cumulus_client_consensus_aura::ImportQueueParams {394 block_import: client.clone(),395 client: client.clone(),396 create_inherent_data_providers: move |_, _| async move {397 let time = sp_timestamp::InherentDataProvider::from_system_time();398399 let slot =400 sp_consensus_aura::inherents::InherentDataProvider::from_timestamp_and_duration(401 *time,402 slot_duration.slot_duration(),403 );404405 Ok((time, slot))406 },407 registry: config.prometheus_registry(),408 can_author_with: sp_consensus::CanAuthorWithNativeVersion::new(client.executor().clone()),409 spawner: &task_manager.spawn_essential_handle(),410 telemetry,411 })412 .map_err(Into::into)413}414415/// Start a normal parachain node.416pub async fn start_node(417 parachain_config: Configuration,418 collator_key: CollatorPair,419 polkadot_config: Configuration,420 id: ParaId,421) -> sc_service::error::Result<(TaskManager, Arc<FullClient>)> {422 start_node_impl::<_, _>(423 parachain_config,424 collator_key,425 polkadot_config,426 id,427 parachain_build_import_queue,428 |client,429 prometheus_registry,430 telemetry,431 task_manager,432 relay_chain_node,433 transaction_pool,434 sync_oracle,435 keystore,436 force_authoring| {437 let slot_duration = cumulus_client_consensus_aura::slot_duration(&*client)?;438439 let proposer_factory = sc_basic_authorship::ProposerFactory::with_proof_recording(440 task_manager.spawn_handle(),441 client.clone(),442 transaction_pool,443 prometheus_registry,444 telemetry.clone(),445 );446447 let relay_chain_backend = relay_chain_node.backend.clone();448 let relay_chain_client = relay_chain_node.client.clone();449 Ok(build_aura_consensus::<450 sp_consensus_aura::sr25519::AuthorityPair,451 _,452 _,453 _,454 _,455 _,456 _,457 _,458 _,459 _,460 >(BuildAuraConsensusParams {461 proposer_factory,462 create_inherent_data_providers: move |_, (relay_parent, validation_data)| {463 let parachain_inherent =464 cumulus_primitives_parachain_inherent::ParachainInherentData::create_at_with_client(465 relay_parent,466 &relay_chain_client,467 &*relay_chain_backend,468 &validation_data,469 id,470 );471 async move {472 let time = sp_timestamp::InherentDataProvider::from_system_time();473474 let slot =475 sp_consensus_aura::inherents::InherentDataProvider::from_timestamp_and_duration(476 *time,477 slot_duration.slot_duration(),478 );479480 let parachain_inherent = parachain_inherent.ok_or_else(|| {481 Box::<dyn std::error::Error + Send + Sync>::from(482 "Failed to create parachain inherent",483 )484 })?;485 Ok((time, slot, parachain_inherent))486 }487 },488 block_import: client.clone(),489 relay_chain_client: relay_chain_node.client.clone(),490 relay_chain_backend: relay_chain_node.backend.clone(),491 para_client: client,492 backoff_authoring_blocks: Option::<()>::None,493 sync_oracle,494 keystore,495 force_authoring,496 slot_duration,497 // We got around 500ms for proposing498 block_proposal_slot_portion: SlotProportion::new(1f32 / 24f32),499 telemetry,500 }))501 },502 )503 .await504}1//! Service and ServiceFactory implementation. Specialized wrapper over substrate service.23//4// This file is subject to the terms and conditions defined in5// file 'LICENSE', which is part of this source code package.6//78// std9use std::sync::Arc;10use std::sync::Mutex;11use std::collections::BTreeMap;12use std::collections::HashMap;1314// Local Runtime Types15use nft_runtime::RuntimeApi;1617// Cumulus Imports18use cumulus_client_consensus_aura::{build_aura_consensus, BuildAuraConsensusParams, SlotProportion};19use cumulus_client_consensus_common::ParachainConsensus;20use cumulus_client_network::build_block_announce_validator;21use cumulus_client_service::{22 prepare_node_config, start_collator, start_full_node, StartCollatorParams, StartFullNodeParams,23};24use cumulus_primitives_core::ParaId;2526// Substrate Imports27use sc_client_api::ExecutorProvider;28pub use sc_executor::NativeExecutor;29use sc_executor::native_executor_instance;30use sc_network::NetworkService;31use sc_service::{BasePath, Configuration, PartialComponents, Role, TaskManager};32use sc_telemetry::{Telemetry, TelemetryHandle, TelemetryWorker, TelemetryWorkerHandle};33use sp_consensus::SlotData;34use sp_keystore::SyncCryptoStorePtr;35use sp_runtime::traits::BlakeTwo256;36use substrate_prometheus_endpoint::Registry;3738// Frontier Imports39use fc_rpc_core::types::FilterPool;40use fc_rpc_core::types::PendingTransactions;4142// Runtime type overrides43type BlockNumber = u32;44type Header = sp_runtime::generic::Header<BlockNumber, sp_runtime::traits::BlakeTwo256>;45pub type Block = sp_runtime::generic::Block<Header, sp_runtime::OpaqueExtrinsic>;46type Hash = sp_core::H256;4748// Native executor instance.49native_executor_instance!(50 pub ParachainRuntimeExecutor,51 nft_runtime::api::dispatch,52 nft_runtime::native_version,53 frame_benchmarking::benchmarking::HostFunctions,54);5556pub fn open_frontier_backend(config: &Configuration) -> Result<Arc<fc_db::Backend<Block>>, String> {57 let config_dir = config58 .base_path59 .as_ref()60 .map(|base_path| base_path.config_dir(config.chain_spec.id()))61 .unwrap_or_else(|| {62 BasePath::from_project("", "", "nft").config_dir(config.chain_spec.id())63 });64 let database_dir = config_dir.join("frontier").join("db");6566 Ok(Arc::new(fc_db::Backend::<Block>::new(67 &fc_db::DatabaseSettings {68 source: fc_db::DatabaseSettingsSrc::RocksDb {69 path: database_dir,70 cache_size: 0,71 },72 },73 )?))74}7576type Executor = ParachainRuntimeExecutor;7778type FullClient = sc_service::TFullClient<Block, RuntimeApi, Executor>;79type FullBackend = sc_service::TFullBackend<Block>;80type FullSelectChain = sc_consensus::LongestChain<FullBackend, Block>;8182/// Starts a `ServiceBuilder` for a full service.83///84/// Use this macro if you don't actually need the full service, but just the builder in order to85/// be able to perform chain operations.86#[allow(clippy::type_complexity)]87pub fn new_partial<BIQ>(88 config: &Configuration,89 build_import_queue: BIQ,90) -> Result<91 PartialComponents<92 FullClient,93 FullBackend,94 FullSelectChain,95 sp_consensus::DefaultImportQueue<Block, FullClient>,96 sc_transaction_pool::FullPool<Block, FullClient>,97 (98 Option<Telemetry>,99 PendingTransactions,100 Option<FilterPool>,101 Arc<fc_db::Backend<Block>>,102 Option<TelemetryWorkerHandle>,103 ),104 >,105 sc_service::Error,106>107where108 sc_client_api::StateBackendFor<FullBackend, Block>: sp_api::StateBackend<BlakeTwo256>,109 Executor: sc_executor::NativeExecutionDispatch + 'static,110 BIQ: FnOnce(111 Arc<FullClient>,112 &Configuration,113 Option<TelemetryHandle>,114 &TaskManager,115 ) -> Result<sp_consensus::DefaultImportQueue<Block, FullClient>, sc_service::Error>,116{117 let _telemetry = config118 .telemetry_endpoints119 .clone()120 .filter(|x| !x.is_empty())121 .map(|endpoints| -> Result<_, sc_telemetry::Error> {122 let worker = TelemetryWorker::new(16)?;123 let telemetry = worker.handle().new_telemetry(endpoints);124 Ok((worker, telemetry))125 })126 .transpose()?;127128 let telemetry = config129 .telemetry_endpoints130 .clone()131 .filter(|x| !x.is_empty())132 .map(|endpoints| -> Result<_, sc_telemetry::Error> {133 let worker = TelemetryWorker::new(16)?;134 let telemetry = worker.handle().new_telemetry(endpoints);135 Ok((worker, telemetry))136 })137 .transpose()?;138139 let (client, backend, keystore_container, task_manager) =140 sc_service::new_full_parts::<Block, RuntimeApi, Executor>(141 config,142 telemetry.as_ref().map(|(_, telemetry)| telemetry.handle()),143 )?;144 let client = Arc::new(client);145146 let telemetry_worker_handle = telemetry.as_ref().map(|(worker, _)| worker.handle());147148 let telemetry = telemetry.map(|(worker, telemetry)| {149 task_manager.spawn_handle().spawn("telemetry", worker.run());150 telemetry151 });152153 let select_chain = sc_consensus::LongestChain::new(backend.clone());154155 let transaction_pool = sc_transaction_pool::BasicPool::new_full(156 config.transaction_pool.clone(),157 config.role.is_authority().into(),158 config.prometheus_registry(),159 task_manager.spawn_essential_handle(),160 client.clone(),161 );162163 let pending_transactions: PendingTransactions = Some(Arc::new(Mutex::new(HashMap::new())));164165 let filter_pool: Option<FilterPool> = Some(Arc::new(Mutex::new(BTreeMap::new())));166167 let frontier_backend = open_frontier_backend(config)?;168169 let import_queue = build_import_queue(170 client.clone(),171 config,172 telemetry.as_ref().map(|telemetry| telemetry.handle()),173 &task_manager,174 )?;175176 let params = PartialComponents {177 backend,178 client,179 import_queue,180 keystore_container,181 task_manager,182 transaction_pool,183 select_chain,184 other: (185 telemetry,186 pending_transactions,187 filter_pool,188 frontier_backend,189 telemetry_worker_handle,190 ),191 };192193 Ok(params)194}195196/// Start a node with the given parachain `Configuration` and relay chain `Configuration`.197///198/// This is the actual implementation that is abstract over the executor and the runtime api.199#[sc_tracing::logging::prefix_logs_with("Parachain")]200async fn start_node_impl<BIQ, BIC>(201 parachain_config: Configuration,202 polkadot_config: Configuration,203 id: ParaId,204 build_import_queue: BIQ,205 build_consensus: BIC,206) -> sc_service::error::Result<(TaskManager, Arc<FullClient>)>207where208 sc_client_api::StateBackendFor<FullBackend, Block>: sp_api::StateBackend<BlakeTwo256>,209 Executor: sc_executor::NativeExecutionDispatch + 'static,210 BIQ: FnOnce(211 Arc<FullClient>,212 &Configuration,213 Option<TelemetryHandle>,214 &TaskManager,215 ) -> Result<sp_consensus::DefaultImportQueue<Block, FullClient>, sc_service::Error>,216 BIC: FnOnce(217 Arc<FullClient>,218 Option<&Registry>,219 Option<TelemetryHandle>,220 &TaskManager,221 &polkadot_service::NewFull<polkadot_service::Client>,222 Arc<sc_transaction_pool::FullPool<Block, FullClient>>,223 Arc<NetworkService<Block, Hash>>,224 SyncCryptoStorePtr,225 bool,226 ) -> Result<Box<dyn ParachainConsensus<Block>>, sc_service::Error>,227{228 if matches!(parachain_config.role, Role::Light) {229 return Err("Light client not supported!".into());230 }231232 let parachain_config = prepare_node_config(parachain_config);233234 let params = new_partial::<BIQ>(¶chain_config, build_import_queue)?;235 let (236 mut telemetry,237 pending_transactions,238 filter_pool,239 frontier_backend,240 telemetry_worker_handle,241 ) = params.other;242243 let relay_chain_full_node =244 cumulus_client_service::build_polkadot_full_node(polkadot_config, telemetry_worker_handle)245 .map_err(|e| match e {246 polkadot_service::Error::Sub(x) => x,247 s => format!("{}", s).into(),248 })?;249250 let client = params.client.clone();251 let backend = params.backend.clone();252 let block_announce_validator = build_block_announce_validator(253 relay_chain_full_node.client.clone(),254 id,255 Box::new(relay_chain_full_node.network.clone()),256 relay_chain_full_node.backend.clone(),257 );258259 let force_authoring = parachain_config.force_authoring;260 let validator = parachain_config.role.is_authority();261 let prometheus_registry = parachain_config.prometheus_registry().cloned();262 let transaction_pool = params.transaction_pool.clone();263 let mut task_manager = params.task_manager;264 let import_queue = cumulus_client_service::SharedImportQueue::new(params.import_queue);265 let (network, system_rpc_tx, start_network) =266 sc_service::build_network(sc_service::BuildNetworkParams {267 config: ¶chain_config,268 client: client.clone(),269 transaction_pool: transaction_pool.clone(),270 spawn_handle: task_manager.spawn_handle(),271 import_queue: import_queue.clone(),272 on_demand: None,273 block_announce_validator_builder: Some(Box::new(|_| block_announce_validator)),274 })?;275276 let subscription_executor = sc_rpc::SubscriptionTaskExecutor::new(task_manager.spawn_handle());277 let rpc_client = client.clone();278 let rpc_pool = transaction_pool.clone();279 let select_chain = params.select_chain.clone();280 let is_authority = parachain_config.role.clone().is_authority();281 let rpc_network = network.clone();282 let rpc_extensions_builder = Box::new(move |deny_unsafe, _| {283 let full_deps = nft_rpc::FullDeps {284 backend: frontier_backend.clone(),285 deny_unsafe,286 client: rpc_client.clone(),287 pool: rpc_pool.clone(),288 // TODO: Unhardcode289 enable_dev_signer: false,290 filter_pool: filter_pool.clone(),291 network: rpc_network.clone(),292 pending_transactions: pending_transactions.clone(),293 select_chain: select_chain.clone(),294 is_authority,295 // TODO: Unhardcode296 max_past_logs: 10000,297 };298299 nft_rpc::create_full::<_, _, _, RuntimeApi, _>(full_deps, subscription_executor.clone())300 });301302 sc_service::spawn_tasks(sc_service::SpawnTasksParams {303 on_demand: None,304 remote_blockchain: None,305 rpc_extensions_builder,306 client: client.clone(),307 transaction_pool: transaction_pool.clone(),308 task_manager: &mut task_manager,309 config: parachain_config,310 keystore: params.keystore_container.sync_keystore(),311 backend: backend.clone(),312 network: network.clone(),313 system_rpc_tx,314 telemetry: telemetry.as_mut(),315 })?;316317 let announce_block = {318 let network = network.clone();319 Arc::new(move |hash, data| network.announce_block(hash, data))320 };321322 if validator {323 let parachain_consensus = build_consensus(324 client.clone(),325 prometheus_registry.as_ref(),326 telemetry.as_ref().map(|t| t.handle()),327 &task_manager,328 &relay_chain_full_node,329 transaction_pool,330 network,331 params.keystore_container.sync_keystore(),332 force_authoring,333 )?;334335 let spawner = task_manager.spawn_handle();336337 let params = StartCollatorParams {338 para_id: id,339 block_status: client.clone(),340 announce_block,341 client: client.clone(),342 task_manager: &mut task_manager,343 relay_chain_full_node,344 spawner,345 parachain_consensus,346 import_queue,347 };348349 start_collator(params).await?;350 } else {351 let params = StartFullNodeParams {352 client: client.clone(),353 announce_block,354 task_manager: &mut task_manager,355 para_id: id,356 relay_chain_full_node,357 };358359 start_full_node(params)?;360 }361362 start_network.start_network();363364 Ok((task_manager, client))365}366367/// Build the import queue for the the parachain runtime.368pub fn parachain_build_import_queue(369 client: Arc<FullClient>,370 config: &Configuration,371 telemetry: Option<TelemetryHandle>,372 task_manager: &TaskManager,373) -> Result<sp_consensus::DefaultImportQueue<Block, FullClient>, sc_service::Error> {374 let slot_duration = cumulus_client_consensus_aura::slot_duration(&*client)?;375376 cumulus_client_consensus_aura::import_queue::<377 sp_consensus_aura::sr25519::AuthorityPair,378 _,379 _,380 _,381 _,382 _,383 _,384 >(cumulus_client_consensus_aura::ImportQueueParams {385 block_import: client.clone(),386 client: client.clone(),387 create_inherent_data_providers: move |_, _| async move {388 let time = sp_timestamp::InherentDataProvider::from_system_time();389390 let slot =391 sp_consensus_aura::inherents::InherentDataProvider::from_timestamp_and_duration(392 *time,393 slot_duration.slot_duration(),394 );395396 Ok((time, slot))397 },398 registry: config.prometheus_registry(),399 can_author_with: sp_consensus::CanAuthorWithNativeVersion::new(client.executor().clone()),400 spawner: &task_manager.spawn_essential_handle(),401 telemetry,402 })403 .map_err(Into::into)404}405406/// Start a normal parachain node.407pub async fn start_node(408 parachain_config: Configuration,409 polkadot_config: Configuration,410 id: ParaId,411) -> sc_service::error::Result<(TaskManager, Arc<FullClient>)> {412 start_node_impl::<_, _>(413 parachain_config,414 polkadot_config,415 id,416 parachain_build_import_queue,417 |client,418 prometheus_registry,419 telemetry,420 task_manager,421 relay_chain_node,422 transaction_pool,423 sync_oracle,424 keystore,425 force_authoring| {426 let slot_duration = cumulus_client_consensus_aura::slot_duration(&*client)?;427428 let proposer_factory = sc_basic_authorship::ProposerFactory::with_proof_recording(429 task_manager.spawn_handle(),430 client.clone(),431 transaction_pool,432 prometheus_registry,433 telemetry.clone(),434 );435436 let relay_chain_backend = relay_chain_node.backend.clone();437 let relay_chain_client = relay_chain_node.client.clone();438 Ok(build_aura_consensus::<439 sp_consensus_aura::sr25519::AuthorityPair,440 _,441 _,442 _,443 _,444 _,445 _,446 _,447 _,448 _,449 >(BuildAuraConsensusParams {450 proposer_factory,451 create_inherent_data_providers: move |_, (relay_parent, validation_data)| {452 let parachain_inherent =453 cumulus_primitives_parachain_inherent::ParachainInherentData::create_at_with_client(454 relay_parent,455 &relay_chain_client,456 &*relay_chain_backend,457 &validation_data,458 id,459 );460 async move {461 let time = sp_timestamp::InherentDataProvider::from_system_time();462463 let slot =464 sp_consensus_aura::inherents::InherentDataProvider::from_timestamp_and_duration(465 *time,466 slot_duration.slot_duration(),467 );468469 let parachain_inherent = parachain_inherent.ok_or_else(|| {470 Box::<dyn std::error::Error + Send + Sync>::from(471 "Failed to create parachain inherent",472 )473 })?;474 Ok((time, slot, parachain_inherent))475 }476 },477 block_import: client.clone(),478 relay_chain_client: relay_chain_node.client.clone(),479 relay_chain_backend: relay_chain_node.backend.clone(),480 para_client: client,481 backoff_authoring_blocks: Option::<()>::None,482 sync_oracle,483 keystore,484 force_authoring,485 slot_duration,486 // We got around 500ms for proposing487 block_proposal_slot_portion: SlotProportion::new(1f32 / 24f32),488 telemetry,489 }))490 },491 )492 .await493}node/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" }
pallets/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"]
pallets/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,
pallets/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'
pallets/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" }
pallets/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" }
pallets/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
pallets/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"]
primitives/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"]
runtime/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" }
################################################################################
runtime/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,
);