mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 04:41:03 +00:00
Companion for paritytech/substrate#12219 (#1610)
* Remove CanAuthorWith trait CanAuthotWith trait removed. Also all dependencies, parameters, type paramers were removed. This is related to removal of native runtime. * Companion for paritytech/substrate#12219 * Fixes * polkadot-runtime-common updated cargo update -p polkadot-runtime-common * warning fixed * Update cid * update lockfile for {"polkadot", "substrate"} * Update substrate * update lockfile for {"polkadot", "substrate"} * Update polkadot * Fix tests * 🤦 Co-authored-by: Michal Kucharczyk <1728078+michalkucharczyk@users.noreply.github.com> Co-authored-by: parity-processbot <> Co-authored-by: Bastian Köcher <info@kchr.de>
This commit is contained in:
Generated
+407
-287
File diff suppressed because it is too large
Load Diff
@@ -25,7 +25,7 @@ use sc_telemetry::TelemetryHandle;
|
|||||||
use sp_api::{ApiExt, ProvideRuntimeApi};
|
use sp_api::{ApiExt, ProvideRuntimeApi};
|
||||||
use sp_block_builder::BlockBuilder as BlockBuilderApi;
|
use sp_block_builder::BlockBuilder as BlockBuilderApi;
|
||||||
use sp_blockchain::HeaderBackend;
|
use sp_blockchain::HeaderBackend;
|
||||||
use sp_consensus::{CanAuthorWith, Error as ConsensusError};
|
use sp_consensus::Error as ConsensusError;
|
||||||
use sp_consensus_aura::AuraApi;
|
use sp_consensus_aura::AuraApi;
|
||||||
use sp_core::crypto::Pair;
|
use sp_core::crypto::Pair;
|
||||||
use sp_inherents::CreateInherentDataProviders;
|
use sp_inherents::CreateInherentDataProviders;
|
||||||
@@ -34,7 +34,7 @@ use std::{fmt::Debug, hash::Hash, sync::Arc};
|
|||||||
use substrate_prometheus_endpoint::Registry;
|
use substrate_prometheus_endpoint::Registry;
|
||||||
|
|
||||||
/// Parameters of [`import_queue`].
|
/// Parameters of [`import_queue`].
|
||||||
pub struct ImportQueueParams<'a, I, C, CIDP, S, CAW> {
|
pub struct ImportQueueParams<'a, I, C, CIDP, S> {
|
||||||
/// The block import to use.
|
/// The block import to use.
|
||||||
pub block_import: I,
|
pub block_import: I,
|
||||||
/// The client to interact with the chain.
|
/// The client to interact with the chain.
|
||||||
@@ -45,23 +45,20 @@ pub struct ImportQueueParams<'a, I, C, CIDP, S, CAW> {
|
|||||||
pub spawner: &'a S,
|
pub spawner: &'a S,
|
||||||
/// The prometheus registry.
|
/// The prometheus registry.
|
||||||
pub registry: Option<&'a Registry>,
|
pub registry: Option<&'a Registry>,
|
||||||
/// Can we author with the current node?
|
|
||||||
pub can_author_with: CAW,
|
|
||||||
/// The telemetry handle.
|
/// The telemetry handle.
|
||||||
pub telemetry: Option<TelemetryHandle>,
|
pub telemetry: Option<TelemetryHandle>,
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Start an import queue for the Aura consensus algorithm.
|
/// Start an import queue for the Aura consensus algorithm.
|
||||||
pub fn import_queue<'a, P, Block, I, C, S, CAW, CIDP>(
|
pub fn import_queue<'a, P, Block, I, C, S, CIDP>(
|
||||||
ImportQueueParams {
|
ImportQueueParams {
|
||||||
block_import,
|
block_import,
|
||||||
client,
|
client,
|
||||||
create_inherent_data_providers,
|
create_inherent_data_providers,
|
||||||
spawner,
|
spawner,
|
||||||
registry,
|
registry,
|
||||||
can_author_with,
|
|
||||||
telemetry,
|
telemetry,
|
||||||
}: ImportQueueParams<'a, I, C, CIDP, S, CAW>,
|
}: ImportQueueParams<'a, I, C, CIDP, S>,
|
||||||
) -> Result<DefaultImportQueue<Block, C>, sp_consensus::Error>
|
) -> Result<DefaultImportQueue<Block, C>, sp_consensus::Error>
|
||||||
where
|
where
|
||||||
Block: BlockT,
|
Block: BlockT,
|
||||||
@@ -82,48 +79,41 @@ where
|
|||||||
P::Public: Clone + Eq + Send + Sync + Hash + Debug + Codec,
|
P::Public: Clone + Eq + Send + Sync + Hash + Debug + Codec,
|
||||||
P::Signature: Codec,
|
P::Signature: Codec,
|
||||||
S: sp_core::traits::SpawnEssentialNamed,
|
S: sp_core::traits::SpawnEssentialNamed,
|
||||||
CAW: CanAuthorWith<Block> + Send + Sync + 'static,
|
|
||||||
CIDP: CreateInherentDataProviders<Block, ()> + Sync + Send + 'static,
|
CIDP: CreateInherentDataProviders<Block, ()> + Sync + Send + 'static,
|
||||||
CIDP::InherentDataProviders: InherentDataProviderExt + Send + Sync,
|
CIDP::InherentDataProviders: InherentDataProviderExt + Send + Sync,
|
||||||
{
|
{
|
||||||
sc_consensus_aura::import_queue::<P, _, _, _, _, _, _>(sc_consensus_aura::ImportQueueParams {
|
sc_consensus_aura::import_queue::<P, _, _, _, _, _>(sc_consensus_aura::ImportQueueParams {
|
||||||
block_import: cumulus_client_consensus_common::ParachainBlockImport::new(block_import),
|
block_import: cumulus_client_consensus_common::ParachainBlockImport::new(block_import),
|
||||||
justification_import: None,
|
justification_import: None,
|
||||||
client,
|
client,
|
||||||
create_inherent_data_providers,
|
create_inherent_data_providers,
|
||||||
spawner,
|
spawner,
|
||||||
registry,
|
registry,
|
||||||
can_author_with,
|
|
||||||
check_for_equivocation: sc_consensus_aura::CheckForEquivocation::No,
|
check_for_equivocation: sc_consensus_aura::CheckForEquivocation::No,
|
||||||
telemetry,
|
telemetry,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Parameters of [`build_verifier`].
|
/// Parameters of [`build_verifier`].
|
||||||
pub struct BuildVerifierParams<C, CIDP, CAW> {
|
pub struct BuildVerifierParams<C, CIDP> {
|
||||||
/// The client to interact with the chain.
|
/// The client to interact with the chain.
|
||||||
pub client: Arc<C>,
|
pub client: Arc<C>,
|
||||||
/// The inherent data providers, to create the inherent data.
|
/// The inherent data providers, to create the inherent data.
|
||||||
pub create_inherent_data_providers: CIDP,
|
pub create_inherent_data_providers: CIDP,
|
||||||
/// Can we author with the current node?
|
|
||||||
pub can_author_with: CAW,
|
|
||||||
/// The telemetry handle.
|
/// The telemetry handle.
|
||||||
pub telemetry: Option<TelemetryHandle>,
|
pub telemetry: Option<TelemetryHandle>,
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Build the [`AuraVerifier`].
|
/// Build the [`AuraVerifier`].
|
||||||
pub fn build_verifier<P, C, CIDP, CAW>(
|
pub fn build_verifier<P, C, CIDP>(
|
||||||
BuildVerifierParams {
|
BuildVerifierParams { client, create_inherent_data_providers, telemetry }: BuildVerifierParams<
|
||||||
client,
|
C,
|
||||||
create_inherent_data_providers,
|
CIDP,
|
||||||
can_author_with,
|
>,
|
||||||
telemetry,
|
) -> AuraVerifier<C, P, CIDP> {
|
||||||
}: BuildVerifierParams<C, CIDP, CAW>,
|
|
||||||
) -> AuraVerifier<C, P, CAW, CIDP> {
|
|
||||||
sc_consensus_aura::build_verifier(sc_consensus_aura::BuildVerifierParams {
|
sc_consensus_aura::build_verifier(sc_consensus_aura::BuildVerifierParams {
|
||||||
client,
|
client,
|
||||||
create_inherent_data_providers,
|
create_inherent_data_providers,
|
||||||
can_author_with,
|
|
||||||
telemetry,
|
telemetry,
|
||||||
check_for_equivocation: sc_consensus_aura::CheckForEquivocation::No,
|
check_for_equivocation: sc_consensus_aura::CheckForEquivocation::No,
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -77,7 +77,7 @@ pub mod pallet {
|
|||||||
pub use crate::weights::WeightInfo;
|
pub use crate::weights::WeightInfo;
|
||||||
use core::ops::Div;
|
use core::ops::Div;
|
||||||
use frame_support::{
|
use frame_support::{
|
||||||
dispatch::DispatchResultWithPostInfo,
|
dispatch::{DispatchClass, DispatchResultWithPostInfo},
|
||||||
inherent::Vec,
|
inherent::Vec,
|
||||||
pallet_prelude::*,
|
pallet_prelude::*,
|
||||||
sp_runtime::{
|
sp_runtime::{
|
||||||
@@ -88,7 +88,6 @@ pub mod pallet {
|
|||||||
Currency, EnsureOrigin, ExistenceRequirement::KeepAlive, ReservableCurrency,
|
Currency, EnsureOrigin, ExistenceRequirement::KeepAlive, ReservableCurrency,
|
||||||
ValidatorRegistration,
|
ValidatorRegistration,
|
||||||
},
|
},
|
||||||
weights::DispatchClass,
|
|
||||||
BoundedVec, PalletId,
|
BoundedVec, PalletId,
|
||||||
};
|
};
|
||||||
use frame_system::{pallet_prelude::*, Config as SystemConfig};
|
use frame_system::{pallet_prelude::*, Config as SystemConfig};
|
||||||
|
|||||||
@@ -24,7 +24,8 @@
|
|||||||
use codec::{Decode, DecodeLimit, Encode};
|
use codec::{Decode, DecodeLimit, Encode};
|
||||||
use cumulus_primitives_core::{relay_chain::BlockNumber as RelayBlockNumber, DmpMessageHandler};
|
use cumulus_primitives_core::{relay_chain::BlockNumber as RelayBlockNumber, DmpMessageHandler};
|
||||||
use frame_support::{
|
use frame_support::{
|
||||||
dispatch::Weight, traits::EnsureOrigin, weights::constants::WEIGHT_PER_MILLIS,
|
traits::EnsureOrigin,
|
||||||
|
weights::{constants::WEIGHT_PER_MILLIS, Weight},
|
||||||
};
|
};
|
||||||
pub use pallet::*;
|
pub use pallet::*;
|
||||||
use scale_info::TypeInfo;
|
use scale_info::TypeInfo;
|
||||||
@@ -760,7 +761,7 @@ mod tests {
|
|||||||
super::Call::<Test>::service_overweight { index: 0, weight_limit: Weight::zero() }
|
super::Call::<Test>::service_overweight { index: 0, weight_limit: Weight::zero() }
|
||||||
.get_dispatch_info()
|
.get_dispatch_info()
|
||||||
.weight;
|
.weight;
|
||||||
use frame_support::weights::GetDispatchInfo;
|
use frame_support::dispatch::GetDispatchInfo;
|
||||||
let info =
|
let info =
|
||||||
DmpQueue::service_overweight(Origin::root(), 0, Weight::from_ref_time(20000))
|
DmpQueue::service_overweight(Origin::root(), 0, Weight::from_ref_time(20000))
|
||||||
.unwrap();
|
.unwrap();
|
||||||
|
|||||||
@@ -36,12 +36,12 @@ use cumulus_primitives_core::{
|
|||||||
};
|
};
|
||||||
use cumulus_primitives_parachain_inherent::{MessageQueueChain, ParachainInherentData};
|
use cumulus_primitives_parachain_inherent::{MessageQueueChain, ParachainInherentData};
|
||||||
use frame_support::{
|
use frame_support::{
|
||||||
dispatch::{DispatchError, DispatchResult},
|
dispatch::{DispatchError, DispatchResult, Pays, PostDispatchInfo},
|
||||||
ensure,
|
ensure,
|
||||||
inherent::{InherentData, InherentIdentifier, ProvideInherent},
|
inherent::{InherentData, InherentIdentifier, ProvideInherent},
|
||||||
storage,
|
storage,
|
||||||
traits::Get,
|
traits::Get,
|
||||||
weights::{Pays, PostDispatchInfo, Weight},
|
weights::Weight,
|
||||||
};
|
};
|
||||||
use frame_system::{ensure_none, ensure_root};
|
use frame_system::{ensure_none, ensure_root};
|
||||||
use polkadot_parachain::primitives::RelayChainBlockNumber;
|
use polkadot_parachain::primitives::RelayChainBlockNumber;
|
||||||
|
|||||||
@@ -18,7 +18,10 @@
|
|||||||
|
|
||||||
use codec::{Decode, Encode};
|
use codec::{Decode, Encode};
|
||||||
use cumulus_pallet_parachain_system as parachain_system;
|
use cumulus_pallet_parachain_system as parachain_system;
|
||||||
use frame_support::{dispatch::DispatchResult, pallet_prelude::*, weights::DispatchInfo};
|
use frame_support::{
|
||||||
|
dispatch::{DispatchInfo, DispatchResult},
|
||||||
|
pallet_prelude::*,
|
||||||
|
};
|
||||||
use frame_system::pallet_prelude::*;
|
use frame_system::pallet_prelude::*;
|
||||||
pub use pallet::*;
|
pub use pallet::*;
|
||||||
use polkadot_primitives::v2::PersistedValidationData;
|
use polkadot_primitives::v2::PersistedValidationData;
|
||||||
|
|||||||
@@ -25,7 +25,6 @@ use cumulus_relay_chain_interface::{RelayChainError, RelayChainInterface, RelayC
|
|||||||
use cumulus_relay_chain_rpc_interface::{create_client_and_start_worker, RelayChainRpcInterface};
|
use cumulus_relay_chain_rpc_interface::{create_client_and_start_worker, RelayChainRpcInterface};
|
||||||
|
|
||||||
// Substrate Imports
|
// Substrate Imports
|
||||||
use sc_client_api::ExecutorProvider;
|
|
||||||
use sc_executor::NativeElseWasmExecutor;
|
use sc_executor::NativeElseWasmExecutor;
|
||||||
use sc_network::NetworkService;
|
use sc_network::NetworkService;
|
||||||
use sc_network_common::service::NetworkBlock;
|
use sc_network_common::service::NetworkBlock;
|
||||||
@@ -424,7 +423,6 @@ pub fn parachain_build_import_queue(
|
|||||||
_,
|
_,
|
||||||
_,
|
_,
|
||||||
_,
|
_,
|
||||||
_,
|
|
||||||
>(cumulus_client_consensus_aura::ImportQueueParams {
|
>(cumulus_client_consensus_aura::ImportQueueParams {
|
||||||
block_import: client.clone(),
|
block_import: client.clone(),
|
||||||
client: client.clone(),
|
client: client.clone(),
|
||||||
@@ -440,7 +438,6 @@ pub fn parachain_build_import_queue(
|
|||||||
Ok((time, slot))
|
Ok((time, slot))
|
||||||
},
|
},
|
||||||
registry: config.prometheus_registry(),
|
registry: config.prometheus_registry(),
|
||||||
can_author_with: sp_consensus::CanAuthorWithNativeVersion::new(client.executor().clone()),
|
|
||||||
spawner: &task_manager.spawn_essential_handle(),
|
spawner: &task_manager.spawn_essential_handle(),
|
||||||
telemetry,
|
telemetry,
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -26,11 +26,13 @@ use sp_version::NativeVersion;
|
|||||||
use sp_version::RuntimeVersion;
|
use sp_version::RuntimeVersion;
|
||||||
|
|
||||||
use frame_support::{
|
use frame_support::{
|
||||||
construct_runtime, parameter_types,
|
construct_runtime,
|
||||||
|
dispatch::DispatchClass,
|
||||||
|
parameter_types,
|
||||||
traits::Everything,
|
traits::Everything,
|
||||||
weights::{
|
weights::{
|
||||||
constants::WEIGHT_PER_SECOND, ConstantMultiplier, DispatchClass, Weight,
|
constants::WEIGHT_PER_SECOND, ConstantMultiplier, Weight, WeightToFeeCoefficient,
|
||||||
WeightToFeeCoefficient, WeightToFeeCoefficients, WeightToFeePolynomial,
|
WeightToFeeCoefficients, WeightToFeePolynomial,
|
||||||
},
|
},
|
||||||
PalletId,
|
PalletId,
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -46,9 +46,11 @@ use sp_version::RuntimeVersion;
|
|||||||
use codec::{Decode, Encode, MaxEncodedLen};
|
use codec::{Decode, Encode, MaxEncodedLen};
|
||||||
use constants::{currency::*, fee::WeightToFee};
|
use constants::{currency::*, fee::WeightToFee};
|
||||||
use frame_support::{
|
use frame_support::{
|
||||||
construct_runtime, parameter_types,
|
construct_runtime,
|
||||||
|
dispatch::DispatchClass,
|
||||||
|
parameter_types,
|
||||||
traits::{AsEnsureOriginWithArg, EitherOfDiverse, InstanceFilter},
|
traits::{AsEnsureOriginWithArg, EitherOfDiverse, InstanceFilter},
|
||||||
weights::{ConstantMultiplier, DispatchClass, Weight},
|
weights::{ConstantMultiplier, Weight},
|
||||||
PalletId, RuntimeDebug,
|
PalletId, RuntimeDebug,
|
||||||
};
|
};
|
||||||
use frame_system::{
|
use frame_system::{
|
||||||
|
|||||||
@@ -75,9 +75,11 @@ use sp_version::RuntimeVersion;
|
|||||||
use codec::{Decode, Encode, MaxEncodedLen};
|
use codec::{Decode, Encode, MaxEncodedLen};
|
||||||
use constants::{currency::*, fee::WeightToFee};
|
use constants::{currency::*, fee::WeightToFee};
|
||||||
use frame_support::{
|
use frame_support::{
|
||||||
construct_runtime, parameter_types,
|
construct_runtime,
|
||||||
|
dispatch::DispatchClass,
|
||||||
|
parameter_types,
|
||||||
traits::{AsEnsureOriginWithArg, EitherOfDiverse, InstanceFilter},
|
traits::{AsEnsureOriginWithArg, EitherOfDiverse, InstanceFilter},
|
||||||
weights::{ConstantMultiplier, DispatchClass, Weight},
|
weights::{ConstantMultiplier, Weight},
|
||||||
PalletId, RuntimeDebug,
|
PalletId, RuntimeDebug,
|
||||||
};
|
};
|
||||||
use frame_system::{
|
use frame_system::{
|
||||||
|
|||||||
@@ -46,9 +46,11 @@ use sp_version::RuntimeVersion;
|
|||||||
use codec::{Decode, Encode, MaxEncodedLen};
|
use codec::{Decode, Encode, MaxEncodedLen};
|
||||||
use constants::{currency::*, fee::WeightToFee};
|
use constants::{currency::*, fee::WeightToFee};
|
||||||
use frame_support::{
|
use frame_support::{
|
||||||
construct_runtime, parameter_types,
|
construct_runtime,
|
||||||
|
dispatch::DispatchClass,
|
||||||
|
parameter_types,
|
||||||
traits::{AsEnsureOriginWithArg, InstanceFilter},
|
traits::{AsEnsureOriginWithArg, InstanceFilter},
|
||||||
weights::{ConstantMultiplier, DispatchClass, Weight},
|
weights::{ConstantMultiplier, Weight},
|
||||||
PalletId, RuntimeDebug,
|
PalletId, RuntimeDebug,
|
||||||
};
|
};
|
||||||
use frame_system::{
|
use frame_system::{
|
||||||
|
|||||||
@@ -61,9 +61,11 @@ use sp_version::RuntimeVersion;
|
|||||||
use codec::{Decode, Encode, MaxEncodedLen};
|
use codec::{Decode, Encode, MaxEncodedLen};
|
||||||
use constants::{currency::*, fee::WeightToFee};
|
use constants::{currency::*, fee::WeightToFee};
|
||||||
use frame_support::{
|
use frame_support::{
|
||||||
construct_runtime, parameter_types,
|
construct_runtime,
|
||||||
|
dispatch::DispatchClass,
|
||||||
|
parameter_types,
|
||||||
traits::{ConstU16, ConstU32, ConstU64, ConstU8, EitherOfDiverse, InstanceFilter},
|
traits::{ConstU16, ConstU32, ConstU64, ConstU8, EitherOfDiverse, InstanceFilter},
|
||||||
weights::{ConstantMultiplier, DispatchClass, Weight},
|
weights::{ConstantMultiplier, Weight},
|
||||||
PalletId, RuntimeDebug,
|
PalletId, RuntimeDebug,
|
||||||
};
|
};
|
||||||
use frame_system::{
|
use frame_system::{
|
||||||
|
|||||||
@@ -47,9 +47,11 @@ use sp_version::RuntimeVersion;
|
|||||||
|
|
||||||
use constants::{currency::*, fee::WeightToFee};
|
use constants::{currency::*, fee::WeightToFee};
|
||||||
use frame_support::{
|
use frame_support::{
|
||||||
construct_runtime, parameter_types,
|
construct_runtime,
|
||||||
|
dispatch::DispatchClass,
|
||||||
|
parameter_types,
|
||||||
traits::{ConstU128, ConstU16, ConstU32, ConstU64, ConstU8, Everything},
|
traits::{ConstU128, ConstU16, ConstU32, ConstU64, ConstU8, Everything},
|
||||||
weights::{ConstantMultiplier, DispatchClass, Weight},
|
weights::{ConstantMultiplier, Weight},
|
||||||
PalletId,
|
PalletId,
|
||||||
};
|
};
|
||||||
use frame_system::limits::{BlockLength, BlockWeights};
|
use frame_system::limits::{BlockLength, BlockWeights};
|
||||||
|
|||||||
@@ -43,11 +43,13 @@ use sp_version::RuntimeVersion;
|
|||||||
|
|
||||||
// A few exports that help ease life for downstream crates.
|
// A few exports that help ease life for downstream crates.
|
||||||
pub use frame_support::{
|
pub use frame_support::{
|
||||||
construct_runtime, parameter_types,
|
construct_runtime,
|
||||||
|
dispatch::DispatchClass,
|
||||||
|
parameter_types,
|
||||||
traits::{IsInVec, Randomness},
|
traits::{IsInVec, Randomness},
|
||||||
weights::{
|
weights::{
|
||||||
constants::{BlockExecutionWeight, ExtrinsicBaseWeight, RocksDbWeight, WEIGHT_PER_SECOND},
|
constants::{BlockExecutionWeight, ExtrinsicBaseWeight, RocksDbWeight, WEIGHT_PER_SECOND},
|
||||||
DispatchClass, IdentityFee, Weight,
|
IdentityFee, Weight,
|
||||||
},
|
},
|
||||||
StorageValue,
|
StorageValue,
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -50,11 +50,13 @@ use sp_version::RuntimeVersion;
|
|||||||
|
|
||||||
// A few exports that help ease life for downstream crates.
|
// A few exports that help ease life for downstream crates.
|
||||||
pub use frame_support::{
|
pub use frame_support::{
|
||||||
construct_runtime, parameter_types,
|
construct_runtime,
|
||||||
|
dispatch::DispatchClass,
|
||||||
|
parameter_types,
|
||||||
traits::{Everything, IsInVec, Randomness},
|
traits::{Everything, IsInVec, Randomness},
|
||||||
weights::{
|
weights::{
|
||||||
constants::{BlockExecutionWeight, ExtrinsicBaseWeight, RocksDbWeight, WEIGHT_PER_SECOND},
|
constants::{BlockExecutionWeight, ExtrinsicBaseWeight, RocksDbWeight, WEIGHT_PER_SECOND},
|
||||||
DispatchClass, IdentityFee, Weight,
|
IdentityFee, Weight,
|
||||||
},
|
},
|
||||||
StorageValue,
|
StorageValue,
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -32,11 +32,13 @@ pub mod xcm_config;
|
|||||||
|
|
||||||
use cumulus_pallet_parachain_system::RelayNumberStrictlyIncreases;
|
use cumulus_pallet_parachain_system::RelayNumberStrictlyIncreases;
|
||||||
use frame_support::{
|
use frame_support::{
|
||||||
construct_runtime, parameter_types,
|
construct_runtime,
|
||||||
|
dispatch::DispatchClass,
|
||||||
|
parameter_types,
|
||||||
traits::Everything,
|
traits::Everything,
|
||||||
weights::{
|
weights::{
|
||||||
constants::WEIGHT_PER_SECOND, ConstantMultiplier, DispatchClass, Weight,
|
constants::WEIGHT_PER_SECOND, ConstantMultiplier, Weight, WeightToFeeCoefficient,
|
||||||
WeightToFeeCoefficient, WeightToFeeCoefficients, WeightToFeePolynomial,
|
WeightToFeeCoefficients, WeightToFeePolynomial,
|
||||||
},
|
},
|
||||||
PalletId,
|
PalletId,
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -38,11 +38,13 @@ use sp_version::RuntimeVersion;
|
|||||||
|
|
||||||
// A few exports that help ease life for downstream crates.
|
// A few exports that help ease life for downstream crates.
|
||||||
pub use frame_support::{
|
pub use frame_support::{
|
||||||
construct_runtime, match_types, parameter_types,
|
construct_runtime,
|
||||||
|
dispatch::DispatchClass,
|
||||||
|
match_types, parameter_types,
|
||||||
traits::{EitherOfDiverse, Everything, IsInVec, Randomness},
|
traits::{EitherOfDiverse, Everything, IsInVec, Randomness},
|
||||||
weights::{
|
weights::{
|
||||||
constants::{BlockExecutionWeight, ExtrinsicBaseWeight, RocksDbWeight, WEIGHT_PER_SECOND},
|
constants::{BlockExecutionWeight, ExtrinsicBaseWeight, RocksDbWeight, WEIGHT_PER_SECOND},
|
||||||
ConstantMultiplier, DispatchClass, IdentityFee, Weight,
|
ConstantMultiplier, IdentityFee, Weight,
|
||||||
},
|
},
|
||||||
StorageValue,
|
StorageValue,
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -710,7 +710,6 @@ pub fn rococo_parachain_build_import_queue(
|
|||||||
_,
|
_,
|
||||||
_,
|
_,
|
||||||
_,
|
_,
|
||||||
_,
|
|
||||||
>(cumulus_client_consensus_aura::ImportQueueParams {
|
>(cumulus_client_consensus_aura::ImportQueueParams {
|
||||||
block_import: client.clone(),
|
block_import: client.clone(),
|
||||||
client,
|
client,
|
||||||
@@ -726,7 +725,6 @@ pub fn rococo_parachain_build_import_queue(
|
|||||||
Ok((timestamp, slot))
|
Ok((timestamp, slot))
|
||||||
},
|
},
|
||||||
registry: config.prometheus_registry(),
|
registry: config.prometheus_registry(),
|
||||||
can_author_with: sp_consensus::AlwaysCanAuthor,
|
|
||||||
spawner: &task_manager.spawn_essential_handle(),
|
spawner: &task_manager.spawn_essential_handle(),
|
||||||
telemetry,
|
telemetry,
|
||||||
})
|
})
|
||||||
@@ -1086,26 +1084,23 @@ where
|
|||||||
let aura_verifier = move || {
|
let aura_verifier = move || {
|
||||||
let slot_duration = cumulus_client_consensus_aura::slot_duration(&*client2).unwrap();
|
let slot_duration = cumulus_client_consensus_aura::slot_duration(&*client2).unwrap();
|
||||||
|
|
||||||
Box::new(
|
Box::new(cumulus_client_consensus_aura::build_verifier::<<AuraId as AppKey>::Pair, _, _>(
|
||||||
cumulus_client_consensus_aura::build_verifier::<<AuraId as AppKey>::Pair, _, _, _>(
|
cumulus_client_consensus_aura::BuildVerifierParams {
|
||||||
cumulus_client_consensus_aura::BuildVerifierParams {
|
client: client2.clone(),
|
||||||
client: client2.clone(),
|
create_inherent_data_providers: move |_, _| async move {
|
||||||
create_inherent_data_providers: move |_, _| async move {
|
let timestamp = sp_timestamp::InherentDataProvider::from_system_time();
|
||||||
let timestamp = sp_timestamp::InherentDataProvider::from_system_time();
|
|
||||||
|
|
||||||
let slot =
|
let slot =
|
||||||
sp_consensus_aura::inherents::InherentDataProvider::from_timestamp_and_slot_duration(
|
sp_consensus_aura::inherents::InherentDataProvider::from_timestamp_and_slot_duration(
|
||||||
*timestamp,
|
*timestamp,
|
||||||
slot_duration,
|
slot_duration,
|
||||||
);
|
);
|
||||||
|
|
||||||
Ok((timestamp, slot))
|
Ok((timestamp, slot))
|
||||||
},
|
|
||||||
can_author_with: sp_consensus::AlwaysCanAuthor,
|
|
||||||
telemetry: telemetry_handle,
|
|
||||||
},
|
},
|
||||||
),
|
telemetry: telemetry_handle,
|
||||||
) as Box<_>
|
},
|
||||||
|
)) as Box<_>
|
||||||
};
|
};
|
||||||
|
|
||||||
let relay_chain_verifier =
|
let relay_chain_verifier =
|
||||||
@@ -1530,7 +1525,6 @@ pub fn contracts_rococo_build_import_queue(
|
|||||||
_,
|
_,
|
||||||
_,
|
_,
|
||||||
_,
|
_,
|
||||||
_,
|
|
||||||
>(cumulus_client_consensus_aura::ImportQueueParams {
|
>(cumulus_client_consensus_aura::ImportQueueParams {
|
||||||
block_import: client.clone(),
|
block_import: client.clone(),
|
||||||
client,
|
client,
|
||||||
@@ -1546,7 +1540,6 @@ pub fn contracts_rococo_build_import_queue(
|
|||||||
Ok((timestamp, slot))
|
Ok((timestamp, slot))
|
||||||
},
|
},
|
||||||
registry: config.prometheus_registry(),
|
registry: config.prometheus_registry(),
|
||||||
can_author_with: sp_consensus::AlwaysCanAuthor,
|
|
||||||
spawner: &task_manager.spawn_essential_handle(),
|
spawner: &task_manager.spawn_essential_handle(),
|
||||||
telemetry,
|
telemetry,
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -45,11 +45,13 @@ use sp_version::RuntimeVersion;
|
|||||||
|
|
||||||
// A few exports that help ease life for downstream crates.
|
// A few exports that help ease life for downstream crates.
|
||||||
pub use frame_support::{
|
pub use frame_support::{
|
||||||
construct_runtime, parameter_types,
|
construct_runtime,
|
||||||
|
dispatch::DispatchClass,
|
||||||
|
parameter_types,
|
||||||
traits::Randomness,
|
traits::Randomness,
|
||||||
weights::{
|
weights::{
|
||||||
constants::{BlockExecutionWeight, ExtrinsicBaseWeight, RocksDbWeight, WEIGHT_PER_SECOND},
|
constants::{BlockExecutionWeight, ExtrinsicBaseWeight, RocksDbWeight, WEIGHT_PER_SECOND},
|
||||||
ConstantMultiplier, DispatchClass, IdentityFee, Weight,
|
ConstantMultiplier, IdentityFee, Weight,
|
||||||
},
|
},
|
||||||
StorageValue,
|
StorageValue,
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -608,7 +608,7 @@ pub fn node_config(
|
|||||||
is_collator: bool,
|
is_collator: bool,
|
||||||
) -> Result<Configuration, ServiceError> {
|
) -> Result<Configuration, ServiceError> {
|
||||||
let base_path = BasePath::new_temp_dir()?;
|
let base_path = BasePath::new_temp_dir()?;
|
||||||
let root = base_path.path().to_path_buf();
|
let root = base_path.path().join(format!("cumulus_test_service_{}", key.to_string()));
|
||||||
let role = if is_collator { Role::Authority } else { Role::Full };
|
let role = if is_collator { Role::Authority } else { Role::Full };
|
||||||
let key_seed = key.to_seed();
|
let key_seed = key.to_seed();
|
||||||
let mut spec = Box::new(chain_spec::get_chain_spec(para_id));
|
let mut spec = Box::new(chain_spec::get_chain_spec(para_id));
|
||||||
|
|||||||
Reference in New Issue
Block a user