Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

kusama: enable disabling ParachainHost API #148

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this page doesn't exist yet, will be introduced in paritytech/polkadot-sdk#2955


## [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
Loading