From 491d9d701bea16e3c4b8e5f2b0e0034589a8cfc3 Mon Sep 17 00:00:00 2001 From: Alessandro Siniscalchi Date: Thu, 14 Nov 2024 10:24:28 +0100 Subject: [PATCH 1/3] set max memebrs --- runtime/laos/src/configs/collective.rs | 7 ++++--- runtime/laos/src/configs/membership.rs | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/runtime/laos/src/configs/collective.rs b/runtime/laos/src/configs/collective.rs index 7519def19..275bd0b89 100644 --- a/runtime/laos/src/configs/collective.rs +++ b/runtime/laos/src/configs/collective.rs @@ -11,7 +11,8 @@ use sp_runtime::Perbill; parameter_types! { pub const MotionDuration: BlockNumber = prod_or_fast!(7 * DAYS, 5 * MINUTES); pub const MaxProposals: u32 = 7; - pub const MaxMembers: u32 = 20; + pub const MaxMembersCouncil: u32 = 7; + pub const MaxMembersTechnicalCommittee: u32 = 5; pub MaxProposalWeight: Weight = Perbill::from_percent(50) * RuntimeBlockWeights::get().max_block; } @@ -31,7 +32,7 @@ pub type AllOfTechnicalCommittee = pub type CouncilCollective = pallet_collective::Instance1; impl pallet_collective::Config for Runtime { type DefaultVote = pallet_collective::MoreThanMajorityThenPrimeDefaultVote; - type MaxMembers = MaxMembers; + type MaxMembers = MaxMembersCouncil; type MaxProposalWeight = MaxProposalWeight; type MaxProposals = MaxProposals; type MotionDuration = MotionDuration; @@ -45,7 +46,7 @@ impl pallet_collective::Config for Runtime { pub type TechnicalCommittee = pallet_collective::Instance2; impl pallet_collective::Config for Runtime { type DefaultVote = pallet_collective::MoreThanMajorityThenPrimeDefaultVote; - type MaxMembers = MaxMembers; + type MaxMembers = MaxMembersTechnicalCommittee; type MaxProposalWeight = MaxProposalWeight; type MaxProposals = MaxProposals; type MotionDuration = MotionDuration; diff --git a/runtime/laos/src/configs/membership.rs b/runtime/laos/src/configs/membership.rs index d6f56c301..df458f905 100644 --- a/runtime/laos/src/configs/membership.rs +++ b/runtime/laos/src/configs/membership.rs @@ -15,6 +15,6 @@ impl pallet_membership::Config for Runtime { type PrimeOrigin = EitherOfDiverse, CouncilMajority>; type MembershipInitialized = TechnicalCommittee; type MembershipChanged = TechnicalCommittee; - type MaxMembers = super::collective::MaxMembers; + type MaxMembers = super::collective::MaxMembersTechnicalCommittee; type WeightInfo = weights::pallet_membership::WeightInfo; } From 54470cd7eb7db6799ee777af070f80cf22cf09fb Mon Sep 17 00:00:00 2001 From: Alessandro Siniscalchi Date: Thu, 14 Nov 2024 10:26:23 +0100 Subject: [PATCH 2/3] set Committee max members to 10 --- runtime/laos/src/configs/collective.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/runtime/laos/src/configs/collective.rs b/runtime/laos/src/configs/collective.rs index 275bd0b89..5f7e3af88 100644 --- a/runtime/laos/src/configs/collective.rs +++ b/runtime/laos/src/configs/collective.rs @@ -11,7 +11,7 @@ use sp_runtime::Perbill; parameter_types! { pub const MotionDuration: BlockNumber = prod_or_fast!(7 * DAYS, 5 * MINUTES); pub const MaxProposals: u32 = 7; - pub const MaxMembersCouncil: u32 = 7; + pub const MaxMembersCouncil: u32 = 10; pub const MaxMembersTechnicalCommittee: u32 = 5; pub MaxProposalWeight: Weight = Perbill::from_percent(50) * RuntimeBlockWeights::get().max_block; } From 688447f0a3f6a42e4c507ce012446be341513384 Mon Sep 17 00:00:00 2001 From: Alessandro Siniscalchi Date: Thu, 14 Nov 2024 10:48:19 +0100 Subject: [PATCH 3/3] refactoring --- runtime/laos/src/configs/collective.rs | 2 +- runtime/laos/src/configs/election_phragmen.rs | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/runtime/laos/src/configs/collective.rs b/runtime/laos/src/configs/collective.rs index 5f7e3af88..275bd0b89 100644 --- a/runtime/laos/src/configs/collective.rs +++ b/runtime/laos/src/configs/collective.rs @@ -11,7 +11,7 @@ use sp_runtime::Perbill; parameter_types! { pub const MotionDuration: BlockNumber = prod_or_fast!(7 * DAYS, 5 * MINUTES); pub const MaxProposals: u32 = 7; - pub const MaxMembersCouncil: u32 = 10; + pub const MaxMembersCouncil: u32 = 7; pub const MaxMembersTechnicalCommittee: u32 = 5; pub MaxProposalWeight: Weight = Perbill::from_percent(50) * RuntimeBlockWeights::get().max_block; } diff --git a/runtime/laos/src/configs/election_phragmen.rs b/runtime/laos/src/configs/election_phragmen.rs index 0f74e4d8d..c5d50dee1 100644 --- a/runtime/laos/src/configs/election_phragmen.rs +++ b/runtime/laos/src/configs/election_phragmen.rs @@ -8,7 +8,6 @@ use polkadot_runtime_common::{prod_or_fast, CurrencyToVote}; parameter_types! { pub const CandidacyBond: Balance = 1000 * UNIT; pub TermDuration: BlockNumber = prod_or_fast!(28 * DAYS, 10 * MINUTES); - pub const DesiredMembers: u32 = 7; pub const DesiredRunnersUp: u32 = 20; pub const MaxCandidates: u32 = 30; pub const MaxVoters: u32 = 200; @@ -25,7 +24,7 @@ impl pallet_elections_phragmen::Config for Runtime { type Currency = Balances; type CurrencyToVote = CurrencyToVote; /// Number of members to elect. - type DesiredMembers = DesiredMembers; + type DesiredMembers = super::collective::MaxMembersCouncil; /// Number of runners_up to keep. type DesiredRunnersUp = DesiredRunnersUp; type InitializeMembers = Council;