From 659f6e0279f923b57791ef5a735003e0a67a96b4 Mon Sep 17 00:00:00 2001 From: ordian Date: Thu, 18 Jan 2024 11:44:33 +0100 Subject: [PATCH] kusama: enable disabling ParachainHost API (#148) Closes https://github.com/paritytech/polkadot-sdk/issues/2967. --- CHANGELOG.md | 4 ++++ integration-tests/emulated/common/src/lib.rs | 2 +- relay/kusama/src/lib.rs | 10 ++++++++-- 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f9fb769526..c4cfde97db 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). - Introduce chain spec generator ([polkadot-fellows/runtimes#127](https://github.com/polkadot-fellows/runtimes/pull/127)) - Add [Encointer](https://encointer.org) system parachain runtime, completing [RFC22](https://github.com/polkadot-fellows/RFCs/blob/main/text/0022-adopt-encointer-runtime.md) ([polkadot-fellows/runtimes#80](https://github.com/polkadot-fellows/runtimes/pull/80)) +### Changed + +- Upgrade parachains runtime API from v7 to v8 in Kusama ([polkadot-fellows/runtimes#148](https://github.com/polkadot-fellows/runtimes/pull/148)). Context: https://paritytech.github.io/polkadot-sdk/book/protocol-validator-disabling.html + ## [1.1.0] 10.01.2024 ### Changed diff --git a/integration-tests/emulated/common/src/lib.rs b/integration-tests/emulated/common/src/lib.rs index d2eb63090f..11e6ef5921 100644 --- a/integration-tests/emulated/common/src/lib.rs +++ b/integration-tests/emulated/common/src/lib.rs @@ -38,7 +38,7 @@ use xcm_emulator::{ DefaultMessageProcessor, }; -use polkadot_primitives::runtime_api::runtime_decl_for_parachain_host::ParachainHostV7; +use polkadot_primitives::runtime_api::runtime_decl_for_parachain_host::ParachainHostV8; decl_test_relay_chains! { #[api_version(5)] diff --git a/relay/kusama/src/lib.rs b/relay/kusama/src/lib.rs index ac28a26466..f1db72848f 100644 --- a/relay/kusama/src/lib.rs +++ b/relay/kusama/src/lib.rs @@ -50,7 +50,9 @@ use runtime_parachains::{ inclusion::{AggregateMessageOrigin, UmpQueueId}, initializer as parachains_initializer, origin as parachains_origin, paras as parachains_paras, paras_inherent as parachains_paras_inherent, reward_points as parachains_reward_points, - runtime_api_impl::v7 as parachains_runtime_api_impl, + runtime_api_impl::{ + v7 as parachains_runtime_api_impl, vstaging as parachains_vstaging_api_impl, + }, scheduler as parachains_scheduler, session_info as parachains_session_info, shared as parachains_shared, }; @@ -1828,7 +1830,7 @@ sp_api::impl_runtime_apis! { } } - #[api_version(7)] + #[api_version(8)] impl primitives::runtime_api::ParachainHost for Runtime { fn validators() -> Vec { parachains_runtime_api_impl::validators::() @@ -1971,6 +1973,10 @@ sp_api::impl_runtime_apis! { fn async_backing_params() -> primitives::AsyncBackingParams { parachains_runtime_api_impl::async_backing_params::() } + + fn disabled_validators() -> Vec { + parachains_vstaging_api_impl::disabled_validators::() + } } impl beefy_primitives::BeefyApi for Runtime {