Rococo & Westend People Chain (#2281)

Rococo and Westend runtimes for the "People Chain". This chain contains
the Identity pallet with plans to migrate all related data from the
Relay Chain.

Changes `IdentityInfo` to:

- Remove `additional_fields`.
- Add `github` and `discord` as first class fields. From scraping chain
data, these were the only two additional fields used (for the Fellowship
and Ambassador Program, respectively).
- Rename `riot` to `matrix`.

Note: This will use the script in
https://github.com/paritytech/polkadot-sdk/pull/2025 to generate the
genesis state.

TODO:

- [x] https://github.com/paritytech/polkadot-sdk/pull/1814 and
integration of the Identity Migrator pallet for migration.
- [x] Tests: https://github.com/paritytech/polkadot-sdk/pull/2373

---------

Co-authored-by: Muharem <ismailov.m.h@gmail.com>
Co-authored-by: Michal Kucharczyk <1728078+michalkucharczyk@users.noreply.github.com>
Co-authored-by: Dónal Murray <donal.murray@parity.io>
Co-authored-by: Richard Melkonian <35300528+0xmovses@users.noreply.github.com>
Co-authored-by: Liam Aharon <liam.aharon@hotmail.com>
This commit is contained in:
joe petrowski
2023-12-22 21:28:09 +01:00
committed by GitHub
parent 4c0e0e0713
commit ecbbb5a736
111 changed files with 12730 additions and 258 deletions
+13 -2
View File
@@ -25,7 +25,7 @@ use crate::governance::StakingAdmin;
use frame_support::{
match_types, parameter_types,
traits::{Everything, Nothing},
traits::{Equals, Everything, Nothing},
weights::Weight,
};
use frame_system::EnsureRoot;
@@ -50,6 +50,7 @@ use xcm_builder::{
use xcm_executor::XcmExecutor;
parameter_types! {
pub const RootLocation: MultiLocation = MultiLocation::here();
pub const TokenLocation: MultiLocation = Here.into_location();
pub const ThisNetwork: NetworkId = NetworkId::Rococo;
pub UniversalLocation: InteriorMultiLocation = ThisNetwork::get().into();
@@ -120,6 +121,7 @@ parameter_types! {
pub const Contracts: MultiLocation = Parachain(CONTRACTS_ID).into_location();
pub const Encointer: MultiLocation = Parachain(ENCOINTER_ID).into_location();
pub const BridgeHub: MultiLocation = Parachain(BRIDGE_HUB_ID).into_location();
pub const People: MultiLocation = Parachain(PEOPLE_ID).into_location();
pub const Broker: MultiLocation = Parachain(BROKER_ID).into_location();
pub const Tick: MultiLocation = Parachain(100).into_location();
pub const Trick: MultiLocation = Parachain(110).into_location();
@@ -131,6 +133,7 @@ parameter_types! {
pub const RocForContracts: (MultiAssetFilter, MultiLocation) = (Roc::get(), Contracts::get());
pub const RocForEncointer: (MultiAssetFilter, MultiLocation) = (Roc::get(), Encointer::get());
pub const RocForBridgeHub: (MultiAssetFilter, MultiLocation) = (Roc::get(), BridgeHub::get());
pub const RocForPeople: (MultiAssetFilter, MultiLocation) = (Roc::get(), People::get());
pub const RocForBroker: (MultiAssetFilter, MultiLocation) = (Roc::get(), Broker::get());
pub const MaxInstructions: u32 = 100;
pub const MaxAssetsIntoHolding: u32 = 64;
@@ -143,6 +146,7 @@ pub type TrustedTeleporters = (
xcm_builder::Case<RocForContracts>,
xcm_builder::Case<RocForEncointer>,
xcm_builder::Case<RocForBridgeHub>,
xcm_builder::Case<RocForPeople>,
xcm_builder::Case<RocForBroker>,
);
@@ -150,6 +154,9 @@ match_types! {
pub type OnlyParachains: impl Contains<MultiLocation> = {
MultiLocation { parents: 0, interior: X1(Parachain(_)) }
};
pub type LocalPlurality: impl Contains<MultiLocation> = {
MultiLocation { parents: 0, interior: X1(Plurality { .. }) }
};
}
/// The barriers one of which must be passed for an XCM message to be executed.
@@ -172,6 +179,10 @@ pub type Barrier = TrailingSetTopicAsId<(
>,
)>;
/// Locations that will not be charged fees in the executor, neither for execution nor delivery.
/// We only waive fees for system functions, which these locations represent.
pub type WaivedLocations = (SystemParachains, Equals<RootLocation>, LocalPlurality);
pub struct XcmConfig;
impl xcm_executor::Config for XcmConfig {
type RuntimeCall = RuntimeCall;
@@ -198,7 +209,7 @@ impl xcm_executor::Config for XcmConfig {
type PalletInstancesInfo = AllPalletsWithSystem;
type MaxAssetsIntoHolding = MaxAssetsIntoHolding;
type FeeManager = XcmFeeManagerFromComponents<
SystemParachains,
WaivedLocations,
XcmFeeToAccount<Self::AssetTransactor, AccountId, TreasuryAccount>,
>;
type MessageExporter = ();