From b7b1f20e1128ec2ec02fd549082796cd5fb6531e Mon Sep 17 00:00:00 2001 From: Georges Dib Date: Sun, 30 Jan 2022 19:38:20 +0000 Subject: [PATCH 1/2] Adding `MaxUnlockingChunk` Fix after changes to substrate --- runtime/kusama/src/lib.rs | 5 ++++- runtime/polkadot/src/lib.rs | 5 ++++- runtime/test-runtime/src/lib.rs | 1 + runtime/westend/src/lib.rs | 5 ++++- 4 files changed, 13 insertions(+), 3 deletions(-) diff --git a/runtime/kusama/src/lib.rs b/runtime/kusama/src/lib.rs index a43b6a4509a0..308c6fad7546 100644 --- a/runtime/kusama/src/lib.rs +++ b/runtime/kusama/src/lib.rs @@ -52,7 +52,9 @@ use runtime_parachains::{ use authority_discovery_primitives::AuthorityId as AuthorityDiscoveryId; use beefy_primitives::crypto::AuthorityId as BeefyId; use frame_support::{ - construct_runtime, parameter_types, + construct_runtime, + pallet_prelude::ConstU32, + parameter_types, traits::{ Contains, EnsureOneOf, InstanceFilter, KeyOwnerProofSystem, LockIdentifier, OnRuntimeUpgrade, PrivilegeCmp, @@ -583,6 +585,7 @@ impl pallet_staking::Config for Runtime { type MaxNominatorRewardedPerValidator = MaxNominatorRewardedPerValidator; type OffendingValidatorsThreshold = OffendingValidatorsThreshold; type SortedListProvider = BagsList; + type MaxUnlockingChunks = ConstU32<32>; type BenchmarkingConfig = runtime_common::StakingBenchmarkingConfig; type WeightInfo = weights::pallet_staking::WeightInfo; } diff --git a/runtime/polkadot/src/lib.rs b/runtime/polkadot/src/lib.rs index 71cf2ece1ed3..c8817e8b8015 100644 --- a/runtime/polkadot/src/lib.rs +++ b/runtime/polkadot/src/lib.rs @@ -39,7 +39,9 @@ use runtime_parachains::{ use authority_discovery_primitives::AuthorityId as AuthorityDiscoveryId; use beefy_primitives::crypto::AuthorityId as BeefyId; use frame_support::{ - construct_runtime, parameter_types, + construct_runtime, + pallet_prelude::ConstU32, + parameter_types, traits::{ Contains, EnsureOneOf, InstanceFilter, KeyOwnerProofSystem, LockIdentifier, OnRuntimeUpgrade, PrivilegeCmp, @@ -579,6 +581,7 @@ impl pallet_staking::Config for Runtime { type ElectionProvider = ElectionProviderMultiPhase; type GenesisElectionProvider = runtime_common::elections::GenesisElectionOf; type SortedListProvider = BagsList; + type MaxUnlockingChunks = ConstU32<32>; type BenchmarkingConfig = runtime_common::StakingBenchmarkingConfig; type WeightInfo = weights::pallet_staking::WeightInfo; } diff --git a/runtime/test-runtime/src/lib.rs b/runtime/test-runtime/src/lib.rs index 180694af685f..5f0d53f3f0a5 100644 --- a/runtime/test-runtime/src/lib.rs +++ b/runtime/test-runtime/src/lib.rs @@ -349,6 +349,7 @@ impl pallet_staking::Config for Runtime { // Use the nominator map to iter voter AND no-ops for all SortedListProvider hooks. The migration // to bags-list is a no-op, but the storage version will be updated. type SortedListProvider = pallet_staking::UseNominatorsMap; + type MaxUnlockingChunks = ConstU32<32>; type BenchmarkingConfig = runtime_common::StakingBenchmarkingConfig; type WeightInfo = (); } diff --git a/runtime/westend/src/lib.rs b/runtime/westend/src/lib.rs index ed63e14cc8db..6341e598ce4f 100644 --- a/runtime/westend/src/lib.rs +++ b/runtime/westend/src/lib.rs @@ -51,7 +51,9 @@ use runtime_parachains::{ use authority_discovery_primitives::AuthorityId as AuthorityDiscoveryId; use beefy_primitives::crypto::AuthorityId as BeefyId; use frame_support::{ - construct_runtime, parameter_types, + construct_runtime, + pallet_prelude::ConstU32, + parameter_types, traits::{Contains, InstanceFilter, KeyOwnerProofSystem, OnRuntimeUpgrade}, weights::Weight, PalletId, RuntimeDebug, @@ -474,6 +476,7 @@ impl pallet_staking::Config for Runtime { type ElectionProvider = ElectionProviderMultiPhase; type GenesisElectionProvider = runtime_common::elections::GenesisElectionOf; type SortedListProvider = BagsList; + type MaxUnlockingChunks = ConstU32<32>; type BenchmarkingConfig = runtime_common::StakingBenchmarkingConfig; type WeightInfo = weights::pallet_staking::WeightInfo; } From 80bdfd4c1c0c464c65524eab263df6c5087badbd Mon Sep 17 00:00:00 2001 From: Georges Dib Date: Sun, 30 Jan 2022 19:41:51 +0000 Subject: [PATCH 2/2] Missing import --- runtime/test-runtime/src/lib.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/runtime/test-runtime/src/lib.rs b/runtime/test-runtime/src/lib.rs index 5f0d53f3f0a5..9cd2096f5aa6 100644 --- a/runtime/test-runtime/src/lib.rs +++ b/runtime/test-runtime/src/lib.rs @@ -36,7 +36,9 @@ use polkadot_runtime_parachains::{ use authority_discovery_primitives::AuthorityId as AuthorityDiscoveryId; use beefy_primitives::crypto::AuthorityId as BeefyId; use frame_support::{ - construct_runtime, parameter_types, + construct_runtime, + pallet_prelude::ConstU32, + parameter_types, traits::{Everything, KeyOwnerProofSystem}, }; use pallet_grandpa::{fg_primitives, AuthorityId as GrandpaId};