Skip to content

Commit

Permalink
Remove Council Membership and Simplify Technical Committee Configurat…
Browse files Browse the repository at this point in the history
…ion (#783)

* removed the memebership for Council

* council can't setMemebers of the Technical commeteed

* fix benchmark compilation
  • Loading branch information
asiniscalchi committed Sep 19, 2024
1 parent 9ad1b1a commit d48769b
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 21 deletions.
2 changes: 1 addition & 1 deletion runtime/laos/src/benchmarks.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,6 @@ frame_benchmarking::define_benchmarks!(
[pallet_scheduler, Scheduler]
[pallet_treasury, Treasury]
[pallet_democracy, Democracy]
[pallet_membership, CouncilMembership]
[pallet_membership, TechnicalCommitteeMembership]
// TODO pallet_xcm?
);
6 changes: 3 additions & 3 deletions runtime/laos/src/configs/collective.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use crate::{weights, AccountId, BlockNumber, Runtime, RuntimeCall, RuntimeEvent, RuntimeOrigin};
use frame_support::{pallet_prelude::Weight, parameter_types, traits::EitherOfDiverse};
use frame_support::{pallet_prelude::Weight, parameter_types};
use frame_system::EnsureRoot;
use laos_primitives::RuntimeBlockWeights;
use parachains_common::{DAYS, MINUTES};
Expand Down Expand Up @@ -50,7 +50,7 @@ impl pallet_collective::Config<TechnicalCommittee> for Runtime {
type Proposal = RuntimeCall;
type RuntimeEvent = RuntimeEvent;
type RuntimeOrigin = RuntimeOrigin;
// the root or a turnout of 50%+1 of the council can select the technical committee
type SetMembersOrigin = EitherOfDiverse<EnsureRoot<AccountId>, CouncilMajority>;
// the root can select the technical committee
type SetMembersOrigin = EnsureRoot<AccountId>;
type WeightInfo = weights::pallet_collective::WeightInfo<Runtime>;
}
16 changes: 1 addition & 15 deletions runtime/laos/src/configs/membership.rs
Original file line number Diff line number Diff line change
@@ -1,24 +1,10 @@
use frame_support::traits::EitherOfDiverse;
use frame_system::EnsureRoot;

use crate::{weights, AccountId, Council, Runtime, RuntimeEvent, TechnicalCommittee};
use crate::{weights, AccountId, Runtime, RuntimeEvent, TechnicalCommittee};

use super::collective::CouncilMajority;

type CouncilMembership = pallet_membership::Instance1;
impl pallet_membership::Config<CouncilMembership> for Runtime {
type RuntimeEvent = RuntimeEvent;
type AddOrigin = EnsureRoot<AccountId>;
type RemoveOrigin = EnsureRoot<AccountId>;
type SwapOrigin = EnsureRoot<AccountId>;
type ResetOrigin = EnsureRoot<AccountId>;
type PrimeOrigin = EnsureRoot<AccountId>;
type MembershipInitialized = Council;
type MembershipChanged = Council;
type MaxMembers = super::collective::MaxMembers;
type WeightInfo = weights::pallet_membership::WeightInfo<Runtime>;
}

type TechnicalCommitteeMembership = pallet_membership::Instance2;
impl pallet_membership::Config<TechnicalCommitteeMembership> for Runtime {
type RuntimeEvent = RuntimeEvent;
Expand Down
4 changes: 2 additions & 2 deletions runtime/laos/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ construct_runtime!(
XcmpQueue: cumulus_pallet_xcmp_queue = 30,
PolkadotXcm: pallet_xcm = 31,
CumulusXcm: cumulus_pallet_xcm = 32,
// TODO put the name of the remove pallet as placeholder = 33,
MessageQueue: pallet_message_queue = 34,

// Governance
Expand All @@ -137,8 +138,7 @@ construct_runtime!(
TechnicalCommittee: pallet_collective::<Instance2> = 44,
Scheduler: pallet_scheduler = 45,
Democracy: pallet_democracy = 46,
CouncilMembership: pallet_membership::<Instance1> = 47,
TechnicalCommitteeMembership: pallet_membership::<Instance2> = 48,
TechnicalCommitteeMembership: pallet_membership::<Instance2> = 47,

// Frontier
Ethereum: pallet_ethereum = 50,
Expand Down

0 comments on commit d48769b

Please sign in to comment.