diff --git a/polkadot/runtime/rococo/src/lib.rs b/polkadot/runtime/rococo/src/lib.rs index 07b0108575..33bb2087b2 100644 --- a/polkadot/runtime/rococo/src/lib.rs +++ b/polkadot/runtime/rococo/src/lib.rs @@ -103,7 +103,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { spec_name: create_runtime_str!("rococo"), impl_name: create_runtime_str!("parity-rococo-v1-1"), authoring_version: 0, - spec_version: 210, + spec_version: 215, impl_version: 0, #[cfg(not(feature = "disable-runtime-api"))] apis: RUNTIME_API_VERSIONS, diff --git a/polkadot/runtime/rococo/src/propose_parachain.rs b/polkadot/runtime/rococo/src/propose_parachain.rs index 7350d0c0e9..79f9947141 100644 --- a/polkadot/runtime/rococo/src/propose_parachain.rs +++ b/polkadot/runtime/rococo/src/propose_parachain.rs @@ -107,6 +107,8 @@ decl_event! { ParachainRegistered(ParaId), /// New validators were added to the set. ValidatorsRegistered(Vec), + /// Validators were removed from the set. + ValidatorsDeregistered(Vec), } } @@ -296,6 +298,8 @@ decl_module! { } /// Add new validators to the set. + /// + /// The new validators will be active from current session + 2. #[weight = 100_000] fn register_validators( origin, @@ -307,6 +311,21 @@ decl_module! { Self::deposit_event(RawEvent::ValidatorsRegistered(validators)); } + + /// Remove validators from the set. + /// + /// The removed validators will be deactivated from current session + 2. + #[weight = 100_000] + fn deregister_validators( + origin, + validators: Vec, + ) { + T::PriviledgedOrigin::ensure_origin(origin)?; + + validators.clone().into_iter().for_each(|v| ValidatorsToRetire::::append(v)); + + Self::deposit_event(RawEvent::ValidatorsDeregistered(validators)); + } } }