Skip to content

Commit

Permalink
Revert "Use three out of five membership threshold (#1404)" (#1406)
Browse files Browse the repository at this point in the history
This reverts commit adc9443.
  • Loading branch information
Chralt98 authored Feb 10, 2025
1 parent f4af893 commit bc0fa27
Showing 1 changed file with 19 additions and 31 deletions.
50 changes: 19 additions & 31 deletions runtime/common/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2022-2025 Forecasting Technologies LTD.
// Copyright 2022-2024 Forecasting Technologies LTD.
// Copyright 2021-2022 Zeitgeist PM LLC.
// Copyright 2019-2020 Parity Technologies (UK) Ltd.
//
Expand Down Expand Up @@ -202,12 +202,6 @@ macro_rules! decl_common_types {
EnsureProportionAtLeast<AccountId, CouncilInstance, 1, 2>,
>;

// At least 60%
type EnsureRootOrThreeFifthsCouncil = EitherOfDiverse<
EnsureRoot<AccountId>,
EnsureProportionAtLeast<AccountId, CouncilInstance, 3, 5>,
>;

// At least 66%
type EnsureRootOrTwoThirdsCouncil = EitherOfDiverse<
EnsureRoot<AccountId>,
Expand All @@ -234,12 +228,6 @@ macro_rules! decl_common_types {
EnsureProportionAtLeast<AccountId, TechnicalCommitteeInstance, 1, 2>,
>;

// At least 60%
type EnsureRootOrThreeFifthsTechnicalCommittee = EitherOfDiverse<
EnsureRoot<AccountId>,
EnsureProportionAtLeast<AccountId, TechnicalCommitteeInstance, 3, 5>,
>;

// At least 66%
type EnsureRootOrTwoThirdsTechnicalCommittee = EitherOfDiverse<
EnsureRoot<AccountId>,
Expand Down Expand Up @@ -495,7 +483,7 @@ macro_rules! impl_config_traits {
#[cfg(feature = "parachain")]
impl cumulus_pallet_xcmp_queue::Config for Runtime {
type ChannelInfo = ParachainSystem;
type ControllerOrigin = EnsureRootOrThreeFifthsTechnicalCommittee;
type ControllerOrigin = EnsureRootOrTwoThirdsTechnicalCommittee;
type ControllerOriginConverter = XcmOriginToTransactDispatchOrigin;
type ExecuteOverweightOrigin = EnsureRootOrHalfTechnicalCommittee;
type PriceForSiblingDelivery = ();
Expand Down Expand Up @@ -676,7 +664,7 @@ macro_rules! impl_config_traits {
impl orml_asset_registry::Config for Runtime {
type AssetId = CurrencyId;
type AssetProcessor = CustomAssetProcessor;
type AuthorityOrigin = AsEnsureOriginWithArg<EnsureRootOrThreeFifthsCouncil>;
type AuthorityOrigin = AsEnsureOriginWithArg<EnsureRootOrTwoThirdsCouncil>;
type Balance = Balance;
type CustomMetadata = CustomMetadata;
type RuntimeEvent = RuntimeEvent;
Expand Down Expand Up @@ -826,7 +814,7 @@ macro_rules! impl_config_traits {
type ExternalDefaultOrigin = EnsureRootOrAllCouncil;
/// Origin that can have an ExternalMajority/ExternalDefault vote
/// be tabled immediately and with a shorter voting/enactment period.
type FastTrackOrigin = EnsureRootOrThreeFifthsTechnicalCommittee;
type FastTrackOrigin = EnsureRootOrTwoThirdsTechnicalCommittee;
/// Origin from which the next majority-carries (or more permissive) referendum may be tabled
/// to vote immediately and asynchronously in a similar manner to the emergency origin.
type InstantOrigin = EnsureRootOrAllTechnicalCommittee;
Expand Down Expand Up @@ -870,41 +858,41 @@ macro_rules! impl_config_traits {
}

impl pallet_membership::Config<AdvisoryCommitteeMembershipInstance> for Runtime {
type AddOrigin = EnsureRootOrThreeFifthsCouncil;
type AddOrigin = EnsureRootOrTwoThirdsCouncil;
type RuntimeEvent = RuntimeEvent;
type MaxMembers = AdvisoryCommitteeMaxMembers;
type MembershipChanged = AdvisoryCommittee;
type MembershipInitialized = AdvisoryCommittee;
type PrimeOrigin = EnsureRootOrThreeFifthsCouncil;
type RemoveOrigin = EnsureRootOrThreeFifthsCouncil;
type ResetOrigin = EnsureRootOrThreeFifthsCouncil;
type SwapOrigin = EnsureRootOrThreeFifthsCouncil;
type PrimeOrigin = EnsureRootOrTwoThirdsCouncil;
type RemoveOrigin = EnsureRootOrTwoThirdsCouncil;
type ResetOrigin = EnsureRootOrTwoThirdsCouncil;
type SwapOrigin = EnsureRootOrTwoThirdsCouncil;
type WeightInfo = weights::pallet_membership::WeightInfo<Runtime>;
}

impl pallet_membership::Config<CouncilMembershipInstance> for Runtime {
type AddOrigin = EnsureRootOrThreeFifthsCouncil;
type AddOrigin = EnsureRootOrThreeFourthsCouncil;
type RuntimeEvent = RuntimeEvent;
type MaxMembers = CouncilMaxMembers;
type MembershipChanged = Council;
type MembershipInitialized = Council;
type PrimeOrigin = EnsureRootOrThreeFifthsCouncil;
type RemoveOrigin = EnsureRootOrThreeFifthsCouncil;
type ResetOrigin = EnsureRootOrThreeFifthsCouncil;
type SwapOrigin = EnsureRootOrThreeFifthsCouncil;
type PrimeOrigin = EnsureRootOrThreeFourthsCouncil;
type RemoveOrigin = EnsureRootOrThreeFourthsCouncil;
type ResetOrigin = EnsureRootOrThreeFourthsCouncil;
type SwapOrigin = EnsureRootOrThreeFourthsCouncil;
type WeightInfo = weights::pallet_membership::WeightInfo<Runtime>;
}

impl pallet_membership::Config<TechnicalCommitteeMembershipInstance> for Runtime {
type AddOrigin = EnsureRootOrThreeFifthsCouncil;
type AddOrigin = EnsureRootOrTwoThirdsCouncil;
type RuntimeEvent = RuntimeEvent;
type MaxMembers = TechnicalCommitteeMaxMembers;
type MembershipChanged = TechnicalCommittee;
type MembershipInitialized = TechnicalCommittee;
type PrimeOrigin = EnsureRootOrThreeFifthsCouncil;
type RemoveOrigin = EnsureRootOrThreeFifthsCouncil;
type ResetOrigin = EnsureRootOrThreeFifthsCouncil;
type SwapOrigin = EnsureRootOrThreeFifthsCouncil;
type PrimeOrigin = EnsureRootOrTwoThirdsCouncil;
type RemoveOrigin = EnsureRootOrTwoThirdsCouncil;
type ResetOrigin = EnsureRootOrTwoThirdsCouncil;
type SwapOrigin = EnsureRootOrTwoThirdsCouncil;
type WeightInfo = weights::pallet_membership::WeightInfo<Runtime>;
}

Expand Down

0 comments on commit bc0fa27

Please sign in to comment.