mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 05:51:02 +00:00
Companion: Accept Kusama StakingAdmin origin (#1865)
* Companion: Accept Kusamsa StakinAdmin origin * Fellows origin for xcmp queue controller * plurality bodies to ensure origin * include root into controller ensure origin * fix * use xcm bodies * rename to more frequent "defense" Co-authored-by: parity-processbot <>
This commit is contained in:
@@ -69,7 +69,7 @@ use xcm_config::{KsmLocation, XcmConfig};
|
|||||||
pub use sp_runtime::BuildStorage;
|
pub use sp_runtime::BuildStorage;
|
||||||
|
|
||||||
// Polkadot imports
|
// Polkadot imports
|
||||||
use pallet_xcm::{EnsureXcm, IsMajorityOfBody};
|
use pallet_xcm::{EnsureXcm, IsMajorityOfBody, IsVoiceOfBody};
|
||||||
use polkadot_runtime_common::{BlockHashCount, SlowAdjustingFeeUpdate};
|
use polkadot_runtime_common::{BlockHashCount, SlowAdjustingFeeUpdate};
|
||||||
use xcm::latest::BodyId;
|
use xcm::latest::BodyId;
|
||||||
use xcm_executor::XcmExecutor;
|
use xcm_executor::XcmExecutor;
|
||||||
@@ -451,6 +451,11 @@ impl parachain_info::Config for Runtime {}
|
|||||||
|
|
||||||
impl cumulus_pallet_aura_ext::Config for Runtime {}
|
impl cumulus_pallet_aura_ext::Config for Runtime {}
|
||||||
|
|
||||||
|
parameter_types! {
|
||||||
|
// Fellows pluralistic body.
|
||||||
|
pub const FellowsBodyId: BodyId = BodyId::Technical;
|
||||||
|
}
|
||||||
|
|
||||||
impl cumulus_pallet_xcmp_queue::Config for Runtime {
|
impl cumulus_pallet_xcmp_queue::Config for Runtime {
|
||||||
type RuntimeEvent = RuntimeEvent;
|
type RuntimeEvent = RuntimeEvent;
|
||||||
type XcmExecutor = XcmExecutor<XcmConfig>;
|
type XcmExecutor = XcmExecutor<XcmConfig>;
|
||||||
@@ -459,7 +464,10 @@ impl cumulus_pallet_xcmp_queue::Config for Runtime {
|
|||||||
type ExecuteOverweightOrigin = EnsureRoot<AccountId>;
|
type ExecuteOverweightOrigin = EnsureRoot<AccountId>;
|
||||||
type ControllerOrigin = EitherOfDiverse<
|
type ControllerOrigin = EitherOfDiverse<
|
||||||
EnsureRoot<AccountId>,
|
EnsureRoot<AccountId>,
|
||||||
EnsureXcm<IsMajorityOfBody<KsmLocation, ExecutiveBody>>,
|
EnsureXcm<(
|
||||||
|
IsMajorityOfBody<KsmLocation, ExecutiveBody>,
|
||||||
|
IsVoiceOfBody<KsmLocation, FellowsBodyId>,
|
||||||
|
)>,
|
||||||
>;
|
>;
|
||||||
type ControllerOriginConverter = xcm_config::XcmOriginToTransactDispatchOrigin;
|
type ControllerOriginConverter = xcm_config::XcmOriginToTransactDispatchOrigin;
|
||||||
type WeightInfo = weights::cumulus_pallet_xcmp_queue::WeightInfo<Runtime>;
|
type WeightInfo = weights::cumulus_pallet_xcmp_queue::WeightInfo<Runtime>;
|
||||||
@@ -502,11 +510,18 @@ parameter_types! {
|
|||||||
pub const MinCandidates: u32 = 5;
|
pub const MinCandidates: u32 = 5;
|
||||||
pub const SessionLength: BlockNumber = 6 * HOURS;
|
pub const SessionLength: BlockNumber = 6 * HOURS;
|
||||||
pub const MaxInvulnerables: u32 = 100;
|
pub const MaxInvulnerables: u32 = 100;
|
||||||
|
// StakingAdmin pluralistic body.
|
||||||
|
pub const StakingAdminBodyId: BodyId = BodyId::Defense;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// We allow root and the Relay Chain council to execute privileged collator selection operations.
|
/// We allow root, the Relay Chain council and the StakingAdmin to execute privileged collator selection operations.
|
||||||
pub type CollatorSelectionUpdateOrigin =
|
pub type CollatorSelectionUpdateOrigin = EitherOfDiverse<
|
||||||
EitherOfDiverse<EnsureRoot<AccountId>, EnsureXcm<IsMajorityOfBody<KsmLocation, ExecutiveBody>>>;
|
EnsureRoot<AccountId>,
|
||||||
|
EnsureXcm<(
|
||||||
|
IsMajorityOfBody<KsmLocation, ExecutiveBody>,
|
||||||
|
IsVoiceOfBody<KsmLocation, StakingAdminBodyId>,
|
||||||
|
)>,
|
||||||
|
>;
|
||||||
|
|
||||||
impl pallet_collator_selection::Config for Runtime {
|
impl pallet_collator_selection::Config for Runtime {
|
||||||
type RuntimeEvent = RuntimeEvent;
|
type RuntimeEvent = RuntimeEvent;
|
||||||
|
|||||||
Reference in New Issue
Block a user