Skip to content

Commit

Permalink
Set Maximum Members for Council and Technical Committee in Configurat…
Browse files Browse the repository at this point in the history
…ions (#872)

* set max memebrs

* set Committee max members to 10

* refactoring
  • Loading branch information
asiniscalchi authored Nov 14, 2024
1 parent 4076f10 commit 4916490
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
7 changes: 4 additions & 3 deletions runtime/laos/src/configs/collective.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand All @@ -31,7 +32,7 @@ pub type AllOfTechnicalCommittee =
pub type CouncilCollective = pallet_collective::Instance1;
impl pallet_collective::Config<CouncilCollective> for Runtime {
type DefaultVote = pallet_collective::MoreThanMajorityThenPrimeDefaultVote;
type MaxMembers = MaxMembers;
type MaxMembers = MaxMembersCouncil;
type MaxProposalWeight = MaxProposalWeight;
type MaxProposals = MaxProposals;
type MotionDuration = MotionDuration;
Expand All @@ -45,7 +46,7 @@ impl pallet_collective::Config<CouncilCollective> for Runtime {
pub type TechnicalCommittee = pallet_collective::Instance2;
impl pallet_collective::Config<TechnicalCommittee> for Runtime {
type DefaultVote = pallet_collective::MoreThanMajorityThenPrimeDefaultVote;
type MaxMembers = MaxMembers;
type MaxMembers = MaxMembersTechnicalCommittee;
type MaxProposalWeight = MaxProposalWeight;
type MaxProposals = MaxProposals;
type MotionDuration = MotionDuration;
Expand Down
3 changes: 1 addition & 2 deletions runtime/laos/src/configs/election_phragmen.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion runtime/laos/src/configs/membership.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@ impl pallet_membership::Config<TechnicalCommitteeMembership> for Runtime {
type PrimeOrigin = EitherOfDiverse<EnsureRoot<AccountId>, CouncilMajority>;
type MembershipInitialized = TechnicalCommittee;
type MembershipChanged = TechnicalCommittee;
type MaxMembers = super::collective::MaxMembers;
type MaxMembers = super::collective::MaxMembersTechnicalCommittee;
type WeightInfo = weights::pallet_membership::WeightInfo<Runtime>;
}

0 comments on commit 4916490

Please sign in to comment.