From cbef935ff419af523977f074957e1e741e945b0a Mon Sep 17 00:00:00 2001 From: joe petrowski <25483142+joepetrowski@users.noreply.github.com> Date: Fri, 14 Jun 2024 10:58:43 +0200 Subject: [PATCH] Polkadot People Phase 2 (Triggers Release 1.2.7) (#350) Phase 2 of the Polkadot People launch, as described in the [forum post](https://forum.polkadot.network/t/people-chain-launch-and-identity-migration-plan/5930). Should not be applied until the People Chain is running and deposits have been migrated from the Relay Chain. Built on top of https://github.com/polkadot-fellows/runtimes/pull/349 and should be merged after. --- CHANGELOG.md | 11 +++++++++++ .../people-polkadot/src/tests/reap_identity.rs | 3 +-- relay/polkadot/src/lib.rs | 8 +++++--- .../people/people-polkadot/src/lib.rs | 17 ++++------------- 4 files changed, 21 insertions(+), 18 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1a49244ba0..2c1d8a0048 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,17 @@ Changelog for the runtimes governed by the Polkadot Fellowship. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). +## [1.2.7] 14.06.2024 + +Note: This release only affects the following runtimes and is not a full system release: + +- Polkadot Relay Chain +- Polkadot People + +### Changed + +- Updated Relay and People configurations to complete launch ([polkadot-fellows/runtimes#350](https://github.com/polkadot-fellows/runtimes/pull/350)) + ## [1.2.6] 13.06.2024 Note: This release only affects the following runtimes and is not a full system release: diff --git a/integration-tests/emulated/tests/people/people-polkadot/src/tests/reap_identity.rs b/integration-tests/emulated/tests/people/people-polkadot/src/tests/reap_identity.rs index 18226fd901..fb67e9e0e1 100644 --- a/integration-tests/emulated/tests/people/people-polkadot/src/tests/reap_identity.rs +++ b/integration-tests/emulated/tests/people/people-polkadot/src/tests/reap_identity.rs @@ -301,8 +301,7 @@ fn assert_reap_id_relay(total_deposit: Balance, id: &Identity) { assert_ok!(PolkadotIdentityMigrator::reap_identity( // Note: Root for launch testing, Signed once we open migrations. - // PolkadotOrigin::signed(PolkadotRelaySender::get()), - PolkadotOrigin::root(), + PolkadotOrigin::signed(PolkadotRelaySender::get()), PolkadotRelaySender::get() )); diff --git a/relay/polkadot/src/lib.rs b/relay/polkadot/src/lib.rs index fb9f0d1b95..a3826f1eac 100644 --- a/relay/polkadot/src/lib.rs +++ b/relay/polkadot/src/lib.rs @@ -136,6 +136,9 @@ pub mod xcm_config; use impls::ToParachainIdentityReaper; +#[cfg(not(feature = "runtime-benchmarks"))] +use frame_system::EnsureSigned; + pub const LOG_TARGET: &str = "runtime::polkadot"; use polkadot_runtime_common as runtime_common; @@ -152,7 +155,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { spec_name: create_runtime_str!("polkadot"), impl_name: create_runtime_str!("parity-polkadot"), authoring_version: 0, - spec_version: 1_002_006, + spec_version: 1_002_007, impl_version: 0, apis: RUNTIME_API_VERSIONS, transaction_version: 26, @@ -859,9 +862,8 @@ impl pallet_identity::Config for Runtime { impl identity_migrator::Config for Runtime { type RuntimeEvent = RuntimeEvent; - // To be updated to `EnsureSigned` once the parachain is producing blocks. #[cfg(not(feature = "runtime-benchmarks"))] - type Reaper = EnsureRoot; + type Reaper = EnsureSigned; #[cfg(feature = "runtime-benchmarks")] type Reaper = impls::benchmarks::InitializeReaperForBenchmarking>; diff --git a/system-parachains/people/people-polkadot/src/lib.rs b/system-parachains/people/people-polkadot/src/lib.rs index fbd9b96d40..717c1f7b91 100644 --- a/system-parachains/people/people-polkadot/src/lib.rs +++ b/system-parachains/people/people-polkadot/src/lib.rs @@ -31,8 +31,8 @@ use frame_support::{ genesis_builder_helper::{build_config, create_default_config}, parameter_types, traits::{ - tokens::imbalance::ResolveTo, ConstBool, ConstU32, ConstU64, ConstU8, Contains, - EitherOfDiverse, EverythingBut, InstanceFilter, TransformOrigin, + tokens::imbalance::ResolveTo, ConstBool, ConstU32, ConstU64, ConstU8, EitherOfDiverse, + Everything, InstanceFilter, TransformOrigin, }, weights::{ConstantMultiplier, Weight}, PalletId, @@ -128,7 +128,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { spec_name: create_runtime_str!("people-polkadot"), impl_name: create_runtime_str!("people-polkadot"), authoring_version: 1, - spec_version: 1_002_006, + spec_version: 1_002_007, impl_version: 0, apis: RUNTIME_API_VERSIONS, transaction_version: 0, @@ -166,18 +166,9 @@ parameter_types! { pub const SS58Prefix: u8 = 0; } -/// A type to identify calls to the Identity pallet. These will be filtered to prevent invocation, -/// locking the state of the pallet and preventing updates to identities until the chain is stable. -pub struct IsIdentityCall; -impl Contains for IsIdentityCall { - fn contains(c: &RuntimeCall) -> bool { - matches!(c, RuntimeCall::Identity(_)) - } -} - #[derive_impl(frame_system::config_preludes::ParaChainDefaultConfig as frame_system::DefaultConfig)] impl frame_system::Config for Runtime { - type BaseCallFilter = EverythingBut; + type BaseCallFilter = Everything; type AccountId = AccountId; type Nonce = Nonce; type Hash = Hash;