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.rsdiffbeforeafterboth--- a/node/cli/src/rpc.rs
+++ b/node/cli/src/rpc.rs
@@ -43,18 +43,13 @@
type FullBackend = sc_service::TFullBackend<Block>;
/// Full client dependencies.
-pub struct FullDeps<C, P, SC> {
+pub struct FullDeps<C, P> {
/// The client instance to use.
pub client: Arc<C>,
/// Transaction pool instance.
pub pool: Arc<P>,
- /// The SelectChain Strategy
- pub select_chain: SC,
/// Whether to deny unsafe calls
pub deny_unsafe: DenyUnsafe,
-
- /// Runtime identification (read from the chain spec)
- pub runtime_id: RuntimeId,
/// Executor params for PoV estimating
#[cfg(feature = "pov-estimate")]
pub exec_params: uc_rpc::pov_estimate::ExecutorParams,
@@ -64,9 +59,9 @@
}
/// Instantiate all Full RPC extensions.
-pub fn create_full<C, P, SC, R, B>(
+pub fn create_full<C, P, R, B>(
io: &mut RpcModule<()>,
- deps: FullDeps<C, P, SC>,
+ deps: FullDeps<C, P>,
) -> Result<(), Box<dyn std::error::Error + Send + Sync>>
where
C: ProvideRuntimeApi<Block> + StorageProvider<Block, B> + AuxStore,
@@ -93,10 +88,7 @@
let FullDeps {
client,
pool,
- select_chain: _,
deny_unsafe,
-
- runtime_id: _,
#[cfg(feature = "pov-estimate")]
exec_params,
node/cli/src/service.rsdiffbeforeafterboth37use cumulus_client_consensus_proposer::Proposer;37use cumulus_client_consensus_proposer::Proposer;38use cumulus_client_service::{38use cumulus_client_service::{39 build_relay_chain_interface, prepare_node_config, start_relay_chain_tasks, DARecoveryProfile,39 build_relay_chain_interface, prepare_node_config, start_relay_chain_tasks,40 StartRelayChainTasksParams,40 CollatorSybilResistance, DARecoveryProfile, StartRelayChainTasksParams,41};41};42use cumulus_primitives_core::ParaId;42use cumulus_primitives_core::ParaId;43use cumulus_primitives_parachain_inherent::ParachainInherentData;43use cumulus_primitives_parachain_inherent::ParachainInherentData;85use cumulus_primitives_core::PersistedValidationData;85use cumulus_primitives_core::PersistedValidationData;86use cumulus_test_relay_sproof_builder::RelayStateSproofBuilder;86use cumulus_test_relay_sproof_builder::RelayStateSproofBuilder;878788use crate::{88use crate::rpc::{create_eth, create_full, EthDeps, FullDeps};89 chain_spec::RuntimeIdentification,90 rpc::{create_eth, create_full, EthDeps, FullDeps},91};928993/// Unique native executor instance.90/// Unique native executor instance.94#[cfg(feature = "unique-runtime")]91#[cfg(feature = "unique-runtime")]238 pub trait LookaheadApiDep: cumulus_primitives_aura::AuraUnincludedSegmentApi<Block> {}235 pub trait LookaheadApiDep: cumulus_primitives_aura::AuraUnincludedSegmentApi<Block> {}239);236);240237241fn ethereum_parachain_inherent() -> ParachainInherentData {238fn ethereum_parachain_inherent() -> (sp_timestamp::InherentDataProvider, ParachainInherentData) {242 let (relay_parent_storage_root, relay_chain_state) =239 let (relay_parent_storage_root, relay_chain_state) =243 RelayStateSproofBuilder::default().into_state_root_and_proof();240 RelayStateSproofBuilder::default().into_state_root_and_proof();244 let vfp = PersistedValidationData {241 let vfp = PersistedValidationData {249 ..Default::default()246 ..Default::default()250 };247 };251248249 (250 sp_timestamp::InherentDataProvider::from_system_time(),252 ParachainInherentData {251 ParachainInherentData {253 validation_data: vfp,252 validation_data: vfp,254 relay_chain_state,253 relay_chain_state,255 downward_messages: Default::default(),254 downward_messages: Default::default(),256 horizontal_messages: Default::default(),255 horizontal_messages: Default::default(),257 }256 },257 )258}258}259259260/// Starts a `ServiceBuilder` for a full service.260/// Starts a `ServiceBuilder` for a full service.426 .await426 .await427 .map_err(|e| sc_service::Error::Application(Box::new(e) as Box<_>))?;427 .map_err(|e| sc_service::Error::Application(Box::new(e) as Box<_>))?;428429 // Aura is sybil-resistant, collator-selection is generally too.430 let block_announce_validator =431 cumulus_client_network::AssumeSybilResistance::allow_seconded_messages();432428433 let validator = parachain_config.role.is_authority();429 let validator = parachain_config.role.is_authority();434 let prometheus_registry = parachain_config.prometheus_registry().cloned();430 let prometheus_registry = parachain_config.prometheus_registry().cloned();435 let transaction_pool = params.transaction_pool.clone();431 let transaction_pool = params.transaction_pool.clone();436 let import_queue_service = params.import_queue.service();432 let import_queue_service = params.import_queue.service();437433438 let (network, system_rpc_tx, tx_handler_controller, start_network, sync_service) =434 let (network, system_rpc_tx, tx_handler_controller, start_network, sync_service) =439 sc_service::build_network(sc_service::BuildNetworkParams {435 cumulus_client_service::build_network(cumulus_client_service::BuildNetworkParams {440 config: ¶chain_config,436 parachain_config: ¶chain_config,441 net_config,437 net_config,442 client: client.clone(),438 client: client.clone(),443 transaction_pool: transaction_pool.clone(),439 transaction_pool: transaction_pool.clone(),440 para_id,444 spawn_handle: task_manager.spawn_handle(),441 spawn_handle: task_manager.spawn_handle(),442 relay_chain_interface: relay_chain_interface.clone(),445 import_queue: params.import_queue,443 import_queue: params.import_queue,444 // Aura is sybil-resistant, collator-selection is generally too.446 block_announce_validator_builder: Some(Box::new(|_| {445 sybil_resistance_level: CollatorSybilResistance::Resistant,447 Box::new(block_announce_validator)448 })),449 warp_sync_params: None,450 block_relay: None,451 })?;446 })452447 .await?;453 let select_chain = params.select_chain.clone();454455 let runtime_id = parachain_config.chain_spec.runtime_id();456448457 // Frontier449 // Frontier458 let fee_history_cache: FeeHistoryCache = Arc::new(Mutex::new(BTreeMap::new()));450 let fee_history_cache: FeeHistoryCache = Arc::new(Mutex::new(BTreeMap::new()));505 fee_history_cache,497 fee_history_cache,506 eth_block_data_cache,498 eth_block_data_cache,507 network,499 network,508 runtime_id,509 transaction_pool,500 transaction_pool,510 select_chain,511 overrides,501 overrides,512 );502 );513503518508519 let full_deps = FullDeps {509 let full_deps = FullDeps {520 client: client.clone(),510 client: client.clone(),521 runtime_id,522511523 #[cfg(feature = "pov-estimate")]512 #[cfg(feature = "pov-estimate")]524 exec_params: uc_rpc::pov_estimate::ExecutorParams {513 exec_params: uc_rpc::pov_estimate::ExecutorParams {533522534 deny_unsafe,523 deny_unsafe,535 pool: transaction_pool.clone(),524 pool: transaction_pool.clone(),536 select_chain,537 };525 };538526539 create_full::<_, _, _, Runtime, _>(&mut rpc_handle, full_deps)?;527 create_full::<_, _, Runtime, _>(&mut rpc_handle, full_deps)?;540528541 let eth_deps = EthDeps {529 let eth_deps = EthDeps {542 client,530 client,557 overrides,545 overrides,558 sync: sync_service.clone(),546 sync: sync_service.clone(),559 pending_create_inherent_data_providers: |_, ()| async move {547 pending_create_inherent_data_providers: |_, ()| async move {560 Ok((ethereum_parachain_inherent(),))548 Ok(ethereum_parachain_inherent())561 },549 },562 };550 };5635511041 #[cfg(feature = "pov-estimate")]1029 #[cfg(feature = "pov-estimate")]1042 let rpc_backend = backend.clone();1030 let rpc_backend = backend.clone();10431044 let runtime_id = config.chain_spec.runtime_id();104510311046 // Frontier1032 // Frontier1047 let fee_history_cache: FeeHistoryCache = Arc::new(Mutex::new(BTreeMap::new()));1033 let fee_history_cache: FeeHistoryCache = Arc::new(Mutex::new(BTreeMap::new()));1094 fee_history_cache,1080 fee_history_cache,1095 eth_block_data_cache,1081 eth_block_data_cache,1096 network,1082 network,1097 runtime_id,1098 transaction_pool,1083 transaction_pool,1099 select_chain,1100 overrides,1084 overrides,1101 );1085 );110210861106 let mut rpc_module = RpcModule::new(());1090 let mut rpc_module = RpcModule::new(());110710911108 let full_deps = FullDeps {1092 let full_deps = FullDeps {1109 runtime_id,11101111 #[cfg(feature = "pov-estimate")]1093 #[cfg(feature = "pov-estimate")]1112 exec_params: uc_rpc::pov_estimate::ExecutorParams {1094 exec_params: uc_rpc::pov_estimate::ExecutorParams {1122 deny_unsafe,1104 deny_unsafe,1123 client: client.clone(),1105 client: client.clone(),1124 pool: transaction_pool.clone(),1106 pool: transaction_pool.clone(),1125 select_chain,1126 };1107 };112711081128 create_full::<_, _, _, Runtime, _>(&mut rpc_module, full_deps)?;1109 create_full::<_, _, Runtime, _>(&mut rpc_module, full_deps)?;112911101130 let eth_deps = EthDeps {1111 let eth_deps = EthDeps {1131 client,1112 client,1147 sync: sync_service.clone(),1128 sync: sync_service.clone(),1148 // We don't have any inherents except parachain built-ins, which we can't even extract from inside `run_aura`.1129 // We don't have any inherents except parachain built-ins, which we can't even extract from inside `run_aura`.1149 pending_create_inherent_data_providers: |_, ()| async move {1130 pending_create_inherent_data_providers: |_, ()| async move {1150 Ok((ethereum_parachain_inherent(),))1131 Ok(ethereum_parachain_inherent())1151 },1132 },1152 };1133 };11531134runtime/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! {