From d48769b87760de20f6052e3af3ff30420b25e453 Mon Sep 17 00:00:00 2001 From: Alessandro Siniscalchi Date: Thu, 19 Sep 2024 11:37:01 +0200 Subject: [PATCH] Remove Council Membership and Simplify Technical Committee Configuration (#783) * removed the memebership for Council * council can't setMemebers of the Technical commeteed * fix benchmark compilation --- runtime/laos/src/benchmarks.rs | 2 +- runtime/laos/src/configs/collective.rs | 6 +++--- runtime/laos/src/configs/membership.rs | 16 +--------------- runtime/laos/src/lib.rs | 4 ++-- 4 files changed, 7 insertions(+), 21 deletions(-) diff --git a/runtime/laos/src/benchmarks.rs b/runtime/laos/src/benchmarks.rs index 51e2fc70..37ed78ee 100644 --- a/runtime/laos/src/benchmarks.rs +++ b/runtime/laos/src/benchmarks.rs @@ -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? ); diff --git a/runtime/laos/src/configs/collective.rs b/runtime/laos/src/configs/collective.rs index fe3a5817..f7da8573 100644 --- a/runtime/laos/src/configs/collective.rs +++ b/runtime/laos/src/configs/collective.rs @@ -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}; @@ -50,7 +50,7 @@ impl pallet_collective::Config 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, CouncilMajority>; + // the root can select the technical committee + type SetMembersOrigin = EnsureRoot; type WeightInfo = weights::pallet_collective::WeightInfo; } diff --git a/runtime/laos/src/configs/membership.rs b/runtime/laos/src/configs/membership.rs index b03a5b15..d6f56c30 100644 --- a/runtime/laos/src/configs/membership.rs +++ b/runtime/laos/src/configs/membership.rs @@ -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 for Runtime { - type RuntimeEvent = RuntimeEvent; - type AddOrigin = EnsureRoot; - type RemoveOrigin = EnsureRoot; - type SwapOrigin = EnsureRoot; - type ResetOrigin = EnsureRoot; - type PrimeOrigin = EnsureRoot; - type MembershipInitialized = Council; - type MembershipChanged = Council; - type MaxMembers = super::collective::MaxMembers; - type WeightInfo = weights::pallet_membership::WeightInfo; -} - type TechnicalCommitteeMembership = pallet_membership::Instance2; impl pallet_membership::Config for Runtime { type RuntimeEvent = RuntimeEvent; diff --git a/runtime/laos/src/lib.rs b/runtime/laos/src/lib.rs index 88fb0a3e..34259030 100644 --- a/runtime/laos/src/lib.rs +++ b/runtime/laos/src/lib.rs @@ -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 @@ -137,8 +138,7 @@ construct_runtime!( TechnicalCommittee: pallet_collective:: = 44, Scheduler: pallet_scheduler = 45, Democracy: pallet_democracy = 46, - CouncilMembership: pallet_membership:: = 47, - TechnicalCommitteeMembership: pallet_membership:: = 48, + TechnicalCommitteeMembership: pallet_membership:: = 47, // Frontier Ethereum: pallet_ethereum = 50,