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
@@ -46,7 +46,7 @@ pub use ambassador::pallet_ambassador_origins;
use cumulus_pallet_parachain_system::RelayNumberStrictlyIncreases;
use fellowship::{pallet_fellowship_origins, Fellows};
use impls::{AllianceProposalProvider, EqualOrGreatestRootCmp, ToParentTreasury};
use impls::{AllianceProposalProvider, EqualOrGreatestRootCmp};
use sp_api::impl_runtime_apis;
use sp_core::{crypto::KeyTypeId, OpaqueMetadata};
use sp_runtime::{
@@ -81,7 +81,7 @@ use frame_system::{
};
pub use parachains_common as common;
use parachains_common::{
impls::DealWithFees,
impls::{DealWithFees, ToParentTreasury},
message_queue::*,
westend::{account::*, consensus::*, currency::*, fee::WeightToFee},
AccountId, AuraId, Balance, BlockNumber, Hash, Header, Nonce, Signature,
@@ -89,7 +89,9 @@ use parachains_common::{
SLOT_DURATION,
};
use sp_runtime::RuntimeDebug;
use xcm_config::{GovernanceLocation, TreasurerBodyId, XcmOriginToTransactDispatchOrigin};
use xcm_config::{
GovernanceLocation, LocationToAccountId, TreasurerBodyId, XcmOriginToTransactDispatchOrigin,
};
#[cfg(any(feature = "std", test))]
pub use sp_runtime::BuildStorage;
@@ -537,9 +539,6 @@ pub const MAX_ALLIES: u32 = 100;
parameter_types! {
pub const AllyDeposit: Balance = 1_000 * UNITS; // 1,000 WND bond to join as an Ally
// The Alliance pallet account, used as a temporary place to deposit a slashed imbalance
// before the teleport to the Treasury.
pub AlliancePalletAccount: AccountId = ALLIANCE_PALLET_ID.into_account_truncating();
pub WestendTreasuryAccount: AccountId = WESTEND_TREASURY_PALLET_ID.into_account_truncating();
// The number of blocks a member must wait between giving a retirement notice and retiring.
// Supposed to be greater than time required to `kick_member` with alliance motion.
@@ -553,7 +552,7 @@ impl pallet_alliance::Config for Runtime {
type MembershipManager = RootOrAllianceTwoThirdsMajority;
type AnnouncementOrigin = RootOrAllianceTwoThirdsMajority;
type Currency = Balances;
type Slashed = ToParentTreasury<WestendTreasuryAccount, AlliancePalletAccount, Runtime>;
type Slashed = ToParentTreasury<WestendTreasuryAccount, LocationToAccountId, Runtime>;
type InitializeMembers = AllianceMotion;
type MembershipChanged = AllianceMotion;
type RetirementPeriod = AllianceRetirementPeriod;