difftreelog
fix node for release
in: master
5 files changed
Cargo.lockdiffbeforeafterboth--- a/Cargo.lock
+++ b/Cargo.lock
@@ -6304,7 +6304,7 @@
[[package]]
name = "opal-runtime"
-version = "1.3.0"
+version = "1.9.0"
dependencies = [
"app-promotion-rpc",
"cumulus-pallet-aura-ext",
@@ -10188,7 +10188,7 @@
[[package]]
name = "quartz-runtime"
-version = "1.3.0"
+version = "1.9.0"
dependencies = [
"app-promotion-rpc",
"cumulus-pallet-aura-ext",
@@ -14976,7 +14976,7 @@
[[package]]
name = "unique-node"
-version = "1.3.0"
+version = "1.9.0"
dependencies = [
"app-promotion-rpc",
"clap",
@@ -15063,7 +15063,7 @@
[[package]]
name = "unique-runtime"
-version = "1.3.0"
+version = "1.9.0"
dependencies = [
"app-promotion-rpc",
"cumulus-pallet-aura-ext",
@@ -15210,7 +15210,7 @@
[[package]]
name = "up-common"
-version = "1.3.0"
+version = "1.9.0"
dependencies = [
"cumulus-primitives-core",
"fp-rpc",
node/cli/src/chain_spec.rsdiffbeforeafterboth--- a/node/cli/src/chain_spec.rs
+++ b/node/cli/src/chain_spec.rs
@@ -185,20 +185,24 @@
.collect::<Vec<_>>(),
},
- "session": {
- "keys": invulnerables.into_iter()
- .map(|name| {
- let account = get_account_id_from_seed::<sr25519::Public>(name);
- let aura = get_from_seed::<AuraId>(name);
-
- (
- /* account id: */ account.clone(),
- /* validator id: */ account,
- /* session keys: */ SessionKeys { aura },
- )
- })
- .collect::<Vec<_>>()
- },
+ // We don't have Session pallet in production anywhere,
+ // Adding this config makes baedeker think we have pallet-session, and it tries to
+ // reconfigure chain using it, which makes no sense, because then aura knows no
+ // authority, as baedeker expects them to be configured by session pallet.
+ // "session": {
+ // "keys": invulnerables.into_iter()
+ // .map(|name| {
+ // let account = get_account_id_from_seed::<sr25519::Public>(name);
+ // let aura = get_from_seed::<AuraId>(name);
+ //
+ // (
+ // /* account id: */ account.clone(),
+ // /* validator id: */ account,
+ // /* session keys: */ SessionKeys { aura },
+ // )
+ // })
+ // .collect::<Vec<_>>()
+ // },
"sudo": {
"key": get_account_id_from_seed::<sr25519::Public>("Alice"),
node/cli/src/rpc.rsdiffbeforeafterboth1// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.2// This file is part of Unique Network.34// Unique Network is free software: you can redistribute it and/or modify5// it under the terms of the GNU General Public License as published by6// the Free Software Foundation, either version 3 of the License, or7// (at your option) any later version.89// Unique Network is distributed in the hope that it will be useful,10// but WITHOUT ANY WARRANTY; without even the implied warranty of11// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the12// GNU General Public License for more details.1314// You should have received a copy of the GNU General Public License15// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.1617use std::sync::Arc;1819use fc_mapping_sync::{EthereumBlockNotification, EthereumBlockNotificationSinks};20use fc_rpc::{EthBlockDataCacheTask, EthConfig, OverrideHandle};21use fc_rpc_core::types::{FeeHistoryCache, FilterPool};22use fp_rpc::NoTransactionConverter;23use jsonrpsee::RpcModule;24use sc_client_api::{25 backend::{AuxStore, StorageProvider},26 client::BlockchainEvents,27 UsageProvider,28};29use sc_network::NetworkService;30use sc_network_sync::SyncingService;31use sc_rpc::SubscriptionTaskExecutor;32pub use sc_rpc_api::DenyUnsafe;33use sc_service::TransactionPool;34use sc_transaction_pool::{ChainApi, Pool};35use sp_api::ProvideRuntimeApi;36use sp_blockchain::{Error as BlockChainError, HeaderBackend, HeaderMetadata};37use sp_inherents::CreateInherentDataProviders;38use up_common::types::opaque::*;3940use crate::service::RuntimeApiDep;4142#[cfg(feature = "pov-estimate")]43type FullBackend = sc_service::TFullBackend<Block>;4445/// Full client dependencies.46pub struct FullDeps<C, P, SC> {47 /// The client instance to use.48 pub client: Arc<C>,49 /// Transaction pool instance.50 pub pool: Arc<P>,51 /// The SelectChain Strategy52 pub select_chain: SC,53 /// Whether to deny unsafe calls54 pub deny_unsafe: DenyUnsafe,5556 /// Runtime identification (read from the chain spec)57 pub runtime_id: RuntimeId,58 /// Executor params for PoV estimating59 #[cfg(feature = "pov-estimate")]60 pub exec_params: uc_rpc::pov_estimate::ExecutorParams,61 /// Substrate Backend.62 #[cfg(feature = "pov-estimate")]63 pub backend: Arc<FullBackend>,64}6566/// Instantiate all Full RPC extensions.67pub fn create_full<C, P, SC, R, B>(68 io: &mut RpcModule<()>,69 deps: FullDeps<C, P, SC>,70) -> Result<(), Box<dyn std::error::Error + Send + Sync>>71where72 C: ProvideRuntimeApi<Block> + StorageProvider<Block, B> + AuxStore,73 C: HeaderBackend<Block> + HeaderMetadata<Block, Error = BlockChainError>,74 C: Send + Sync + 'static,75 C: BlockchainEvents<Block>,76 C::Api: RuntimeApiDep<R>,77 B: sc_client_api::Backend<Block> + Send + Sync + 'static,78 P: TransactionPool<Block = Block> + 'static,79 R: RuntimeInstance + Send + Sync + 'static,80 <R as RuntimeInstance>::CrossAccountId: serde::Serialize,81 C: sp_api::CallApiAt<82 generic::Block<generic::Header<u32, BlakeTwo256>, sp_runtime::OpaqueExtrinsic>,83 >,84 for<'de> <R as RuntimeInstance>::CrossAccountId: serde::Deserialize<'de>,85{86 // use pallet_contracts_rpc::{Contracts, ContractsApi};87 use pallet_transaction_payment_rpc::{TransactionPayment, TransactionPaymentApiServer};88 use substrate_frame_rpc_system::{System, SystemApiServer};89 #[cfg(feature = "pov-estimate")]90 use uc_rpc::pov_estimate::{PovEstimate, PovEstimateApiServer};91 use uc_rpc::{AppPromotion, AppPromotionApiServer, Unique, UniqueApiServer};9293 let FullDeps {94 client,95 pool,96 select_chain: _,97 deny_unsafe,9899 runtime_id: _,100101 #[cfg(feature = "pov-estimate")]102 exec_params,103104 #[cfg(feature = "pov-estimate")]105 backend,106 } = deps;107108 io.merge(System::new(Arc::clone(&client), Arc::clone(&pool), deny_unsafe).into_rpc())?;109 io.merge(TransactionPayment::new(Arc::clone(&client)).into_rpc())?;110111 io.merge(Unique::new(client.clone()).into_rpc())?;112113 io.merge(AppPromotion::new(client).into_rpc())?;114115 #[cfg(feature = "pov-estimate")]116 io.merge(117 PovEstimate::new(118 client.clone(),119 backend,120 deny_unsafe,121 exec_params,122 runtime_id,123 )124 .into_rpc(),125 )?;126127 Ok(())128}129130pub struct EthDeps<C, P, CA: ChainApi, CIDP> {131 /// The client instance to use.132 pub client: Arc<C>,133 /// Transaction pool instance.134 pub pool: Arc<P>,135 /// Graph pool instance.136 pub graph: Arc<Pool<CA>>,137 /// Syncing service138 pub sync: Arc<SyncingService<Block>>,139 /// The Node authority flag140 pub is_authority: bool,141 /// Network service142 pub network: Arc<NetworkService<Block, Hash>>,143144 /// Ethereum Backend.145 pub eth_backend: Arc<dyn fc_api::Backend<Block> + Send + Sync>,146 /// Maximum number of logs in a query.147 pub max_past_logs: u32,148 /// Maximum fee history cache size.149 pub fee_history_limit: u64,150 /// Fee history cache.151 pub fee_history_cache: FeeHistoryCache,152 pub eth_block_data_cache: Arc<EthBlockDataCacheTask<Block>>,153 /// EthFilterApi pool.154 pub eth_filter_pool: Option<FilterPool>,155 pub eth_pubsub_notification_sinks:156 Arc<EthereumBlockNotificationSinks<EthereumBlockNotification<Block>>>,157 /// Whether to enable eth dev signer158 pub enable_dev_signer: bool,159160 pub overrides: Arc<OverrideHandle<Block>>,161 pub pending_create_inherent_data_providers: CIDP,162}163164pub fn create_eth<C, R, P, CA, B, CIDP, EC>(165 io: &mut RpcModule<()>,166 deps: EthDeps<C, P, CA, CIDP>,167 subscription_task_executor: SubscriptionTaskExecutor,168) -> Result<(), Box<dyn std::error::Error + Send + Sync>>169where170 C: ProvideRuntimeApi<Block> + StorageProvider<Block, B> + AuxStore,171 C: HeaderBackend<Block> + HeaderMetadata<Block, Error = BlockChainError> + 'static,172 C: Send + Sync + 'static,173 C: BlockchainEvents<Block>,174 C: UsageProvider<Block>,175 C::Api: RuntimeApiDep<R>,176 P: TransactionPool<Block = Block> + 'static,177 CA: ChainApi<Block = Block> + 'static,178 B: sc_client_api::Backend<Block> + Send + Sync + 'static,179 C: sp_api::CallApiAt<Block>,180 CIDP: CreateInherentDataProviders<Block, ()> + Send + 'static,181 EC: EthConfig<Block, C>,182 R: RuntimeInstance,183{184 use fc_rpc::{185 Eth, EthApiServer, EthDevSigner, EthFilter, EthFilterApiServer, EthPubSub,186 EthPubSubApiServer, EthSigner, Net, NetApiServer, Web3, Web3ApiServer,187 };188189 let EthDeps {190 client,191 pool,192 graph,193 eth_backend,194 max_past_logs,195 fee_history_limit,196 fee_history_cache,197 eth_block_data_cache,198 eth_filter_pool,199 eth_pubsub_notification_sinks,200 enable_dev_signer,201 sync,202 is_authority,203 network,204 overrides,205 pending_create_inherent_data_providers,206 } = deps;207208 let mut signers = Vec::new();209 if enable_dev_signer {210 signers.push(Box::new(EthDevSigner::new()) as Box<dyn EthSigner>);211 }212 let execute_gas_limit_multiplier = 10;213 io.merge(214 Eth::<_, _, _, _, _, _, _, EC>::new(215 client.clone(),216 pool.clone(),217 graph.clone(),218 // We have no runtimes old enough to only accept converted transactions.219 None::<NoTransactionConverter>,220 sync.clone(),221 signers,222 overrides.clone(),223 eth_backend.clone(),224 is_authority,225 eth_block_data_cache.clone(),226 fee_history_cache,227 fee_history_limit,228 execute_gas_limit_multiplier,229 None,230 pending_create_inherent_data_providers,231 // Our extrinsics have nothing to do with consensus digest items yet.232 None,233 )234 .into_rpc(),235 )?;236237 if let Some(filter_pool) = eth_filter_pool {238 io.merge(239 EthFilter::new(240 client.clone(),241 eth_backend,242 graph,243 filter_pool,244 500_usize, // max stored filters245 max_past_logs,246 eth_block_data_cache,247 )248 .into_rpc(),249 )?;250 }251 io.merge(252 Net::new(253 client.clone(),254 network,255 // Whether to format the `peer_count` response as Hex (default) or not.256 true,257 )258 .into_rpc(),259 )?;260 io.merge(Web3::new(client.clone()).into_rpc())?;261 io.merge(262 EthPubSub::new(263 pool,264 client,265 sync,266 subscription_task_executor,267 overrides,268 eth_pubsub_notification_sinks,269 )270 .into_rpc(),271 )?;272273 Ok(())274}1// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.2// This file is part of Unique Network.34// Unique Network is free software: you can redistribute it and/or modify5// it under the terms of the GNU General Public License as published by6// the Free Software Foundation, either version 3 of the License, or7// (at your option) any later version.89// Unique Network is distributed in the hope that it will be useful,10// but WITHOUT ANY WARRANTY; without even the implied warranty of11// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the12// GNU General Public License for more details.1314// You should have received a copy of the GNU General Public License15// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.1617use std::sync::Arc;1819use fc_mapping_sync::{EthereumBlockNotification, EthereumBlockNotificationSinks};20use fc_rpc::{EthBlockDataCacheTask, EthConfig, OverrideHandle};21use fc_rpc_core::types::{FeeHistoryCache, FilterPool};22use fp_rpc::NoTransactionConverter;23use jsonrpsee::RpcModule;24use sc_client_api::{25 backend::{AuxStore, StorageProvider},26 client::BlockchainEvents,27 UsageProvider,28};29use sc_network::NetworkService;30use sc_network_sync::SyncingService;31use sc_rpc::SubscriptionTaskExecutor;32pub use sc_rpc_api::DenyUnsafe;33use sc_service::TransactionPool;34use sc_transaction_pool::{ChainApi, Pool};35use sp_api::ProvideRuntimeApi;36use sp_blockchain::{Error as BlockChainError, HeaderBackend, HeaderMetadata};37use sp_inherents::CreateInherentDataProviders;38use up_common::types::opaque::*;3940use crate::service::RuntimeApiDep;4142#[cfg(feature = "pov-estimate")]43type FullBackend = sc_service::TFullBackend<Block>;4445/// Full client dependencies.46pub struct FullDeps<C, P> {47 /// The client instance to use.48 pub client: Arc<C>,49 /// Transaction pool instance.50 pub pool: Arc<P>,51 /// Whether to deny unsafe calls52 pub deny_unsafe: DenyUnsafe,53 /// Executor params for PoV estimating54 #[cfg(feature = "pov-estimate")]55 pub exec_params: uc_rpc::pov_estimate::ExecutorParams,56 /// Substrate Backend.57 #[cfg(feature = "pov-estimate")]58 pub backend: Arc<FullBackend>,59}6061/// Instantiate all Full RPC extensions.62pub fn create_full<C, P, R, B>(63 io: &mut RpcModule<()>,64 deps: FullDeps<C, P>,65) -> Result<(), Box<dyn std::error::Error + Send + Sync>>66where67 C: ProvideRuntimeApi<Block> + StorageProvider<Block, B> + AuxStore,68 C: HeaderBackend<Block> + HeaderMetadata<Block, Error = BlockChainError>,69 C: Send + Sync + 'static,70 C: BlockchainEvents<Block>,71 C::Api: RuntimeApiDep<R>,72 B: sc_client_api::Backend<Block> + Send + Sync + 'static,73 P: TransactionPool<Block = Block> + 'static,74 R: RuntimeInstance + Send + Sync + 'static,75 <R as RuntimeInstance>::CrossAccountId: serde::Serialize,76 C: sp_api::CallApiAt<77 generic::Block<generic::Header<u32, BlakeTwo256>, sp_runtime::OpaqueExtrinsic>,78 >,79 for<'de> <R as RuntimeInstance>::CrossAccountId: serde::Deserialize<'de>,80{81 // use pallet_contracts_rpc::{Contracts, ContractsApi};82 use pallet_transaction_payment_rpc::{TransactionPayment, TransactionPaymentApiServer};83 use substrate_frame_rpc_system::{System, SystemApiServer};84 #[cfg(feature = "pov-estimate")]85 use uc_rpc::pov_estimate::{PovEstimate, PovEstimateApiServer};86 use uc_rpc::{AppPromotion, AppPromotionApiServer, Unique, UniqueApiServer};8788 let FullDeps {89 client,90 pool,91 deny_unsafe,9293 #[cfg(feature = "pov-estimate")]94 exec_params,9596 #[cfg(feature = "pov-estimate")]97 backend,98 } = deps;99100 io.merge(System::new(Arc::clone(&client), Arc::clone(&pool), deny_unsafe).into_rpc())?;101 io.merge(TransactionPayment::new(Arc::clone(&client)).into_rpc())?;102103 io.merge(Unique::new(client.clone()).into_rpc())?;104105 io.merge(AppPromotion::new(client).into_rpc())?;106107 #[cfg(feature = "pov-estimate")]108 io.merge(109 PovEstimate::new(110 client.clone(),111 backend,112 deny_unsafe,113 exec_params,114 runtime_id,115 )116 .into_rpc(),117 )?;118119 Ok(())120}121122pub struct EthDeps<C, P, CA: ChainApi, CIDP> {123 /// The client instance to use.124 pub client: Arc<C>,125 /// Transaction pool instance.126 pub pool: Arc<P>,127 /// Graph pool instance.128 pub graph: Arc<Pool<CA>>,129 /// Syncing service130 pub sync: Arc<SyncingService<Block>>,131 /// The Node authority flag132 pub is_authority: bool,133 /// Network service134 pub network: Arc<NetworkService<Block, Hash>>,135136 /// Ethereum Backend.137 pub eth_backend: Arc<dyn fc_api::Backend<Block> + Send + Sync>,138 /// Maximum number of logs in a query.139 pub max_past_logs: u32,140 /// Maximum fee history cache size.141 pub fee_history_limit: u64,142 /// Fee history cache.143 pub fee_history_cache: FeeHistoryCache,144 pub eth_block_data_cache: Arc<EthBlockDataCacheTask<Block>>,145 /// EthFilterApi pool.146 pub eth_filter_pool: Option<FilterPool>,147 pub eth_pubsub_notification_sinks:148 Arc<EthereumBlockNotificationSinks<EthereumBlockNotification<Block>>>,149 /// Whether to enable eth dev signer150 pub enable_dev_signer: bool,151152 pub overrides: Arc<OverrideHandle<Block>>,153 pub pending_create_inherent_data_providers: CIDP,154}155156pub fn create_eth<C, R, P, CA, B, CIDP, EC>(157 io: &mut RpcModule<()>,158 deps: EthDeps<C, P, CA, CIDP>,159 subscription_task_executor: SubscriptionTaskExecutor,160) -> Result<(), Box<dyn std::error::Error + Send + Sync>>161where162 C: ProvideRuntimeApi<Block> + StorageProvider<Block, B> + AuxStore,163 C: HeaderBackend<Block> + HeaderMetadata<Block, Error = BlockChainError> + 'static,164 C: Send + Sync + 'static,165 C: BlockchainEvents<Block>,166 C: UsageProvider<Block>,167 C::Api: RuntimeApiDep<R>,168 P: TransactionPool<Block = Block> + 'static,169 CA: ChainApi<Block = Block> + 'static,170 B: sc_client_api::Backend<Block> + Send + Sync + 'static,171 C: sp_api::CallApiAt<Block>,172 CIDP: CreateInherentDataProviders<Block, ()> + Send + 'static,173 EC: EthConfig<Block, C>,174 R: RuntimeInstance,175{176 use fc_rpc::{177 Eth, EthApiServer, EthDevSigner, EthFilter, EthFilterApiServer, EthPubSub,178 EthPubSubApiServer, EthSigner, Net, NetApiServer, Web3, Web3ApiServer,179 };180181 let EthDeps {182 client,183 pool,184 graph,185 eth_backend,186 max_past_logs,187 fee_history_limit,188 fee_history_cache,189 eth_block_data_cache,190 eth_filter_pool,191 eth_pubsub_notification_sinks,192 enable_dev_signer,193 sync,194 is_authority,195 network,196 overrides,197 pending_create_inherent_data_providers,198 } = deps;199200 let mut signers = Vec::new();201 if enable_dev_signer {202 signers.push(Box::new(EthDevSigner::new()) as Box<dyn EthSigner>);203 }204 let execute_gas_limit_multiplier = 10;205 io.merge(206 Eth::<_, _, _, _, _, _, _, EC>::new(207 client.clone(),208 pool.clone(),209 graph.clone(),210 // We have no runtimes old enough to only accept converted transactions.211 None::<NoTransactionConverter>,212 sync.clone(),213 signers,214 overrides.clone(),215 eth_backend.clone(),216 is_authority,217 eth_block_data_cache.clone(),218 fee_history_cache,219 fee_history_limit,220 execute_gas_limit_multiplier,221 None,222 pending_create_inherent_data_providers,223 // Our extrinsics have nothing to do with consensus digest items yet.224 None,225 )226 .into_rpc(),227 )?;228229 if let Some(filter_pool) = eth_filter_pool {230 io.merge(231 EthFilter::new(232 client.clone(),233 eth_backend,234 graph,235 filter_pool,236 500_usize, // max stored filters237 max_past_logs,238 eth_block_data_cache,239 )240 .into_rpc(),241 )?;242 }243 io.merge(244 Net::new(245 client.clone(),246 network,247 // Whether to format the `peer_count` response as Hex (default) or not.248 true,249 )250 .into_rpc(),251 )?;252 io.merge(Web3::new(client.clone()).into_rpc())?;253 io.merge(254 EthPubSub::new(255 pool,256 client,257 sync,258 subscription_task_executor,259 overrides,260 eth_pubsub_notification_sinks,261 )262 .into_rpc(),263 )?;264265 Ok(())266}node/cli/src/service.rsdiffbeforeafterboth--- a/node/cli/src/service.rs
+++ b/node/cli/src/service.rs
@@ -36,8 +36,8 @@
use cumulus_client_consensus_common::ParachainBlockImport as TParachainBlockImport;
use cumulus_client_consensus_proposer::Proposer;
use cumulus_client_service::{
- build_relay_chain_interface, prepare_node_config, start_relay_chain_tasks, DARecoveryProfile,
- StartRelayChainTasksParams,
+ build_relay_chain_interface, prepare_node_config, start_relay_chain_tasks,
+ CollatorSybilResistance, DARecoveryProfile, StartRelayChainTasksParams,
};
use cumulus_primitives_core::ParaId;
use cumulus_primitives_parachain_inherent::ParachainInherentData;
@@ -85,10 +85,7 @@
use cumulus_primitives_core::PersistedValidationData;
use cumulus_test_relay_sproof_builder::RelayStateSproofBuilder;
-use crate::{
- chain_spec::RuntimeIdentification,
- rpc::{create_eth, create_full, EthDeps, FullDeps},
-};
+use crate::rpc::{create_eth, create_full, EthDeps, FullDeps};
/// Unique native executor instance.
#[cfg(feature = "unique-runtime")]
@@ -238,7 +235,7 @@
pub trait LookaheadApiDep: cumulus_primitives_aura::AuraUnincludedSegmentApi<Block> {}
);
-fn ethereum_parachain_inherent() -> ParachainInherentData {
+fn ethereum_parachain_inherent() -> (sp_timestamp::InherentDataProvider, ParachainInherentData) {
let (relay_parent_storage_root, relay_chain_state) =
RelayStateSproofBuilder::default().into_state_root_and_proof();
let vfp = PersistedValidationData {
@@ -249,12 +246,15 @@
..Default::default()
};
- ParachainInherentData {
- validation_data: vfp,
- relay_chain_state,
- downward_messages: Default::default(),
- horizontal_messages: Default::default(),
- }
+ (
+ sp_timestamp::InherentDataProvider::from_system_time(),
+ ParachainInherentData {
+ validation_data: vfp,
+ relay_chain_state,
+ downward_messages: Default::default(),
+ horizontal_messages: Default::default(),
+ },
+ )
}
/// Starts a `ServiceBuilder` for a full service.
@@ -426,34 +426,26 @@
.await
.map_err(|e| sc_service::Error::Application(Box::new(e) as Box<_>))?;
- // Aura is sybil-resistant, collator-selection is generally too.
- let block_announce_validator =
- cumulus_client_network::AssumeSybilResistance::allow_seconded_messages();
-
let validator = parachain_config.role.is_authority();
let prometheus_registry = parachain_config.prometheus_registry().cloned();
let transaction_pool = params.transaction_pool.clone();
let import_queue_service = params.import_queue.service();
let (network, system_rpc_tx, tx_handler_controller, start_network, sync_service) =
- sc_service::build_network(sc_service::BuildNetworkParams {
- config: ¶chain_config,
+ cumulus_client_service::build_network(cumulus_client_service::BuildNetworkParams {
+ parachain_config: ¶chain_config,
net_config,
client: client.clone(),
transaction_pool: transaction_pool.clone(),
+ para_id,
spawn_handle: task_manager.spawn_handle(),
+ relay_chain_interface: relay_chain_interface.clone(),
import_queue: params.import_queue,
- block_announce_validator_builder: Some(Box::new(|_| {
- Box::new(block_announce_validator)
- })),
- warp_sync_params: None,
- block_relay: None,
- })?;
-
- let select_chain = params.select_chain.clone();
+ // Aura is sybil-resistant, collator-selection is generally too.
+ sybil_resistance_level: CollatorSybilResistance::Resistant,
+ })
+ .await?;
- let runtime_id = parachain_config.chain_spec.runtime_id();
-
// Frontier
let fee_history_cache: FeeHistoryCache = Arc::new(Mutex::new(BTreeMap::new()));
let fee_history_limit = 2048;
@@ -505,9 +497,7 @@
fee_history_cache,
eth_block_data_cache,
network,
- runtime_id,
transaction_pool,
- select_chain,
overrides,
);
@@ -518,7 +508,6 @@
let full_deps = FullDeps {
client: client.clone(),
- runtime_id,
#[cfg(feature = "pov-estimate")]
exec_params: uc_rpc::pov_estimate::ExecutorParams {
@@ -533,10 +522,9 @@
deny_unsafe,
pool: transaction_pool.clone(),
- select_chain,
};
- create_full::<_, _, _, Runtime, _>(&mut rpc_handle, full_deps)?;
+ create_full::<_, _, Runtime, _>(&mut rpc_handle, full_deps)?;
let eth_deps = EthDeps {
client,
@@ -557,7 +545,7 @@
overrides,
sync: sync_service.clone(),
pending_create_inherent_data_providers: |_, ()| async move {
- Ok((ethereum_parachain_inherent(),))
+ Ok(ethereum_parachain_inherent())
},
};
@@ -1040,8 +1028,6 @@
#[cfg(feature = "pov-estimate")]
let rpc_backend = backend.clone();
-
- let runtime_id = config.chain_spec.runtime_id();
// Frontier
let fee_history_cache: FeeHistoryCache = Arc::new(Mutex::new(BTreeMap::new()));
@@ -1094,9 +1080,7 @@
fee_history_cache,
eth_block_data_cache,
network,
- runtime_id,
transaction_pool,
- select_chain,
overrides,
);
@@ -1106,8 +1090,6 @@
let mut rpc_module = RpcModule::new(());
let full_deps = FullDeps {
- runtime_id,
-
#[cfg(feature = "pov-estimate")]
exec_params: uc_rpc::pov_estimate::ExecutorParams {
wasm_method: config.wasm_method,
@@ -1122,10 +1104,9 @@
deny_unsafe,
client: client.clone(),
pool: transaction_pool.clone(),
- select_chain,
};
- create_full::<_, _, _, Runtime, _>(&mut rpc_module, full_deps)?;
+ create_full::<_, _, Runtime, _>(&mut rpc_module, full_deps)?;
let eth_deps = EthDeps {
client,
@@ -1147,7 +1128,7 @@
sync: sync_service.clone(),
// We don't have any inherents except parachain built-ins, which we can't even extract from inside `run_aura`.
pending_create_inherent_data_providers: |_, ()| async move {
- Ok((ethereum_parachain_inherent(),))
+ Ok(ethereum_parachain_inherent())
},
};
runtime/common/config/substrate.rsdiffbeforeafterboth--- a/runtime/common/config/substrate.rs
+++ b/runtime/common/config/substrate.rs
@@ -15,6 +15,7 @@
// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
use frame_support::{
+ derive_impl,
dispatch::DispatchClass,
ord_parameter_types, parameter_types,
traits::{
@@ -42,8 +43,8 @@
use crate::{
runtime_common::DealWithFees, Balances, Block, OriginCaller, PalletInfo, Runtime, RuntimeCall,
- RuntimeEvent, RuntimeFreezeReason, RuntimeHoldReason, RuntimeOrigin, SS58Prefix, System,
- Treasury, Version,
+ RuntimeEvent, RuntimeFreezeReason, RuntimeHoldReason, RuntimeOrigin, RuntimeTask, SS58Prefix,
+ System, Treasury, Version,
};
parameter_types! {
@@ -72,13 +73,12 @@
.build_or_panic();
}
+#[derive_impl(frame_system::config_preludes::ParaChainDefaultConfig as frame_system::DefaultConfig)]
impl frame_system::Config for Runtime {
/// The data to be stored in an account.
type AccountData = pallet_balances::AccountData<Balance>;
/// The identifier used to distinguish between accounts.
type AccountId = AccountId;
- /// The basic call filter to use in dispatchable.
- type BaseCallFilter = Everything;
/// Maximum number of block number to block hash mappings to keep (oldest pruned first).
type BlockHashCount = BlockHashCount;
/// The block type.
@@ -87,12 +87,8 @@
type BlockLength = RuntimeBlockLength;
/// The weight of the overhead invoked on the block import process, independent of the extrinsics included in that block.
type BlockWeights = RuntimeBlockWeights;
- /// The aggregated dispatch type that is available for extrinsics.
- type RuntimeCall = RuntimeCall;
/// The weight of database operations that the runtime can invoke.
type DbWeight = RocksDbWeight;
- /// The ubiquitous event type.
- type RuntimeEvent = RuntimeEvent;
/// The type for hashing blocks and tries.
type Hash = Hash;
/// The hashing algorithm used.
@@ -101,10 +97,6 @@
type Nonce = Nonce;
/// The lookup mechanism to get account ID from whatever is passed in dispatchers.
type Lookup = AccountIdLookup<AccountId, ()>;
- /// What to do if an account is fully reaped from the system.
- type OnKilledAccount = ();
- /// What to do if a new account is created.
- type OnNewAccount = ();
type OnSetCode = cumulus_pallet_parachain_system::ParachainSetCode<Self>;
/// The ubiquitous origin type.
type RuntimeOrigin = RuntimeOrigin;
@@ -117,14 +109,6 @@
/// Version of the runtime.
type Version = Version;
type MaxConsumers = ConstU32<16>;
-
- type RuntimeTask = ();
-
- type SingleBlockMigrations = ();
- type MultiBlockMigrator = ();
- type PreInherents = ();
- type PostInherents = ();
- type PostTransactions = ();
}
parameter_types! {