Skip to content

Commit

Permalink
Bump ParachainHost to api version 10 on kusama (#204)
Browse files Browse the repository at this point in the history
... to add approval_voting_params API which will allow us to enable
approvals coalescing implementation from:
 - paritytech/polkadot-sdk#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.

<!-- Remember that you can run `/merge` to enable auto-merge in the PR
-->

<!-- Remember to modify the changelog. If you don't need to modify it,
you can check the following box.
Instead, if you have already modified it, simply delete the following
line. -->

---------

Signed-off-by: Alexandru Gheorghe <alexandru.gheorghe@parity.io>
  • Loading branch information
alexggh authored Feb 29, 2024
1 parent 59172d5 commit 0718945
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 8 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
1 change: 0 additions & 1 deletion integration-tests/emulated/chains/relays/kusama/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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! {
Expand Down
20 changes: 13 additions & 7 deletions relay/kusama/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,14 @@
use pallet_nis::WithMaximumOf;
use parity_scale_codec::{Decode, Encode, MaxEncodedLen};
use primitives::{
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,
slashing,
vstaging::{ApprovalVotingParams, 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,
Expand Down Expand Up @@ -1899,7 +1901,7 @@ sp_api::impl_runtime_apis! {
}
}

#[api_version(9)]
#[api_version(10)]
impl primitives::runtime_api::ParachainHost<Block> for Runtime {
fn validators() -> Vec<ValidatorId> {
parachains_runtime_api_impl::validators::<Runtime>()
Expand Down Expand Up @@ -2050,6 +2052,10 @@ sp_api::impl_runtime_apis! {
fn node_features() -> NodeFeatures {
parachains_vstaging_api_impl::node_features::<Runtime>()
}

fn approval_voting_params() -> ApprovalVotingParams {
parachains_vstaging_api_impl::approval_voting_params::<Runtime>()
}
}

impl beefy_primitives::BeefyApi<Block, BeefyId> for Runtime {
Expand Down

0 comments on commit 0718945

Please sign in to comment.