From 80a19bec6aa4287ceca7a771cc40908b921d3870 Mon Sep 17 00:00:00 2001 From: Ignacio Palacios Date: Thu, 31 Aug 2023 12:48:01 +0200 Subject: [PATCH] remove disable-runtime-api (#1328) --- polkadot/runtime/kusama/Cargo.toml | 6 ------ polkadot/runtime/kusama/src/lib.rs | 4 ---- polkadot/runtime/polkadot/Cargo.toml | 6 ------ polkadot/runtime/polkadot/src/lib.rs | 4 ---- polkadot/runtime/rococo/Cargo.toml | 6 ------ polkadot/runtime/rococo/src/lib.rs | 4 ---- polkadot/runtime/westend/Cargo.toml | 6 ------ polkadot/runtime/westend/src/lib.rs | 4 ---- 8 files changed, 40 deletions(-) diff --git a/polkadot/runtime/kusama/Cargo.toml b/polkadot/runtime/kusama/Cargo.toml index 96a007435455..8b0f59516c6d 100644 --- a/polkadot/runtime/kusama/Cargo.toml +++ b/polkadot/runtime/kusama/Cargo.toml @@ -338,12 +338,6 @@ try-runtime = [ "runtime-parachains/try-runtime", "sp-runtime/try-runtime", ] -# When enabled, the runtime API will not be build. -# -# This is required by Cumulus to access certain types of the -# runtime without clashing with the runtime API exported functions -# in WASM. -disable-runtime-api = [] # A feature that should be enabled when the runtime should be build for on-chain # deployment. This will disable stuff that shouldn't be part of the on-chain wasm diff --git a/polkadot/runtime/kusama/src/lib.rs b/polkadot/runtime/kusama/src/lib.rs index e9e3fb2d2026..ac80f88cfaa2 100644 --- a/polkadot/runtime/kusama/src/lib.rs +++ b/polkadot/runtime/kusama/src/lib.rs @@ -139,10 +139,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { authoring_version: 2, spec_version: 9430, impl_version: 0, - #[cfg(not(feature = "disable-runtime-api"))] apis: RUNTIME_API_VERSIONS, - #[cfg(feature = "disable-runtime-api")] - apis: sp_version::create_apis_vec![[]], transaction_version: 23, state_version: 1, }; @@ -1820,7 +1817,6 @@ mod benches { ); } -#[cfg(not(feature = "disable-runtime-api"))] sp_api::impl_runtime_apis! { impl sp_api::Core for Runtime { fn version() -> RuntimeVersion { diff --git a/polkadot/runtime/polkadot/Cargo.toml b/polkadot/runtime/polkadot/Cargo.toml index 48f720caa645..d185677ab8d2 100644 --- a/polkadot/runtime/polkadot/Cargo.toml +++ b/polkadot/runtime/polkadot/Cargo.toml @@ -307,12 +307,6 @@ try-runtime = [ "runtime-parachains/try-runtime", "sp-runtime/try-runtime", ] -# When enabled, the runtime API will not be build. -# -# This is required by Cumulus to access certain types of the -# runtime without clashing with the runtime API exported functions -# in WASM. -disable-runtime-api = [] # A feature that should be enabled when the runtime should be build for on-chain # deployment. This will disable stuff that shouldn't be part of the on-chain wasm diff --git a/polkadot/runtime/polkadot/src/lib.rs b/polkadot/runtime/polkadot/src/lib.rs index c4458076cb3d..f97c0981039f 100644 --- a/polkadot/runtime/polkadot/src/lib.rs +++ b/polkadot/runtime/polkadot/src/lib.rs @@ -130,10 +130,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { authoring_version: 0, spec_version: 9430, impl_version: 0, - #[cfg(not(feature = "disable-runtime-api"))] apis: RUNTIME_API_VERSIONS, - #[cfg(feature = "disable-runtime-api")] - apis: sp_version::create_apis_vec![[]], transaction_version: 24, state_version: 0, }; @@ -1599,7 +1596,6 @@ mod benches { ); } -#[cfg(not(feature = "disable-runtime-api"))] sp_api::impl_runtime_apis! { impl sp_api::Core for Runtime { fn version() -> RuntimeVersion { diff --git a/polkadot/runtime/rococo/Cargo.toml b/polkadot/runtime/rococo/Cargo.toml index 4c268c3e2b6f..aa94d5914d66 100644 --- a/polkadot/runtime/rococo/Cargo.toml +++ b/polkadot/runtime/rococo/Cargo.toml @@ -282,12 +282,6 @@ try-runtime = [ "runtime-parachains/try-runtime", "sp-runtime/try-runtime", ] -# When enabled, the runtime API will not be build. -# -# This is required by Cumulus to access certain types of the -# runtime without clashing with the runtime API exported functions -# in WASM. -disable-runtime-api = [] # Set timing constants (e.g. session period) to faster versions to speed up testing. fast-runtime = [] diff --git a/polkadot/runtime/rococo/src/lib.rs b/polkadot/runtime/rococo/src/lib.rs index 6894bd7bbf44..192f4117ba6d 100644 --- a/polkadot/runtime/rococo/src/lib.rs +++ b/polkadot/runtime/rococo/src/lib.rs @@ -116,10 +116,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { authoring_version: 0, spec_version: 9430, impl_version: 0, - #[cfg(not(feature = "disable-runtime-api"))] apis: RUNTIME_API_VERSIONS, - #[cfg(feature = "disable-runtime-api")] - apis: sp_version::create_apis_vec![[]], transaction_version: 22, state_version: 1, }; @@ -1647,7 +1644,6 @@ mod benches { ); } -#[cfg(not(feature = "disable-runtime-api"))] sp_api::impl_runtime_apis! { impl sp_api::Core for Runtime { fn version() -> RuntimeVersion { diff --git a/polkadot/runtime/westend/Cargo.toml b/polkadot/runtime/westend/Cargo.toml index add80488a64c..dc5bdaf6559d 100644 --- a/polkadot/runtime/westend/Cargo.toml +++ b/polkadot/runtime/westend/Cargo.toml @@ -311,12 +311,6 @@ try-runtime = [ "runtime-parachains/try-runtime", "sp-runtime/try-runtime", ] -# When enabled, the runtime API will not be build. -# -# This is required by Cumulus to access certain types of the -# runtime without clashing with the runtime API exported functions -# in WASM. -disable-runtime-api = [] # Set timing constants (e.g. session period) to faster versions to speed up testing. fast-runtime = [] diff --git a/polkadot/runtime/westend/src/lib.rs b/polkadot/runtime/westend/src/lib.rs index 9ae30c376010..12baa20a129f 100644 --- a/polkadot/runtime/westend/src/lib.rs +++ b/polkadot/runtime/westend/src/lib.rs @@ -121,10 +121,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { authoring_version: 2, spec_version: 9430, impl_version: 0, - #[cfg(not(feature = "disable-runtime-api"))] apis: RUNTIME_API_VERSIONS, - #[cfg(feature = "disable-runtime-api")] - apis: sp_version::create_apis_vec![[]], transaction_version: 22, state_version: 1, }; @@ -1494,7 +1491,6 @@ mod benches { ); } -#[cfg(not(feature = "disable-runtime-api"))] sp_api::impl_runtime_apis! { impl sp_api::Core for Runtime { fn version() -> RuntimeVersion {