Skip to content
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
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ use emulated_integration_tests_common::{

// Rococo declaration
decl_test_relay_chains! {
#[api_version(12)]
#[api_version(13)]
pub struct Rococo {
genesis = genesis::genesis(),
on_init = (),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ use emulated_integration_tests_common::{

// Westend declaration
decl_test_relay_chains! {
#[api_version(12)]
#[api_version(13)]
pub struct Westend {
genesis = genesis::genesis(),
on_init = (),
Expand Down
10 changes: 5 additions & 5 deletions polkadot/node/subsystem-types/src/messages.rs
Original file line number Diff line number Diff line change
Expand Up @@ -822,14 +822,14 @@ impl RuntimeApiRequest {
/// `candidates_pending_availability`
pub const CANDIDATES_PENDING_AVAILABILITY_RUNTIME_REQUIREMENT: u32 = 11;

/// `ValidationCodeBombLimit`
pub const VALIDATION_CODE_BOMB_LIMIT_RUNTIME_REQUIREMENT: u32 = 12;

/// `backing_constraints`
pub const CONSTRAINTS_RUNTIME_REQUIREMENT: u32 = 12;
pub const CONSTRAINTS_RUNTIME_REQUIREMENT: u32 = 13;

/// `SchedulingLookahead`
pub const SCHEDULING_LOOKAHEAD_RUNTIME_REQUIREMENT: u32 = 12;

/// `ValidationCodeBombLimit`
pub const VALIDATION_CODE_BOMB_LIMIT_RUNTIME_REQUIREMENT: u32 = 12;
pub const SCHEDULING_LOOKAHEAD_RUNTIME_REQUIREMENT: u32 = 13;
}

/// A message to the Runtime API subsystem.
Expand Down
16 changes: 9 additions & 7 deletions polkadot/primitives/src/runtime_api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -299,19 +299,21 @@ sp_api::decl_runtime_apis! {
fn candidates_pending_availability(para_id: ppp::Id) -> Vec<CommittedCandidateReceipt<Hash>>;

/***** Added in v12 *****/
/// Retrieve the maximum uncompressed code size.
#[api_version(12)]
fn validation_code_bomb_limit() -> u32;

/***** Added in v13 *****/
/// Returns the constraints on the actions that can be taken by a new parachain
/// block.
#[api_version(12)]
#[api_version(13)]
fn backing_constraints(para_id: ppp::Id) -> Option<Constraints>;

/***** Added in v12 *****/
/***** Added in v13 *****/
/// Retrieve the scheduling lookahead
#[api_version(12)]
#[api_version(13)]
fn scheduling_lookahead() -> u32;

/***** Added in v12 *****/
/// Retrieve the maximum uncompressed code size.
#[api_version(12)]
fn validation_code_bomb_limit() -> u32;

}
}
2 changes: 1 addition & 1 deletion polkadot/runtime/rococo/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1992,7 +1992,7 @@ sp_api::impl_runtime_apis! {
}
}

#[api_version(12)]
#[api_version(13)]
impl polkadot_primitives::runtime_api::ParachainHost<Block> for Runtime {
fn validators() -> Vec<ValidatorId> {
parachains_runtime_api_impl::validators::<Runtime>()
Expand Down
2 changes: 1 addition & 1 deletion polkadot/runtime/test-runtime/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -939,7 +939,7 @@ sp_api::impl_runtime_apis! {
}
}

#[api_version(12)]
#[api_version(13)]
impl polkadot_primitives::runtime_api::ParachainHost<Block> for Runtime {
fn validators() -> Vec<ValidatorId> {
runtime_impl::validators::<Runtime>()
Expand Down
2 changes: 1 addition & 1 deletion polkadot/runtime/westend/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2076,7 +2076,7 @@ sp_api::impl_runtime_apis! {
}
}

#[api_version(12)]
#[api_version(13)]
impl polkadot_primitives::runtime_api::ParachainHost<Block> for Runtime {
fn validators() -> Vec<ValidatorId> {
parachains_runtime_api_impl::validators::<Runtime>()
Expand Down
16 changes: 16 additions & 0 deletions prdoc/pr_7981.prdoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
title: Bump ParachainHost runtime API to 13
doc:
- audience: [Runtime Dev, Node Dev]
description: |-
Bump `backing_constraints` and `scheduling_lookahead` API version to 13.
The `validation_code_bomb_limit` API remains at version 12.
Bump all ParachainHost runtime to version 13 in all test runtimes.
crates:
- name: polkadot-node-subsystem-types
bump: minor
- name: polkadot-primitives
bump: minor
- name: rococo-runtime
bump: minor
- name: westend-runtime
bump: minor
Loading