From a8d52394fd4d3f3a2a75a775b0857cd8c5a5a62a Mon Sep 17 00:00:00 2001 From: Alin Dima Date: Thu, 22 Feb 2024 20:47:06 +0200 Subject: [PATCH] bump ParachainHost to api version 9 (#194) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Will be needed for enabling the fix for https://github.com/paritytech/polkadot-sdk/issues/3144 (unbricking paraids which acquire multiple cores via coretime). Will also be needed in the future for enabling other features, like https://github.com/paritytech/polkadot-sdk/pull/1644 and https://github.com/paritytech/polkadot-sdk/issues/628 --------- Signed-off-by: alindima Co-authored-by: Bastian Köcher --- CHANGELOG.md | 1 + integration-tests/emulated/chains/src/lib.rs | 2 +- relay/kusama/src/lib.rs | 18 +++++++++++------- 3 files changed, 13 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f26efe9c56..050db393b5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,6 +20,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). - MMR leaves generated by `pallet_mmr` point to the next-authority-set of the current block instead of the prior block [polkadot-fellows/runtimes#169](https://github.com/polkadot-fellows/runtimes/pull/169) - Upgrade dependencies to the `polkadot-sdk@1.5.0` release ([polkadot-fellows/runtimes#137](https://github.com/polkadot-fellows/runtimes/pull/137)) - Deprecate the `xcm::body::TREASURER_INDEX` constant and use the standard `Treasury` variant from the `xcm::BodyId` type instead ([polkadot-fellows/runtimes#149](https://github.com/polkadot-fellows/runtimes/pull/149)) +- Bump parachains runtime API to v9 in Kusama to enable the `node_features` function [polkadot-fellows/runtimes#194](https://github.com/polkadot-fellows/runtimes/pull/194) ### Removed diff --git a/integration-tests/emulated/chains/src/lib.rs b/integration-tests/emulated/chains/src/lib.rs index a4e6f3eed7..d56d2b190e 100644 --- a/integration-tests/emulated/chains/src/lib.rs +++ b/integration-tests/emulated/chains/src/lib.rs @@ -56,7 +56,7 @@ decl_test_relay_chains! { Hrmp: polkadot_runtime::Hrmp, } }, - #[api_version(8)] + #[api_version(9)] pub struct Kusama { genesis = kusama::genesis(), on_init = (), diff --git a/relay/kusama/src/lib.rs b/relay/kusama/src/lib.rs index 9460ee3c25..133aa3d81e 100644 --- a/relay/kusama/src/lib.rs +++ b/relay/kusama/src/lib.rs @@ -23,12 +23,12 @@ use pallet_nis::WithMaximumOf; use parity_scale_codec::{Decode, Encode, MaxEncodedLen}; use primitives::{ - slashing, AccountId, AccountIndex, Balance, BlockNumber, CandidateEvent, CandidateHash, - CommittedCandidateReceipt, CoreState, DisputeState, ExecutorParams, GroupRotationInfo, Hash, - Id as ParaId, InboundDownwardMessage, InboundHrmpMessage, Moment, Nonce, - OccupiedCoreAssumption, PersistedValidationData, ScrapedOnChainVotes, SessionInfo, Signature, - ValidationCode, ValidationCodeHash, ValidatorId, ValidatorIndex, LOWEST_PUBLIC_ID, - PARACHAIN_KEY_TYPE_ID, + slashing, vstaging::NodeFeatures, AccountId, AccountIndex, Balance, BlockNumber, + CandidateEvent, CandidateHash, CommittedCandidateReceipt, CoreState, DisputeState, + ExecutorParams, GroupRotationInfo, Hash, Id as ParaId, InboundDownwardMessage, + InboundHrmpMessage, Moment, Nonce, OccupiedCoreAssumption, PersistedValidationData, + ScrapedOnChainVotes, SessionInfo, Signature, ValidationCode, ValidationCodeHash, ValidatorId, + ValidatorIndex, LOWEST_PUBLIC_ID, PARACHAIN_KEY_TYPE_ID, }; use runtime_common::{ auctions, claims, crowdloan, impl_runtime_weights, @@ -1821,7 +1821,7 @@ sp_api::impl_runtime_apis! { } } - #[api_version(8)] + #[api_version(9)] impl primitives::runtime_api::ParachainHost for Runtime { fn validators() -> Vec { parachains_runtime_api_impl::validators::() @@ -1968,6 +1968,10 @@ sp_api::impl_runtime_apis! { fn disabled_validators() -> Vec { parachains_vstaging_api_impl::disabled_validators::() } + + fn node_features() -> NodeFeatures { + parachains_vstaging_api_impl::node_features::() + } } impl beefy_primitives::BeefyApi for Runtime {