Introduce Fellowship into Collectives (#2186)

* Fellowship into Collectives

* cargo.lock

* tracks alias

* allow to send Fellows origin over XCM

* update todos, remove duplication of type

* use Collectives location for Fellows body

* alias for ranks constants

* benchmarks

* proxy for Fellowship

* docs

* correct copyright date

* Apply suggestions from code review

Co-authored-by: joe petrowski <25483142+joepetrowski@users.noreply.github.com>

* rustfmt

* remove council, update origins

* renames

* remove tech committee from promote origin

* renames

* doc nits

* weights with new api

* sane weights for pallet_scheduler

* XCM tweaks for OpenGov (#2305)

* updated xcm configs for collectives and statemint

* remove xcm send from safe filter

* remove prod_or_fast

* remove empty line

* drop redundant aggregation

* remove match arm duplication

---------

Co-authored-by: joe petrowski <25483142+joepetrowski@users.noreply.github.com>
This commit is contained in:
Muharem Ismailov
2023-03-21 14:10:37 +01:00
committed by GitHub
parent a2e55084b0
commit 7623aba639
24 changed files with 1914 additions and 113 deletions
+10 -5
View File
@@ -29,7 +29,7 @@ use frame_support::{
construct_runtime,
dispatch::DispatchClass,
parameter_types,
traits::{ConstU32, ConstU64, ConstU8, Everything},
traits::{ConstU32, ConstU64, ConstU8, EitherOfDiverse, Everything},
weights::{
constants::WEIGHT_REF_TIME_PER_SECOND, ConstantMultiplier, Weight, WeightToFeeCoefficient,
WeightToFeeCoefficients, WeightToFeePolynomial,
@@ -40,9 +40,10 @@ use frame_system::{
limits::{BlockLength, BlockWeights},
EnsureRoot,
};
use pallet_xcm::{EnsureXcm, IsVoiceOfBody};
pub use sp_consensus_aura::sr25519::AuthorityId as AuraId;
pub use sp_runtime::{MultiAddress, Perbill, Permill};
use xcm_config::{XcmConfig, XcmOriginToTransactDispatchOrigin};
use xcm_config::{RelayLocation, XcmConfig, XcmOriginToTransactDispatchOrigin};
#[cfg(any(feature = "std", test))]
pub use sp_runtime::BuildStorage;
@@ -429,11 +430,15 @@ parameter_types! {
pub const MinCandidates: u32 = 5;
pub const SessionLength: BlockNumber = 6 * HOURS;
pub const MaxInvulnerables: u32 = 100;
pub const ExecutiveBody: BodyId = BodyId::Executive;
// StakingAdmin pluralistic body.
pub const StakingAdminBodyId: BodyId = BodyId::Defense;
}
// We allow root only to execute privileged collator selection operations.
pub type CollatorSelectionUpdateOrigin = EnsureRoot<AccountId>;
/// We allow root and the StakingAdmin to execute privileged collator selection operations.
pub type CollatorSelectionUpdateOrigin = EitherOfDiverse<
EnsureRoot<AccountId>,
EnsureXcm<IsVoiceOfBody<RelayLocation, StakingAdminBodyId>>,
>;
impl pallet_collator_selection::Config for Runtime {
type RuntimeEvent = RuntimeEvent;