diff --git a/node/subsystem-types/src/messages.rs b/node/subsystem-types/src/messages.rs index 86f67f1f523d..1acafbd1cfaa 100644 --- a/node/subsystem-types/src/messages.rs +++ b/node/subsystem-types/src/messages.rs @@ -612,7 +612,7 @@ impl RuntimeApiRequest { pub const DISPUTES_RUNTIME_REQUIREMENT: u32 = 3; /// `ExecutorParams` - pub const EXECUTOR_PARAMS_RUNTIME_REQUIREMENT: u32 = 3; + pub const EXECUTOR_PARAMS_RUNTIME_REQUIREMENT: u32 = 4; } /// A message to the Runtime API subsystem. diff --git a/node/subsystem-util/src/lib.rs b/node/subsystem-util/src/lib.rs index 89abf7a37710..3aafc14a7878 100644 --- a/node/subsystem-util/src/lib.rs +++ b/node/subsystem-util/src/lib.rs @@ -244,11 +244,15 @@ pub async fn executor_params_at_relay_parent( // Failed to communicate with the runtime Err(Error::Oneshot(err)) }, - Ok(Err(_)) => { + Ok(Err(RuntimeApiError::NotSupported { .. })) => { // Runtime doesn't yet support the api requested, should execute anyway // with default set of parameters Ok(ExecutorParams::default()) }, + Ok(Err(err)) => { + // Runtime failed to execute the request + Err(Error::RuntimeApi(err)) + }, Ok(Ok(None)) => { // Storage doesn't contain a parameter set for the given session; should // never happen diff --git a/primitives/src/runtime_api.rs b/primitives/src/runtime_api.rs index 87aaf57b58c8..a618d18e22d7 100644 --- a/primitives/src/runtime_api.rs +++ b/primitives/src/runtime_api.rs @@ -226,7 +226,7 @@ sp_api::decl_runtime_apis! { fn disputes() -> Vec<(SessionIndex, CandidateHash, DisputeState)>; /// Returns execution parameters for the session. - #[api_version(3)] + #[api_version(4)] fn session_executor_params(session_index: SessionIndex) -> Option; } } diff --git a/runtime/rococo/src/lib.rs b/runtime/rococo/src/lib.rs index cc268df94efd..f464f654252f 100644 --- a/runtime/rococo/src/lib.rs +++ b/runtime/rococo/src/lib.rs @@ -1650,7 +1650,7 @@ sp_api::impl_runtime_apis! { } } - #[api_version(3)] + #[api_version(4)] impl primitives::runtime_api::ParachainHost for Runtime { fn validators() -> Vec { parachains_runtime_api_impl::validators::() diff --git a/runtime/westend/src/lib.rs b/runtime/westend/src/lib.rs index 80f79898ae00..cb2f3b6e04d8 100644 --- a/runtime/westend/src/lib.rs +++ b/runtime/westend/src/lib.rs @@ -1379,7 +1379,7 @@ sp_api::impl_runtime_apis! { } } - #[api_version(3)] + #[api_version(4)] impl primitives::runtime_api::ParachainHost for Runtime { fn validators() -> Vec { parachains_runtime_api_impl::validators::()