Skip to content

Commit

Permalink
kusama: enable disabling ParachainHost API (#148)
Browse files Browse the repository at this point in the history
  • Loading branch information
ordian authored Jan 18, 2024
1 parent 418a2a9 commit 659f6e0
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 3 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion integration-tests/emulated/common/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)]
Expand Down
10 changes: 8 additions & 2 deletions relay/kusama/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
};
Expand Down Expand Up @@ -1828,7 +1830,7 @@ sp_api::impl_runtime_apis! {
}
}

#[api_version(7)]
#[api_version(8)]
impl primitives::runtime_api::ParachainHost<Block, Hash, BlockNumber> for Runtime {
fn validators() -> Vec<ValidatorId> {
parachains_runtime_api_impl::validators::<Runtime>()
Expand Down Expand Up @@ -1971,6 +1973,10 @@ sp_api::impl_runtime_apis! {
fn async_backing_params() -> primitives::AsyncBackingParams {
parachains_runtime_api_impl::async_backing_params::<Runtime>()
}

fn disabled_validators() -> Vec<ValidatorIndex> {
parachains_vstaging_api_impl::disabled_validators::<Runtime>()
}
}

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

0 comments on commit 659f6e0

Please sign in to comment.