Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set Maximum Members for Council and Technical Committee in Configurations #872

Merged
merged 3 commits into from
Nov 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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>;
}
Loading