Skip to content

Commit ad4396f

Browse files
Bump parachains runtime api to 13 (#7981)
We need to bump 2 runtime APIs to 13, because we are [backporting](#7824) validation code bomb API to 2412-4 patch which is supposed to be included in next fellowship release. Details here: #7824 (comment) Should only be merged if #7824 is merged in 2412-4 patch. Important note: on Westend, runtime needs to be upgraded first, then validators. --------- Signed-off-by: Andrei Sandu <[email protected]> Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com>
1 parent 123d31f commit ad4396f

File tree

8 files changed

+35
-17
lines changed

8 files changed

+35
-17
lines changed

cumulus/parachains/integration-tests/emulated/chains/relays/rococo/src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ use emulated_integration_tests_common::{
2525

2626
// Rococo declaration
2727
decl_test_relay_chains! {
28-
#[api_version(12)]
28+
#[api_version(13)]
2929
pub struct Rococo {
3030
genesis = genesis::genesis(),
3131
on_init = (),

cumulus/parachains/integration-tests/emulated/chains/relays/westend/src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ use emulated_integration_tests_common::{
2525

2626
// Westend declaration
2727
decl_test_relay_chains! {
28-
#[api_version(12)]
28+
#[api_version(13)]
2929
pub struct Westend {
3030
genesis = genesis::genesis(),
3131
on_init = (),

polkadot/node/subsystem-types/src/messages.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -822,14 +822,14 @@ impl RuntimeApiRequest {
822822
/// `candidates_pending_availability`
823823
pub const CANDIDATES_PENDING_AVAILABILITY_RUNTIME_REQUIREMENT: u32 = 11;
824824

825+
/// `ValidationCodeBombLimit`
826+
pub const VALIDATION_CODE_BOMB_LIMIT_RUNTIME_REQUIREMENT: u32 = 12;
827+
825828
/// `backing_constraints`
826-
pub const CONSTRAINTS_RUNTIME_REQUIREMENT: u32 = 12;
829+
pub const CONSTRAINTS_RUNTIME_REQUIREMENT: u32 = 13;
827830

828831
/// `SchedulingLookahead`
829-
pub const SCHEDULING_LOOKAHEAD_RUNTIME_REQUIREMENT: u32 = 12;
830-
831-
/// `ValidationCodeBombLimit`
832-
pub const VALIDATION_CODE_BOMB_LIMIT_RUNTIME_REQUIREMENT: u32 = 12;
832+
pub const SCHEDULING_LOOKAHEAD_RUNTIME_REQUIREMENT: u32 = 13;
833833
}
834834

835835
/// A message to the Runtime API subsystem.

polkadot/primitives/src/runtime_api.rs

+9-7
Original file line numberDiff line numberDiff line change
@@ -299,19 +299,21 @@ sp_api::decl_runtime_apis! {
299299
fn candidates_pending_availability(para_id: ppp::Id) -> Vec<CommittedCandidateReceipt<Hash>>;
300300

301301
/***** Added in v12 *****/
302+
/// Retrieve the maximum uncompressed code size.
303+
#[api_version(12)]
304+
fn validation_code_bomb_limit() -> u32;
305+
306+
/***** Added in v13 *****/
302307
/// Returns the constraints on the actions that can be taken by a new parachain
303308
/// block.
304-
#[api_version(12)]
309+
#[api_version(13)]
305310
fn backing_constraints(para_id: ppp::Id) -> Option<Constraints>;
306311

307-
/***** Added in v12 *****/
312+
/***** Added in v13 *****/
308313
/// Retrieve the scheduling lookahead
309-
#[api_version(12)]
314+
#[api_version(13)]
310315
fn scheduling_lookahead() -> u32;
311316

312-
/***** Added in v12 *****/
313-
/// Retrieve the maximum uncompressed code size.
314-
#[api_version(12)]
315-
fn validation_code_bomb_limit() -> u32;
317+
316318
}
317319
}

polkadot/runtime/rococo/src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1992,7 +1992,7 @@ sp_api::impl_runtime_apis! {
19921992
}
19931993
}
19941994

1995-
#[api_version(12)]
1995+
#[api_version(13)]
19961996
impl polkadot_primitives::runtime_api::ParachainHost<Block> for Runtime {
19971997
fn validators() -> Vec<ValidatorId> {
19981998
parachains_runtime_api_impl::validators::<Runtime>()

polkadot/runtime/test-runtime/src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -939,7 +939,7 @@ sp_api::impl_runtime_apis! {
939939
}
940940
}
941941

942-
#[api_version(12)]
942+
#[api_version(13)]
943943
impl polkadot_primitives::runtime_api::ParachainHost<Block> for Runtime {
944944
fn validators() -> Vec<ValidatorId> {
945945
runtime_impl::validators::<Runtime>()

polkadot/runtime/westend/src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2076,7 +2076,7 @@ sp_api::impl_runtime_apis! {
20762076
}
20772077
}
20782078

2079-
#[api_version(12)]
2079+
#[api_version(13)]
20802080
impl polkadot_primitives::runtime_api::ParachainHost<Block> for Runtime {
20812081
fn validators() -> Vec<ValidatorId> {
20822082
parachains_runtime_api_impl::validators::<Runtime>()

prdoc/pr_7981.prdoc

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
title: Bump ParachainHost runtime API to 13
2+
doc:
3+
- audience: [Runtime Dev, Node Dev]
4+
description: |-
5+
Bump `backing_constraints` and `scheduling_lookahead` API version to 13.
6+
The `validation_code_bomb_limit` API remains at version 12.
7+
Bump all ParachainHost runtime to version 13 in all test runtimes.
8+
crates:
9+
- name: polkadot-node-subsystem-types
10+
bump: minor
11+
- name: polkadot-primitives
12+
bump: minor
13+
- name: rococo-runtime
14+
bump: minor
15+
- name: westend-runtime
16+
bump: minor

0 commit comments

Comments
 (0)