diff --git a/polkadot/runtime/kusama/src/xcm_config.rs b/polkadot/runtime/kusama/src/xcm_config.rs index 5725f54edd..c90e6c55a9 100644 --- a/polkadot/runtime/kusama/src/xcm_config.rs +++ b/polkadot/runtime/kusama/src/xcm_config.rs @@ -385,7 +385,7 @@ pub type LocalPalletOriginToLocation = ( impl pallet_xcm::Config for Runtime { type RuntimeEvent = RuntimeEvent; - // We only allow the root, the council, fellows and the staking admin to send messages. + // We only allow the root, fellows and the staking admin to send messages. // This is basically safe to enable for everyone (safe the possibility of someone spamming the // parachain if they're willing to pay the KSM to send from the Relay-chain), but it's useless // until we bring in XCM v3 which will make `DescendOrigin` a bit more useful. diff --git a/polkadot/runtime/polkadot/src/lib.rs b/polkadot/runtime/polkadot/src/lib.rs index da8cf7cb5a..96ac8bad6c 100644 --- a/polkadot/runtime/polkadot/src/lib.rs +++ b/polkadot/runtime/polkadot/src/lib.rs @@ -110,8 +110,8 @@ mod bag_thresholds; // Governance configurations. pub mod governance; use governance::{ - old::CouncilCollective, pallet_custom_origins, AuctionAdmin, FellowshipAdmin, GeneralAdmin, - LeaseAdmin, StakingAdmin, Treasurer, TreasurySpender, + pallet_custom_origins, AuctionAdmin, FellowshipAdmin, GeneralAdmin, LeaseAdmin, StakingAdmin, + Treasurer, TreasurySpender, }; pub mod xcm_config; diff --git a/polkadot/runtime/polkadot/src/xcm_config.rs b/polkadot/runtime/polkadot/src/xcm_config.rs index b2e09b1453..6c45f1cec4 100644 --- a/polkadot/runtime/polkadot/src/xcm_config.rs +++ b/polkadot/runtime/polkadot/src/xcm_config.rs @@ -17,8 +17,8 @@ //! XCM configuration for Polkadot. use super::{ - parachains_origin, AccountId, AllPalletsWithSystem, Balances, CouncilCollective, Dmp, - FellowshipAdmin, ParaId, Runtime, RuntimeCall, RuntimeEvent, RuntimeOrigin, StakingAdmin, + parachains_origin, AccountId, AllPalletsWithSystem, Balances, Dmp, FellowshipAdmin, + GeneralAdmin, ParaId, Runtime, RuntimeCall, RuntimeEvent, RuntimeOrigin, StakingAdmin, TransactionByteFee, WeightToFee, XcmPallet, }; use frame_support::{ @@ -40,11 +40,11 @@ use sp_core::ConstU32; use xcm::latest::prelude::*; use xcm_builder::{ AccountId32Aliases, AllowExplicitUnpaidExecutionFrom, AllowKnownQueryResponses, - AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom, BackingToPlurality, - ChildParachainAsNative, ChildParachainConvertsVia, CurrencyAdapter as XcmCurrencyAdapter, - IsConcrete, MintLocation, OriginToPluralityVoice, SignedAccountId32AsNative, - SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, TrailingSetTopicAsId, - UsingComponents, WeightInfoBounds, WithComputedOrigin, WithUniqueTopic, + AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom, ChildParachainAsNative, + ChildParachainConvertsVia, CurrencyAdapter as XcmCurrencyAdapter, IsConcrete, MintLocation, + OriginToPluralityVoice, SignedAccountId32AsNative, SignedToAccountId32, + SovereignSignedViaLocation, TakeWeightCredit, TrailingSetTopicAsId, UsingComponents, + WeightInfoBounds, WithComputedOrigin, WithUniqueTopic, }; use xcm_executor::traits::WithOriginFilter; @@ -350,7 +350,8 @@ impl xcm_executor::Config for XcmConfig { } parameter_types! { - pub const CouncilBodyId: BodyId = BodyId::Executive; + // `GeneralAdmin` pluralistic body. + pub const GeneralAdminBodyId: BodyId = BodyId::Administration; // StakingAdmin pluralistic body. pub const StakingAdminBodyId: BodyId = BodyId::Defense; // FellowshipAdmin pluralistic body. @@ -362,17 +363,14 @@ parameter_types! { pub ReachableDest: Option = Some(Parachain(1000).into()); } -/// Type to convert a council origin to a Plurality `MultiLocation` value. -pub type CouncilToPlurality = BackingToPlurality< - RuntimeOrigin, - pallet_collective::Origin, - CouncilBodyId, ->; +/// Type to convert the `GeneralAdmin` origin to a Plurality `MultiLocation` value. +pub type GeneralAdminToPlurality = + OriginToPluralityVoice; /// Type to convert an `Origin` type value into a `MultiLocation` value which represents an interior /// location of this chain. pub type LocalOriginToLocation = ( - CouncilToPlurality, + GeneralAdminToPlurality, // And a usual Signed origin to be used in XCM as a corresponding AccountId32 SignedToAccountId32, ); @@ -381,16 +379,15 @@ pub type LocalOriginToLocation = ( pub type StakingAdminToPlurality = OriginToPluralityVoice; -/// Type to convert the FellowshipAdmin origin to a Plurality `MultiLocation` value. +/// Type to convert the `FellowshipAdmin` origin to a Plurality `MultiLocation` value. pub type FellowshipAdminToPlurality = OriginToPluralityVoice; /// Type to convert a pallet `Origin` type value into a `MultiLocation` value which represents an /// interior location of this chain for a destination chain. pub type LocalPalletOriginToLocation = ( - // We allow an origin from the Collective pallet to be used in XCM as a corresponding Plurality - // of the `Unit` body. - CouncilToPlurality, + // GeneralAdmin origin to be used in XCM as a corresponding Plurality `MultiLocation` value. + GeneralAdminToPlurality, // StakingAdmin origin to be used in XCM as a corresponding Plurality `MultiLocation` value. StakingAdminToPlurality, // FellowshipAdmin origin to be used in XCM as a corresponding Plurality `MultiLocation` value. @@ -399,7 +396,7 @@ pub type LocalPalletOriginToLocation = ( impl pallet_xcm::Config for Runtime { type RuntimeEvent = RuntimeEvent; - // We only allow the root, the council, the fellowship admin and the staking admin to send + // We only allow the root, the general admin, the fellowship admin and the staking admin to send // messages. type SendXcmOrigin = xcm_builder::EnsureXcmOrigin; type XcmRouter = XcmRouter; diff --git a/polkadot/runtime/rococo/src/xcm_config.rs b/polkadot/runtime/rococo/src/xcm_config.rs index 75e06391c5..356cffaa0b 100644 --- a/polkadot/runtime/rococo/src/xcm_config.rs +++ b/polkadot/runtime/rococo/src/xcm_config.rs @@ -17,8 +17,8 @@ //! XCM configuration for Rococo. use super::{ - parachains_origin, AccountId, AllPalletsWithSystem, Balances, CouncilCollective, Dmp, ParaId, - Runtime, RuntimeCall, RuntimeEvent, RuntimeOrigin, TransactionByteFee, WeightToFee, XcmPallet, + parachains_origin, AccountId, AllPalletsWithSystem, Balances, Dmp, ParaId, Runtime, + RuntimeCall, RuntimeEvent, RuntimeOrigin, TransactionByteFee, WeightToFee, XcmPallet, }; use frame_support::{ match_types, parameter_types, @@ -36,8 +36,8 @@ use sp_core::ConstU32; use xcm::latest::prelude::*; use xcm_builder::{ AccountId32Aliases, AllowExplicitUnpaidExecutionFrom, AllowKnownQueryResponses, - AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom, BackingToPlurality, - ChildParachainAsNative, ChildParachainConvertsVia, ChildSystemParachainAsSuperuser, + AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom, ChildParachainAsNative, + ChildParachainConvertsVia, ChildSystemParachainAsSuperuser, CurrencyAdapter as XcmCurrencyAdapter, FixedWeightBounds, IsChildSystemParachain, IsConcrete, MintLocation, SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, TrailingSetTopicAsId, UsingComponents, WeightInfoBounds, WithComputedOrigin, @@ -322,33 +322,15 @@ impl xcm_executor::Config for XcmConfig { type Aliasers = Nothing; } -parameter_types! { - pub const CollectiveBodyId: BodyId = BodyId::Unit; -} - -parameter_types! { - pub const CouncilBodyId: BodyId = BodyId::Executive; -} - #[cfg(feature = "runtime-benchmarks")] parameter_types! { pub ReachableDest: Option = Some(Parachain(1000).into()); } -/// Type to convert the council origin to a Plurality `MultiLocation` value. -pub type CouncilToPlurality = BackingToPlurality< - RuntimeOrigin, - pallet_collective::Origin, - CouncilBodyId, ->; - /// Type to convert an `Origin` type value into a `MultiLocation` value which represents an interior /// location of this chain. pub type LocalOriginToLocation = ( - // We allow an origin from the Collective pallet to be used in XCM as a corresponding Plurality - // of the `Unit` body. - CouncilToPlurality, - // And a usual Signed origin to be used in XCM as a corresponding AccountId32 + // A usual Signed origin to be used in XCM as a corresponding AccountId32 SignedToAccountId32, ); impl pallet_xcm::Config for Runtime {