From 8fc4ac02283c27827f8be54d81f27853a1bcd1a7 Mon Sep 17 00:00:00 2001 From: Keith Yeung Date: Wed, 14 Sep 2022 15:59:03 +0800 Subject: [PATCH] Companion for paritytech/substrate#12219 (#1610) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 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 * :facepalm: Co-authored-by: Michal Kucharczyk <1728078+michalkucharczyk@users.noreply.github.com> Co-authored-by: parity-processbot <> Co-authored-by: Bastian Köcher --- cumulus/pallets/collator-selection/src/lib.rs | 3 +-- cumulus/parachain-template/runtime/src/lib.rs | 8 +++++--- cumulus/parachains/runtimes/assets/statemine/src/lib.rs | 6 ++++-- cumulus/parachains/runtimes/assets/statemint/src/lib.rs | 6 ++++-- cumulus/parachains/runtimes/assets/westmint/src/lib.rs | 6 ++++-- .../runtimes/collectives/collectives-polkadot/src/lib.rs | 6 ++++-- .../runtimes/contracts/contracts-rococo/src/lib.rs | 6 ++++-- cumulus/parachains/runtimes/starters/seedling/src/lib.rs | 6 ++++-- cumulus/parachains/runtimes/starters/shell/src/lib.rs | 6 ++++-- cumulus/parachains/runtimes/testing/penpal/src/lib.rs | 8 +++++--- .../runtimes/testing/rococo-parachain/src/lib.rs | 6 ++++-- cumulus/test/runtime/src/lib.rs | 6 ++++-- 12 files changed, 47 insertions(+), 26 deletions(-) diff --git a/cumulus/pallets/collator-selection/src/lib.rs b/cumulus/pallets/collator-selection/src/lib.rs index e2e8e95f9a..44a81ff14b 100644 --- a/cumulus/pallets/collator-selection/src/lib.rs +++ b/cumulus/pallets/collator-selection/src/lib.rs @@ -77,7 +77,7 @@ pub mod pallet { pub use crate::weights::WeightInfo; use core::ops::Div; use frame_support::{ - dispatch::DispatchResultWithPostInfo, + dispatch::{DispatchClass, DispatchResultWithPostInfo}, inherent::Vec, pallet_prelude::*, sp_runtime::{ @@ -88,7 +88,6 @@ pub mod pallet { Currency, EnsureOrigin, ExistenceRequirement::KeepAlive, ReservableCurrency, ValidatorRegistration, }, - weights::DispatchClass, BoundedVec, PalletId, }; use frame_system::{pallet_prelude::*, Config as SystemConfig}; diff --git a/cumulus/parachain-template/runtime/src/lib.rs b/cumulus/parachain-template/runtime/src/lib.rs index aa5b6805c1..253bb2d712 100644 --- a/cumulus/parachain-template/runtime/src/lib.rs +++ b/cumulus/parachain-template/runtime/src/lib.rs @@ -26,11 +26,13 @@ use sp_version::NativeVersion; use sp_version::RuntimeVersion; use frame_support::{ - construct_runtime, parameter_types, + construct_runtime, + dispatch::DispatchClass, + parameter_types, traits::Everything, weights::{ - constants::WEIGHT_PER_SECOND, ConstantMultiplier, DispatchClass, Weight, - WeightToFeeCoefficient, WeightToFeeCoefficients, WeightToFeePolynomial, + constants::WEIGHT_PER_SECOND, ConstantMultiplier, Weight, WeightToFeeCoefficient, + WeightToFeeCoefficients, WeightToFeePolynomial, }, PalletId, }; diff --git a/cumulus/parachains/runtimes/assets/statemine/src/lib.rs b/cumulus/parachains/runtimes/assets/statemine/src/lib.rs index 579eafb82a..c03ba675de 100644 --- a/cumulus/parachains/runtimes/assets/statemine/src/lib.rs +++ b/cumulus/parachains/runtimes/assets/statemine/src/lib.rs @@ -46,9 +46,11 @@ use sp_version::RuntimeVersion; use codec::{Decode, Encode, MaxEncodedLen}; use constants::{currency::*, fee::WeightToFee}; use frame_support::{ - construct_runtime, parameter_types, + construct_runtime, + dispatch::DispatchClass, + parameter_types, traits::{AsEnsureOriginWithArg, EitherOfDiverse, InstanceFilter}, - weights::{ConstantMultiplier, DispatchClass, Weight}, + weights::{ConstantMultiplier, Weight}, PalletId, RuntimeDebug, }; use frame_system::{ diff --git a/cumulus/parachains/runtimes/assets/statemint/src/lib.rs b/cumulus/parachains/runtimes/assets/statemint/src/lib.rs index 5a54fa95cc..606a4b71e6 100644 --- a/cumulus/parachains/runtimes/assets/statemint/src/lib.rs +++ b/cumulus/parachains/runtimes/assets/statemint/src/lib.rs @@ -75,9 +75,11 @@ use sp_version::RuntimeVersion; use codec::{Decode, Encode, MaxEncodedLen}; use constants::{currency::*, fee::WeightToFee}; use frame_support::{ - construct_runtime, parameter_types, + construct_runtime, + dispatch::DispatchClass, + parameter_types, traits::{AsEnsureOriginWithArg, EitherOfDiverse, InstanceFilter}, - weights::{ConstantMultiplier, DispatchClass, Weight}, + weights::{ConstantMultiplier, Weight}, PalletId, RuntimeDebug, }; use frame_system::{ diff --git a/cumulus/parachains/runtimes/assets/westmint/src/lib.rs b/cumulus/parachains/runtimes/assets/westmint/src/lib.rs index 27e6c15da0..08a5e3584a 100644 --- a/cumulus/parachains/runtimes/assets/westmint/src/lib.rs +++ b/cumulus/parachains/runtimes/assets/westmint/src/lib.rs @@ -46,9 +46,11 @@ use sp_version::RuntimeVersion; use codec::{Decode, Encode, MaxEncodedLen}; use constants::{currency::*, fee::WeightToFee}; use frame_support::{ - construct_runtime, parameter_types, + construct_runtime, + dispatch::DispatchClass, + parameter_types, traits::{AsEnsureOriginWithArg, InstanceFilter}, - weights::{ConstantMultiplier, DispatchClass, Weight}, + weights::{ConstantMultiplier, Weight}, PalletId, RuntimeDebug, }; use frame_system::{ diff --git a/cumulus/parachains/runtimes/collectives/collectives-polkadot/src/lib.rs b/cumulus/parachains/runtimes/collectives/collectives-polkadot/src/lib.rs index a5c5a5daf6..b9bbf84279 100644 --- a/cumulus/parachains/runtimes/collectives/collectives-polkadot/src/lib.rs +++ b/cumulus/parachains/runtimes/collectives/collectives-polkadot/src/lib.rs @@ -61,9 +61,11 @@ use sp_version::RuntimeVersion; use codec::{Decode, Encode, MaxEncodedLen}; use constants::{currency::*, fee::WeightToFee}; use frame_support::{ - construct_runtime, parameter_types, + construct_runtime, + dispatch::DispatchClass, + parameter_types, traits::{ConstU16, ConstU32, ConstU64, ConstU8, EitherOfDiverse, InstanceFilter}, - weights::{ConstantMultiplier, DispatchClass, Weight}, + weights::{ConstantMultiplier, Weight}, PalletId, RuntimeDebug, }; use frame_system::{ diff --git a/cumulus/parachains/runtimes/contracts/contracts-rococo/src/lib.rs b/cumulus/parachains/runtimes/contracts/contracts-rococo/src/lib.rs index 46c53a95ef..1967ef34c9 100644 --- a/cumulus/parachains/runtimes/contracts/contracts-rococo/src/lib.rs +++ b/cumulus/parachains/runtimes/contracts/contracts-rococo/src/lib.rs @@ -47,9 +47,11 @@ use sp_version::RuntimeVersion; use constants::{currency::*, fee::WeightToFee}; use frame_support::{ - construct_runtime, parameter_types, + construct_runtime, + dispatch::DispatchClass, + parameter_types, traits::{ConstU128, ConstU16, ConstU32, ConstU64, ConstU8, Everything}, - weights::{ConstantMultiplier, DispatchClass, Weight}, + weights::{ConstantMultiplier, Weight}, PalletId, }; use frame_system::limits::{BlockLength, BlockWeights}; diff --git a/cumulus/parachains/runtimes/starters/seedling/src/lib.rs b/cumulus/parachains/runtimes/starters/seedling/src/lib.rs index 035dff2eb4..daab72eba4 100644 --- a/cumulus/parachains/runtimes/starters/seedling/src/lib.rs +++ b/cumulus/parachains/runtimes/starters/seedling/src/lib.rs @@ -43,11 +43,13 @@ use sp_version::RuntimeVersion; // A few exports that help ease life for downstream crates. pub use frame_support::{ - construct_runtime, parameter_types, + construct_runtime, + dispatch::DispatchClass, + parameter_types, traits::{IsInVec, Randomness}, weights::{ constants::{BlockExecutionWeight, ExtrinsicBaseWeight, RocksDbWeight, WEIGHT_PER_SECOND}, - DispatchClass, IdentityFee, Weight, + IdentityFee, Weight, }, StorageValue, }; diff --git a/cumulus/parachains/runtimes/starters/shell/src/lib.rs b/cumulus/parachains/runtimes/starters/shell/src/lib.rs index fab27c2fc6..8b692c210e 100644 --- a/cumulus/parachains/runtimes/starters/shell/src/lib.rs +++ b/cumulus/parachains/runtimes/starters/shell/src/lib.rs @@ -50,11 +50,13 @@ use sp_version::RuntimeVersion; // A few exports that help ease life for downstream crates. pub use frame_support::{ - construct_runtime, parameter_types, + construct_runtime, + dispatch::DispatchClass, + parameter_types, traits::{Everything, IsInVec, Randomness}, weights::{ constants::{BlockExecutionWeight, ExtrinsicBaseWeight, RocksDbWeight, WEIGHT_PER_SECOND}, - DispatchClass, IdentityFee, Weight, + IdentityFee, Weight, }, StorageValue, }; diff --git a/cumulus/parachains/runtimes/testing/penpal/src/lib.rs b/cumulus/parachains/runtimes/testing/penpal/src/lib.rs index a9342c3a65..d48fc4bf53 100644 --- a/cumulus/parachains/runtimes/testing/penpal/src/lib.rs +++ b/cumulus/parachains/runtimes/testing/penpal/src/lib.rs @@ -32,11 +32,13 @@ pub mod xcm_config; use cumulus_pallet_parachain_system::RelayNumberStrictlyIncreases; use frame_support::{ - construct_runtime, parameter_types, + construct_runtime, + dispatch::DispatchClass, + parameter_types, traits::Everything, weights::{ - constants::WEIGHT_PER_SECOND, ConstantMultiplier, DispatchClass, Weight, - WeightToFeeCoefficient, WeightToFeeCoefficients, WeightToFeePolynomial, + constants::WEIGHT_PER_SECOND, ConstantMultiplier, Weight, WeightToFeeCoefficient, + WeightToFeeCoefficients, WeightToFeePolynomial, }, PalletId, }; diff --git a/cumulus/parachains/runtimes/testing/rococo-parachain/src/lib.rs b/cumulus/parachains/runtimes/testing/rococo-parachain/src/lib.rs index 96ba3bdef2..dc5577cbfa 100644 --- a/cumulus/parachains/runtimes/testing/rococo-parachain/src/lib.rs +++ b/cumulus/parachains/runtimes/testing/rococo-parachain/src/lib.rs @@ -38,11 +38,13 @@ use sp_version::RuntimeVersion; // A few exports that help ease life for downstream crates. pub use frame_support::{ - construct_runtime, match_types, parameter_types, + construct_runtime, + dispatch::DispatchClass, + match_types, parameter_types, traits::{EitherOfDiverse, Everything, IsInVec, Randomness}, weights::{ constants::{BlockExecutionWeight, ExtrinsicBaseWeight, RocksDbWeight, WEIGHT_PER_SECOND}, - ConstantMultiplier, DispatchClass, IdentityFee, Weight, + ConstantMultiplier, IdentityFee, Weight, }, StorageValue, }; diff --git a/cumulus/test/runtime/src/lib.rs b/cumulus/test/runtime/src/lib.rs index 0d5838d001..7d47140922 100644 --- a/cumulus/test/runtime/src/lib.rs +++ b/cumulus/test/runtime/src/lib.rs @@ -45,11 +45,13 @@ use sp_version::RuntimeVersion; // A few exports that help ease life for downstream crates. pub use frame_support::{ - construct_runtime, parameter_types, + construct_runtime, + dispatch::DispatchClass, + parameter_types, traits::Randomness, weights::{ constants::{BlockExecutionWeight, ExtrinsicBaseWeight, RocksDbWeight, WEIGHT_PER_SECOND}, - ConstantMultiplier, DispatchClass, IdentityFee, Weight, + ConstantMultiplier, IdentityFee, Weight, }, StorageValue, };