From 7f8b6dbf4f35d5c9d0851ba3878b8606190beab9 Mon Sep 17 00:00:00 2001 From: Alexandru Gheorghe Date: Wed, 28 Feb 2024 10:02:11 +0200 Subject: [PATCH] Bump ParachainHost to api version 10 on kusama ... to add approval_voting_params API which will allow us to enable approvals coalescing implementation from: - https://github.com/paritytech/polkadot-sdk/pull/1191 Note! Bumping the version will not enable the new logic, that will be enable at a later date we we decide to call set_approval_voting_params with max_approval_coalesce_count greater than 1. Signed-off-by: Alexandru Gheorghe --- CHANGELOG.md | 1 + .../emulated/chains/relays/kusama/src/lib.rs | 1 - relay/kusama/src/lib.rs | 8 ++++++-- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ca331bdf94..ec51af649a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -22,6 +22,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) - 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) +- Bump parachains runtime API to v10 in Kusama to enable the `approval-voting-params` function [polkadot-fellows/runtimes#204](https://github.com/polkadot-fellows/runtimes/pull/204) ### Removed diff --git a/integration-tests/emulated/chains/relays/kusama/src/lib.rs b/integration-tests/emulated/chains/relays/kusama/src/lib.rs index 58e82a51d0..b3718e69cc 100644 --- a/integration-tests/emulated/chains/relays/kusama/src/lib.rs +++ b/integration-tests/emulated/chains/relays/kusama/src/lib.rs @@ -21,7 +21,6 @@ use emulated_integration_tests_common::{ impl_hrmp_channels_helpers_for_relay_chain, impl_send_transact_helpers_for_relay_chain, xcm_emulator::decl_test_relay_chains, }; -use polkadot_primitives::runtime_api::runtime_decl_for_parachain_host::ParachainHostV9; // Kusama declaration decl_test_relay_chains! { diff --git a/relay/kusama/src/lib.rs b/relay/kusama/src/lib.rs index bc813a2457..050fb6ae9b 100644 --- a/relay/kusama/src/lib.rs +++ b/relay/kusama/src/lib.rs @@ -23,7 +23,7 @@ use pallet_nis::WithMaximumOf; use parity_scale_codec::{Decode, Encode, MaxEncodedLen}; use primitives::{ - slashing, vstaging::NodeFeatures, AccountId, AccountIndex, Balance, BlockNumber, + slashing, vstaging::{NodeFeatures, ApprovalVotingParams}, AccountId, AccountIndex, Balance, BlockNumber, CandidateEvent, CandidateHash, CommittedCandidateReceipt, CoreState, DisputeState, ExecutorParams, GroupRotationInfo, Hash, Id as ParaId, InboundDownwardMessage, InboundHrmpMessage, Moment, Nonce, OccupiedCoreAssumption, PersistedValidationData, @@ -1899,7 +1899,7 @@ sp_api::impl_runtime_apis! { } } - #[api_version(9)] + #[api_version(10)] impl primitives::runtime_api::ParachainHost for Runtime { fn validators() -> Vec { parachains_runtime_api_impl::validators::() @@ -2050,6 +2050,10 @@ sp_api::impl_runtime_apis! { fn node_features() -> NodeFeatures { parachains_vstaging_api_impl::node_features::() } + + fn approval_voting_params() -> ApprovalVotingParams { + parachains_vstaging_api_impl::approval_voting_params::() + } } impl beefy_primitives::BeefyApi for Runtime {