From 8e033d5f38627947f3ae9b1dbac1520a41f578e5 Mon Sep 17 00:00:00 2001 From: Dmitry Sinyavin Date: Mon, 11 Mar 2024 18:36:03 +0100 Subject: [PATCH 1/4] Eliminate `experimental` feature --- cumulus/pallets/collator-selection/Cargo.toml | 2 -- .../pallets/collator-selection/src/mock.rs | 1 - cumulus/pallets/xcmp-queue/Cargo.toml | 2 +- .../assets/asset-hub-rococo/Cargo.toml | 2 -- .../assets/asset-hub-rococo/src/lib.rs | 4 ---- .../assets/asset-hub-westend/Cargo.toml | 2 -- .../assets/asset-hub-westend/src/lib.rs | 4 ---- .../bridge-hubs/bridge-hub-rococo/Cargo.toml | 1 - .../bridge-hubs/bridge-hub-rococo/src/lib.rs | 4 ---- .../bridge-hubs/bridge-hub-westend/Cargo.toml | 2 -- .../bridge-hubs/bridge-hub-westend/src/lib.rs | 4 ---- .../collectives-westend/Cargo.toml | 2 -- .../collectives-westend/src/lib.rs | 4 ---- .../contracts/contracts-rococo/Cargo.toml | 2 -- .../contracts/contracts-rococo/src/lib.rs | 4 ---- .../coretime/coretime-rococo/Cargo.toml | 2 -- .../coretime/coretime-rococo/src/lib.rs | 4 ---- .../coretime/coretime-westend/Cargo.toml | 2 -- .../coretime/coretime-westend/src/lib.rs | 4 ---- .../glutton/glutton-westend/Cargo.toml | 2 -- .../glutton/glutton-westend/src/lib.rs | 4 ---- .../runtimes/people/people-rococo/Cargo.toml | 2 -- .../runtimes/people/people-rococo/src/lib.rs | 4 ---- .../runtimes/people/people-westend/Cargo.toml | 2 -- .../runtimes/people/people-westend/src/lib.rs | 4 ---- .../runtimes/starters/seedling/Cargo.toml | 2 -- .../runtimes/starters/seedling/src/lib.rs | 4 ---- .../runtimes/starters/shell/Cargo.toml | 2 -- .../runtimes/starters/shell/src/lib.rs | 4 ---- .../runtimes/testing/penpal/Cargo.toml | 2 -- .../runtimes/testing/penpal/src/lib.rs | 1 - .../testing/rococo-parachain/Cargo.toml | 2 -- .../testing/rococo-parachain/src/lib.rs | 4 ---- docs/sdk/Cargo.toml | 8 +------- docs/sdk/src/polkadot_sdk/cumulus.rs | 1 - scripts/update-ui-tests.sh | 2 +- substrate/bin/node/runtime/Cargo.toml | 5 ----- substrate/frame/Cargo.toml | 3 --- substrate/frame/aura/Cargo.toml | 1 - substrate/frame/aura/src/lib.rs | 19 +------------------ substrate/frame/aura/src/mock.rs | 2 -- substrate/frame/core-fellowship/Cargo.toml | 1 - .../frame/examples/frame-crate/Cargo.toml | 2 +- .../frame/examples/kitchensink/Cargo.toml | 2 +- substrate/frame/examples/tasks/Cargo.toml | 1 - substrate/frame/examples/tasks/src/tests.rs | 7 +------ substrate/frame/executive/Cargo.toml | 1 - substrate/frame/parameters/Cargo.toml | 2 +- substrate/frame/safe-mode/Cargo.toml | 2 +- substrate/frame/salary/Cargo.toml | 1 - substrate/frame/src/lib.rs | 5 ----- substrate/frame/support/Cargo.toml | 1 - substrate/frame/support/src/lib.rs | 5 +---- substrate/frame/support/test/Cargo.toml | 4 ---- .../support/test/stg_frame_crate/Cargo.toml | 2 +- .../test/tests/pallet_outer_enums_explicit.rs | 2 -- .../test/tests/pallet_outer_enums_implicit.rs | 2 -- substrate/frame/system/Cargo.toml | 1 - substrate/frame/system/src/lib.rs | 6 ------ templates/minimal/node/Cargo.toml | 5 +---- templates/minimal/pallets/template/Cargo.toml | 5 +---- templates/minimal/runtime/Cargo.toml | 5 +---- templates/parachain/runtime/Cargo.toml | 2 -- templates/parachain/runtime/src/lib.rs | 1 - templates/solochain/runtime/Cargo.toml | 2 -- templates/solochain/runtime/src/lib.rs | 2 -- 66 files changed, 14 insertions(+), 187 deletions(-) diff --git a/cumulus/pallets/collator-selection/Cargo.toml b/cumulus/pallets/collator-selection/Cargo.toml index 20f048b97d55..241a78466d61 100644 --- a/cumulus/pallets/collator-selection/Cargo.toml +++ b/cumulus/pallets/collator-selection/Cargo.toml @@ -77,5 +77,3 @@ try-runtime = [ "pallet-timestamp/try-runtime", "sp-runtime/try-runtime", ] - -experimental = ["pallet-aura/experimental"] diff --git a/cumulus/pallets/collator-selection/src/mock.rs b/cumulus/pallets/collator-selection/src/mock.rs index fe41e7318bcd..a940889a9df9 100644 --- a/cumulus/pallets/collator-selection/src/mock.rs +++ b/cumulus/pallets/collator-selection/src/mock.rs @@ -125,7 +125,6 @@ impl pallet_aura::Config for Test { type MaxAuthorities = ConstU32<100_000>; type DisabledValidators = (); type AllowMultipleBlocksPerSlot = ConstBool; - #[cfg(feature = "experimental")] type SlotDuration = pallet_aura::MinimumPeriodTimesTwo; } diff --git a/cumulus/pallets/xcmp-queue/Cargo.toml b/cumulus/pallets/xcmp-queue/Cargo.toml index 9078d5eda997..93f8a22a3989 100644 --- a/cumulus/pallets/xcmp-queue/Cargo.toml +++ b/cumulus/pallets/xcmp-queue/Cargo.toml @@ -44,7 +44,7 @@ bp-xcm-bridge-hub-router = { path = "../../../bridges/primitives/xcm-bridge-hub- # Substrate sp-core = { path = "../../../substrate/primitives/core" } pallet-balances = { path = "../../../substrate/frame/balances" } -frame-support = { path = "../../../substrate/frame/support", features = ["experimental"] } +frame-support = { path = "../../../substrate/frame/support" } # Polkadot xcm-builder = { package = "staging-xcm-builder", path = "../../../polkadot/xcm/xcm-builder" } diff --git a/cumulus/parachains/runtimes/assets/asset-hub-rococo/Cargo.toml b/cumulus/parachains/runtimes/assets/asset-hub-rococo/Cargo.toml index 3eb63a24b74e..ad63a4122da5 100644 --- a/cumulus/parachains/runtimes/assets/asset-hub-rococo/Cargo.toml +++ b/cumulus/parachains/runtimes/assets/asset-hub-rococo/Cargo.toml @@ -253,8 +253,6 @@ std = [ "xcm/std", ] -experimental = ["pallet-aura/experimental"] - # A feature that should be enabled when the runtime should be built for on-chain # deployment. This will disable stuff that shouldn't be part of the on-chain wasm # to make it smaller, like logging for example. diff --git a/cumulus/parachains/runtimes/assets/asset-hub-rococo/src/lib.rs b/cumulus/parachains/runtimes/assets/asset-hub-rococo/src/lib.rs index 32966ab6341d..6eecb5cb80b4 100644 --- a/cumulus/parachains/runtimes/assets/asset-hub-rococo/src/lib.rs +++ b/cumulus/parachains/runtimes/assets/asset-hub-rococo/src/lib.rs @@ -188,10 +188,7 @@ impl pallet_timestamp::Config for Runtime { /// A timestamp: milliseconds since the unix epoch. type Moment = u64; type OnTimestampSet = Aura; - #[cfg(feature = "experimental")] type MinimumPeriod = ConstU64<0>; - #[cfg(not(feature = "experimental"))] - type MinimumPeriod = ConstU64<{ SLOT_DURATION / 2 }>; type WeightInfo = weights::pallet_timestamp::WeightInfo; } @@ -725,7 +722,6 @@ impl pallet_aura::Config for Runtime { type DisabledValidators = (); type MaxAuthorities = ConstU32<100_000>; type AllowMultipleBlocksPerSlot = ConstBool; - #[cfg(feature = "experimental")] type SlotDuration = ConstU64; } diff --git a/cumulus/parachains/runtimes/assets/asset-hub-westend/Cargo.toml b/cumulus/parachains/runtimes/assets/asset-hub-westend/Cargo.toml index c10e02bd8a6c..c83e4d7c2cde 100644 --- a/cumulus/parachains/runtimes/assets/asset-hub-westend/Cargo.toml +++ b/cumulus/parachains/runtimes/assets/asset-hub-westend/Cargo.toml @@ -238,8 +238,6 @@ std = [ "xcm/std", ] -experimental = ["pallet-aura/experimental"] - # A feature that should be enabled when the runtime should be built for on-chain # deployment. This will disable stuff that shouldn't be part of the on-chain wasm # to make it smaller, like logging for example. diff --git a/cumulus/parachains/runtimes/assets/asset-hub-westend/src/lib.rs b/cumulus/parachains/runtimes/assets/asset-hub-westend/src/lib.rs index 5246828da310..a8be34c08de1 100644 --- a/cumulus/parachains/runtimes/assets/asset-hub-westend/src/lib.rs +++ b/cumulus/parachains/runtimes/assets/asset-hub-westend/src/lib.rs @@ -172,10 +172,7 @@ impl pallet_timestamp::Config for Runtime { /// A timestamp: milliseconds since the unix epoch. type Moment = u64; type OnTimestampSet = Aura; - #[cfg(feature = "experimental")] type MinimumPeriod = ConstU64<0>; - #[cfg(not(feature = "experimental"))] - type MinimumPeriod = ConstU64<{ SLOT_DURATION / 2 }>; type WeightInfo = weights::pallet_timestamp::WeightInfo; } @@ -705,7 +702,6 @@ impl pallet_aura::Config for Runtime { type DisabledValidators = (); type MaxAuthorities = ConstU32<100_000>; type AllowMultipleBlocksPerSlot = ConstBool; - #[cfg(feature = "experimental")] type SlotDuration = ConstU64; } diff --git a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/Cargo.toml b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/Cargo.toml index 242627815d3a..2238a759ed2a 100644 --- a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/Cargo.toml +++ b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/Cargo.toml @@ -297,7 +297,6 @@ try-runtime = [ "sp-runtime/try-runtime", ] -experimental = ["pallet-aura/experimental"] fast-runtime = [] # A feature that should be enabled when the runtime should be built for on-chain diff --git a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/lib.rs b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/lib.rs index 16e3b2e8600f..94d0fa3e632e 100644 --- a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/lib.rs +++ b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/lib.rs @@ -279,10 +279,7 @@ impl pallet_timestamp::Config for Runtime { /// A timestamp: milliseconds since the unix epoch. type Moment = u64; type OnTimestampSet = Aura; - #[cfg(feature = "experimental")] type MinimumPeriod = ConstU64<0>; - #[cfg(not(feature = "experimental"))] - type MinimumPeriod = ConstU64<{ SLOT_DURATION / 2 }>; type WeightInfo = weights::pallet_timestamp::WeightInfo; } @@ -448,7 +445,6 @@ impl pallet_aura::Config for Runtime { type DisabledValidators = (); type MaxAuthorities = ConstU32<100_000>; type AllowMultipleBlocksPerSlot = ConstBool; - #[cfg(feature = "experimental")] type SlotDuration = ConstU64; } diff --git a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-westend/Cargo.toml b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-westend/Cargo.toml index b5fe093b8be7..a4d31ceb4aa8 100644 --- a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-westend/Cargo.toml +++ b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-westend/Cargo.toml @@ -247,8 +247,6 @@ try-runtime = [ "sp-runtime/try-runtime", ] -experimental = ["pallet-aura/experimental"] - # A feature that should be enabled when the runtime should be built for on-chain # deployment. This will disable stuff that shouldn't be part of the on-chain wasm # to make it smaller, like logging for example. diff --git a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-westend/src/lib.rs b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-westend/src/lib.rs index 86ed8b2f488c..3e9a52d26b7f 100644 --- a/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-westend/src/lib.rs +++ b/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-westend/src/lib.rs @@ -251,10 +251,7 @@ impl pallet_timestamp::Config for Runtime { /// A timestamp: milliseconds since the unix epoch. type Moment = u64; type OnTimestampSet = Aura; - #[cfg(feature = "experimental")] type MinimumPeriod = ConstU64<0>; - #[cfg(not(feature = "experimental"))] - type MinimumPeriod = ConstU64<{ SLOT_DURATION / 2 }>; type WeightInfo = weights::pallet_timestamp::WeightInfo; } @@ -408,7 +405,6 @@ impl pallet_aura::Config for Runtime { type DisabledValidators = (); type MaxAuthorities = ConstU32<100_000>; type AllowMultipleBlocksPerSlot = ConstBool; - #[cfg(feature = "experimental")] type SlotDuration = ConstU64; } diff --git a/cumulus/parachains/runtimes/collectives/collectives-westend/Cargo.toml b/cumulus/parachains/runtimes/collectives/collectives-westend/Cargo.toml index 32d7e97bc455..02782192fa1e 100644 --- a/cumulus/parachains/runtimes/collectives/collectives-westend/Cargo.toml +++ b/cumulus/parachains/runtimes/collectives/collectives-westend/Cargo.toml @@ -233,8 +233,6 @@ std = [ "xcm/std", ] -experimental = ["pallet-aura/experimental"] - # A feature that should be enabled when the runtime should be built for on-chain # deployment. This will disable stuff that shouldn't be part of the on-chain wasm # to make it smaller, like logging for example. diff --git a/cumulus/parachains/runtimes/collectives/collectives-westend/src/lib.rs b/cumulus/parachains/runtimes/collectives/collectives-westend/src/lib.rs index 3887a1d74ecc..4a069639d5ef 100644 --- a/cumulus/parachains/runtimes/collectives/collectives-westend/src/lib.rs +++ b/cumulus/parachains/runtimes/collectives/collectives-westend/src/lib.rs @@ -185,10 +185,7 @@ impl pallet_timestamp::Config for Runtime { /// A timestamp: milliseconds since the unix epoch. type Moment = u64; type OnTimestampSet = Aura; - #[cfg(feature = "experimental")] type MinimumPeriod = ConstU64<0>; - #[cfg(not(feature = "experimental"))] - type MinimumPeriod = ConstU64<{ SLOT_DURATION / 2 }>; type WeightInfo = weights::pallet_timestamp::WeightInfo; } @@ -485,7 +482,6 @@ impl pallet_aura::Config for Runtime { type DisabledValidators = (); type MaxAuthorities = ConstU32<100_000>; type AllowMultipleBlocksPerSlot = ConstBool; - #[cfg(feature = "experimental")] type SlotDuration = ConstU64; } diff --git a/cumulus/parachains/runtimes/contracts/contracts-rococo/Cargo.toml b/cumulus/parachains/runtimes/contracts/contracts-rococo/Cargo.toml index 747f75cf2e26..550ea9161668 100644 --- a/cumulus/parachains/runtimes/contracts/contracts-rococo/Cargo.toml +++ b/cumulus/parachains/runtimes/contracts/contracts-rococo/Cargo.toml @@ -197,8 +197,6 @@ try-runtime = [ "sp-runtime/try-runtime", ] -experimental = ["pallet-aura/experimental"] - # A feature that should be enabled when the runtime should be built for on-chain # deployment. This will disable stuff that shouldn't be part of the on-chain wasm # to make it smaller, like logging for example. diff --git a/cumulus/parachains/runtimes/contracts/contracts-rococo/src/lib.rs b/cumulus/parachains/runtimes/contracts/contracts-rococo/src/lib.rs index 8ce46ccd34f1..014da0b9a7b5 100644 --- a/cumulus/parachains/runtimes/contracts/contracts-rococo/src/lib.rs +++ b/cumulus/parachains/runtimes/contracts/contracts-rococo/src/lib.rs @@ -193,10 +193,7 @@ impl pallet_timestamp::Config for Runtime { /// A timestamp: milliseconds since the unix epoch. type Moment = u64; type OnTimestampSet = Aura; - #[cfg(feature = "experimental")] type MinimumPeriod = ConstU64<0>; - #[cfg(not(feature = "experimental"))] - type MinimumPeriod = ConstU64<{ SLOT_DURATION / 2 }>; type WeightInfo = pallet_timestamp::weights::SubstrateWeight; } @@ -350,7 +347,6 @@ impl pallet_aura::Config for Runtime { type DisabledValidators = (); type MaxAuthorities = ConstU32<100_000>; type AllowMultipleBlocksPerSlot = ConstBool; - #[cfg(feature = "experimental")] type SlotDuration = ConstU64; } diff --git a/cumulus/parachains/runtimes/coretime/coretime-rococo/Cargo.toml b/cumulus/parachains/runtimes/coretime/coretime-rococo/Cargo.toml index 70a6a81bdcfb..1a5e5c942952 100644 --- a/cumulus/parachains/runtimes/coretime/coretime-rococo/Cargo.toml +++ b/cumulus/parachains/runtimes/coretime/coretime-rococo/Cargo.toml @@ -195,6 +195,4 @@ try-runtime = [ "sp-runtime/try-runtime", ] -experimental = ["pallet-aura/experimental"] - fast-runtime = [] diff --git a/cumulus/parachains/runtimes/coretime/coretime-rococo/src/lib.rs b/cumulus/parachains/runtimes/coretime/coretime-rococo/src/lib.rs index 9913e47a93ab..b288a8a37daf 100644 --- a/cumulus/parachains/runtimes/coretime/coretime-rococo/src/lib.rs +++ b/cumulus/parachains/runtimes/coretime/coretime-rococo/src/lib.rs @@ -208,10 +208,7 @@ impl pallet_timestamp::Config for Runtime { /// A timestamp: milliseconds since the unix epoch. type Moment = u64; type OnTimestampSet = Aura; - #[cfg(feature = "experimental")] type MinimumPeriod = ConstU64<0>; - #[cfg(not(feature = "experimental"))] - type MinimumPeriod = ConstU64<{ SLOT_DURATION / 2 }>; type WeightInfo = weights::pallet_timestamp::WeightInfo; } @@ -372,7 +369,6 @@ impl pallet_aura::Config for Runtime { type DisabledValidators = (); type MaxAuthorities = ConstU32<100_000>; type AllowMultipleBlocksPerSlot = ConstBool; - #[cfg(feature = "experimental")] type SlotDuration = ConstU64; } diff --git a/cumulus/parachains/runtimes/coretime/coretime-westend/Cargo.toml b/cumulus/parachains/runtimes/coretime/coretime-westend/Cargo.toml index 549ef7ce4d78..9e4aa7bf6242 100644 --- a/cumulus/parachains/runtimes/coretime/coretime-westend/Cargo.toml +++ b/cumulus/parachains/runtimes/coretime/coretime-westend/Cargo.toml @@ -191,6 +191,4 @@ try-runtime = [ "sp-runtime/try-runtime", ] -experimental = ["pallet-aura/experimental"] - fast-runtime = [] diff --git a/cumulus/parachains/runtimes/coretime/coretime-westend/src/lib.rs b/cumulus/parachains/runtimes/coretime/coretime-westend/src/lib.rs index 1a330821d3fc..db949d8ecc52 100644 --- a/cumulus/parachains/runtimes/coretime/coretime-westend/src/lib.rs +++ b/cumulus/parachains/runtimes/coretime/coretime-westend/src/lib.rs @@ -208,10 +208,7 @@ impl pallet_timestamp::Config for Runtime { /// A timestamp: milliseconds since the unix epoch. type Moment = u64; type OnTimestampSet = Aura; - #[cfg(feature = "experimental")] type MinimumPeriod = ConstU64<0>; - #[cfg(not(feature = "experimental"))] - type MinimumPeriod = ConstU64<{ SLOT_DURATION / 2 }>; type WeightInfo = weights::pallet_timestamp::WeightInfo; } @@ -372,7 +369,6 @@ impl pallet_aura::Config for Runtime { type DisabledValidators = (); type MaxAuthorities = ConstU32<100_000>; type AllowMultipleBlocksPerSlot = ConstBool; - #[cfg(feature = "experimental")] type SlotDuration = ConstU64; } diff --git a/cumulus/parachains/runtimes/glutton/glutton-westend/Cargo.toml b/cumulus/parachains/runtimes/glutton/glutton-westend/Cargo.toml index 23c5ce1c7f80..a357bf519e40 100644 --- a/cumulus/parachains/runtimes/glutton/glutton-westend/Cargo.toml +++ b/cumulus/parachains/runtimes/glutton/glutton-westend/Cargo.toml @@ -135,8 +135,6 @@ try-runtime = [ "sp-runtime/try-runtime", ] -experimental = ["pallet-aura/experimental"] - # A feature that should be enabled when the runtime should be built for on-chain # deployment. This will disable stuff that shouldn't be part of the on-chain wasm # to make it smaller, like logging for example. diff --git a/cumulus/parachains/runtimes/glutton/glutton-westend/src/lib.rs b/cumulus/parachains/runtimes/glutton/glutton-westend/src/lib.rs index 199057c37647..64a5113c967d 100644 --- a/cumulus/parachains/runtimes/glutton/glutton-westend/src/lib.rs +++ b/cumulus/parachains/runtimes/glutton/glutton-westend/src/lib.rs @@ -221,10 +221,7 @@ impl cumulus_pallet_aura_ext::Config for Runtime {} impl pallet_timestamp::Config for Runtime { type Moment = u64; type OnTimestampSet = Aura; - #[cfg(feature = "experimental")] type MinimumPeriod = ConstU64<0>; - #[cfg(not(feature = "experimental"))] - type MinimumPeriod = ConstU64<{ SLOT_DURATION / 2 }>; type WeightInfo = weights::pallet_timestamp::WeightInfo; } @@ -233,7 +230,6 @@ impl pallet_aura::Config for Runtime { type DisabledValidators = (); type MaxAuthorities = ConstU32<100_000>; type AllowMultipleBlocksPerSlot = ConstBool; - #[cfg(feature = "experimental")] type SlotDuration = ConstU64; } diff --git a/cumulus/parachains/runtimes/people/people-rococo/Cargo.toml b/cumulus/parachains/runtimes/people/people-rococo/Cargo.toml index c9781639c3e4..780719607612 100644 --- a/cumulus/parachains/runtimes/people/people-rococo/Cargo.toml +++ b/cumulus/parachains/runtimes/people/people-rococo/Cargo.toml @@ -189,5 +189,3 @@ try-runtime = [ "polkadot-runtime-common/try-runtime", "sp-runtime/try-runtime", ] - -experimental = ["pallet-aura/experimental"] diff --git a/cumulus/parachains/runtimes/people/people-rococo/src/lib.rs b/cumulus/parachains/runtimes/people/people-rococo/src/lib.rs index c5e420785de5..b0061d48c2af 100644 --- a/cumulus/parachains/runtimes/people/people-rococo/src/lib.rs +++ b/cumulus/parachains/runtimes/people/people-rococo/src/lib.rs @@ -188,10 +188,7 @@ impl pallet_timestamp::Config for Runtime { /// A timestamp: milliseconds since the unix epoch. type Moment = u64; type OnTimestampSet = Aura; - #[cfg(feature = "experimental")] type MinimumPeriod = ConstU64<0>; - #[cfg(not(feature = "experimental"))] - type MinimumPeriod = ConstU64<{ SLOT_DURATION / 2 }>; type WeightInfo = weights::pallet_timestamp::WeightInfo; } @@ -339,7 +336,6 @@ impl pallet_aura::Config for Runtime { type DisabledValidators = (); type MaxAuthorities = ConstU32<100_000>; type AllowMultipleBlocksPerSlot = ConstBool; - #[cfg(feature = "experimental")] type SlotDuration = ConstU64; } diff --git a/cumulus/parachains/runtimes/people/people-westend/Cargo.toml b/cumulus/parachains/runtimes/people/people-westend/Cargo.toml index 8d8421332c13..a3766f5be926 100644 --- a/cumulus/parachains/runtimes/people/people-westend/Cargo.toml +++ b/cumulus/parachains/runtimes/people/people-westend/Cargo.toml @@ -189,5 +189,3 @@ try-runtime = [ "polkadot-runtime-common/try-runtime", "sp-runtime/try-runtime", ] - -experimental = ["pallet-aura/experimental"] diff --git a/cumulus/parachains/runtimes/people/people-westend/src/lib.rs b/cumulus/parachains/runtimes/people/people-westend/src/lib.rs index dea079a4a98a..dcceec094b55 100644 --- a/cumulus/parachains/runtimes/people/people-westend/src/lib.rs +++ b/cumulus/parachains/runtimes/people/people-westend/src/lib.rs @@ -188,10 +188,7 @@ impl pallet_timestamp::Config for Runtime { /// A timestamp: milliseconds since the unix epoch. type Moment = u64; type OnTimestampSet = Aura; - #[cfg(feature = "experimental")] type MinimumPeriod = ConstU64<0>; - #[cfg(not(feature = "experimental"))] - type MinimumPeriod = ConstU64<{ SLOT_DURATION / 2 }>; type WeightInfo = weights::pallet_timestamp::WeightInfo; } @@ -339,7 +336,6 @@ impl pallet_aura::Config for Runtime { type DisabledValidators = (); type MaxAuthorities = ConstU32<100_000>; type AllowMultipleBlocksPerSlot = ConstBool; - #[cfg(feature = "experimental")] type SlotDuration = ConstU64; } diff --git a/cumulus/parachains/runtimes/starters/seedling/Cargo.toml b/cumulus/parachains/runtimes/starters/seedling/Cargo.toml index 1f5bee7784e9..9f08fdf59437 100644 --- a/cumulus/parachains/runtimes/starters/seedling/Cargo.toml +++ b/cumulus/parachains/runtimes/starters/seedling/Cargo.toml @@ -79,5 +79,3 @@ std = [ "sp-version/std", "substrate-wasm-builder", ] - -experimental = ["pallet-aura/experimental"] diff --git a/cumulus/parachains/runtimes/starters/seedling/src/lib.rs b/cumulus/parachains/runtimes/starters/seedling/src/lib.rs index 023c99783023..6de082250dc1 100644 --- a/cumulus/parachains/runtimes/starters/seedling/src/lib.rs +++ b/cumulus/parachains/runtimes/starters/seedling/src/lib.rs @@ -213,17 +213,13 @@ impl pallet_aura::Config for Runtime { type DisabledValidators = (); type MaxAuthorities = ConstU32<100_000>; type AllowMultipleBlocksPerSlot = ConstBool; - #[cfg(feature = "experimental")] type SlotDuration = pallet_aura::MinimumPeriodTimesTwo; } impl pallet_timestamp::Config for Runtime { type Moment = u64; type OnTimestampSet = Aura; - #[cfg(feature = "experimental")] type MinimumPeriod = ConstU64<0>; - #[cfg(not(feature = "experimental"))] - type MinimumPeriod = ConstU64<{ parachains_common::SLOT_DURATION / 2 }>; type WeightInfo = (); } diff --git a/cumulus/parachains/runtimes/starters/shell/Cargo.toml b/cumulus/parachains/runtimes/starters/shell/Cargo.toml index 5a8f2a9d1253..2f82547afe9a 100644 --- a/cumulus/parachains/runtimes/starters/shell/Cargo.toml +++ b/cumulus/parachains/runtimes/starters/shell/Cargo.toml @@ -99,5 +99,3 @@ try-runtime = [ "parachain-info/try-runtime", "sp-runtime/try-runtime", ] - -experimental = ["pallet-aura/experimental"] diff --git a/cumulus/parachains/runtimes/starters/shell/src/lib.rs b/cumulus/parachains/runtimes/starters/shell/src/lib.rs index fedac36e48d6..11dd07954b30 100644 --- a/cumulus/parachains/runtimes/starters/shell/src/lib.rs +++ b/cumulus/parachains/runtimes/starters/shell/src/lib.rs @@ -245,17 +245,13 @@ impl pallet_aura::Config for Runtime { type DisabledValidators = (); type MaxAuthorities = ConstU32<100_000>; type AllowMultipleBlocksPerSlot = ConstBool; - #[cfg(feature = "experimental")] type SlotDuration = pallet_aura::MinimumPeriodTimesTwo; } impl pallet_timestamp::Config for Runtime { type Moment = u64; type OnTimestampSet = Aura; - #[cfg(feature = "experimental")] type MinimumPeriod = ConstU64<0>; - #[cfg(not(feature = "experimental"))] - type MinimumPeriod = ConstU64<{ parachains_common::SLOT_DURATION / 2 }>; type WeightInfo = (); } diff --git a/cumulus/parachains/runtimes/testing/penpal/Cargo.toml b/cumulus/parachains/runtimes/testing/penpal/Cargo.toml index 5a8b15740e4b..62105b318f20 100644 --- a/cumulus/parachains/runtimes/testing/penpal/Cargo.toml +++ b/cumulus/parachains/runtimes/testing/penpal/Cargo.toml @@ -192,5 +192,3 @@ try-runtime = [ "polkadot-runtime-common/try-runtime", "sp-runtime/try-runtime", ] - -experimental = ["pallet-aura/experimental"] diff --git a/cumulus/parachains/runtimes/testing/penpal/src/lib.rs b/cumulus/parachains/runtimes/testing/penpal/src/lib.rs index 62065619e42f..6242d19a6287 100644 --- a/cumulus/parachains/runtimes/testing/penpal/src/lib.rs +++ b/cumulus/parachains/runtimes/testing/penpal/src/lib.rs @@ -580,7 +580,6 @@ impl pallet_aura::Config for Runtime { type DisabledValidators = (); type MaxAuthorities = ConstU32<100_000>; type AllowMultipleBlocksPerSlot = ConstBool; - #[cfg(feature = "experimental")] type SlotDuration = pallet_aura::MinimumPeriodTimesTwo; } diff --git a/cumulus/parachains/runtimes/testing/rococo-parachain/Cargo.toml b/cumulus/parachains/runtimes/testing/rococo-parachain/Cargo.toml index 2023d9abf5d4..c1d8205d0fec 100644 --- a/cumulus/parachains/runtimes/testing/rococo-parachain/Cargo.toml +++ b/cumulus/parachains/runtimes/testing/rococo-parachain/Cargo.toml @@ -135,5 +135,3 @@ runtime-benchmarks = [ "xcm-builder/runtime-benchmarks", "xcm-executor/runtime-benchmarks", ] - -experimental = ["pallet-aura/experimental"] diff --git a/cumulus/parachains/runtimes/testing/rococo-parachain/src/lib.rs b/cumulus/parachains/runtimes/testing/rococo-parachain/src/lib.rs index 469f06a1aa6f..7edbe9e8938e 100644 --- a/cumulus/parachains/runtimes/testing/rococo-parachain/src/lib.rs +++ b/cumulus/parachains/runtimes/testing/rococo-parachain/src/lib.rs @@ -228,10 +228,7 @@ impl pallet_timestamp::Config for Runtime { /// A timestamp: milliseconds since the unix epoch. type Moment = u64; type OnTimestampSet = Aura; - #[cfg(feature = "experimental")] type MinimumPeriod = ConstU64<0>; - #[cfg(not(feature = "experimental"))] - type MinimumPeriod = ConstU64<{ SLOT_DURATION / 2 }>; type WeightInfo = (); } @@ -595,7 +592,6 @@ impl pallet_aura::Config for Runtime { type DisabledValidators = (); type MaxAuthorities = ConstU32<100_000>; type AllowMultipleBlocksPerSlot = ConstBool; - #[cfg(feature = "experimental")] type SlotDuration = ConstU64; } diff --git a/docs/sdk/Cargo.toml b/docs/sdk/Cargo.toml index 8b498d407c02..a3d6fdc7f43c 100644 --- a/docs/sdk/Cargo.toml +++ b/docs/sdk/Cargo.toml @@ -17,10 +17,7 @@ workspace = true # Needed for all FRAME-based code parity-scale-codec = { version = "3.0.0", default-features = false } scale-info = { version = "2.6.0", default-features = false } -frame = { path = "../../substrate/frame", features = [ - "experimental", - "runtime", -] } +frame = { path = "../../substrate/frame", features = ["runtime"] } pallet-examples = { path = "../../substrate/frame/examples" } pallet-default-config-example = { path = "../../substrate/frame/examples/default-config" } pallet-example-offchain-worker = { path = "../../substrate/frame/examples/offchain-worker" } @@ -86,6 +83,3 @@ sp-version = { path = "../../substrate/primitives/version" } # XCM xcm = { package = "staging-xcm", path = "../../polkadot/xcm" } - -[features] -experimental = ["pallet-aura/experimental"] diff --git a/docs/sdk/src/polkadot_sdk/cumulus.rs b/docs/sdk/src/polkadot_sdk/cumulus.rs index 60c4839f9e2d..d6b12390ffd3 100644 --- a/docs/sdk/src/polkadot_sdk/cumulus.rs +++ b/docs/sdk/src/polkadot_sdk/cumulus.rs @@ -110,7 +110,6 @@ mod tests { type DisabledValidators = (); type MaxAuthorities = ConstU32<100_000>; type AllowMultipleBlocksPerSlot = ConstBool; - #[cfg(feature = "experimental")] type SlotDuration = pallet_aura::MinimumPeriodTimesTwo; } diff --git a/scripts/update-ui-tests.sh b/scripts/update-ui-tests.sh index dedee8e641f8..bf1315e51143 100755 --- a/scripts/update-ui-tests.sh +++ b/scripts/update-ui-tests.sh @@ -37,4 +37,4 @@ export TRYBUILD=overwrite $RUSTUP_RUN cargo test --manifest-path substrate/primitives/runtime-interface/Cargo.toml ui $RUSTUP_RUN cargo test -p sp-api-test ui $RUSTUP_RUN cargo test -p frame-election-provider-solution-type ui -$RUSTUP_RUN cargo test -p frame-support-test --features=no-metadata-docs,try-runtime,experimental ui +$RUSTUP_RUN cargo test -p frame-support-test --features=no-metadata-docs,try-runtime ui diff --git a/substrate/bin/node/runtime/Cargo.toml b/substrate/bin/node/runtime/Cargo.toml index bdef42474d09..ebe5610f95bf 100644 --- a/substrate/bin/node/runtime/Cargo.toml +++ b/substrate/bin/node/runtime/Cargo.toml @@ -425,8 +425,3 @@ try-runtime = [ "pallet-whitelist/try-runtime", "sp-runtime/try-runtime", ] -experimental = [ - "frame-support/experimental", - "frame-system/experimental", - "pallet-example-tasks/experimental", -] diff --git a/substrate/frame/Cargo.toml b/substrate/frame/Cargo.toml index 6746723e72f7..afb1efcd61d0 100644 --- a/substrate/frame/Cargo.toml +++ b/substrate/frame/Cargo.toml @@ -13,8 +13,6 @@ publish = false workspace = true [package.metadata.docs.rs] -# enable `experimental` feature for docs -features = ["experimental"] targets = ["x86_64-unknown-linux-gnu"] [dependencies] @@ -59,7 +57,6 @@ pallet-examples = { path = "./examples" } [features] default = ["runtime", "std"] -experimental = ["frame-support/experimental"] runtime = [ "sp-api", "sp-block-builder", diff --git a/substrate/frame/aura/Cargo.toml b/substrate/frame/aura/Cargo.toml index de698487efa7..24a279b0d939 100644 --- a/substrate/frame/aura/Cargo.toml +++ b/substrate/frame/aura/Cargo.toml @@ -53,4 +53,3 @@ try-runtime = [ "pallet-timestamp/try-runtime", "sp-runtime/try-runtime", ] -experimental = [] diff --git a/substrate/frame/aura/src/lib.rs b/substrate/frame/aura/src/lib.rs index f7506db05d1d..55653de97a8b 100644 --- a/substrate/frame/aura/src/lib.rs +++ b/substrate/frame/aura/src/lib.rs @@ -66,9 +66,6 @@ const LOG_TARGET: &str = "runtime::aura"; /// /// This was the default behavior of the Aura pallet and may be used for /// backwards compatibility. -/// -/// Note that this type is likely not useful without the `experimental` -/// feature. pub struct MinimumPeriodTimesTwo(sp_std::marker::PhantomData); impl Get for MinimumPeriodTimesTwo { @@ -117,10 +114,6 @@ pub mod pallet { /// The effective value of this type should not change while the chain is running. /// /// For backwards compatibility either use [`MinimumPeriodTimesTwo`] or a const. - /// - /// This associated type is only present when compiled with the `experimental` - /// feature. - #[cfg(feature = "experimental")] type SlotDuration: Get<::Moment>; } @@ -250,17 +243,7 @@ impl Pallet { /// Determine the Aura slot-duration based on the Timestamp module configuration. pub fn slot_duration() -> T::Moment { - #[cfg(feature = "experimental")] - { - T::SlotDuration::get() - } - - #[cfg(not(feature = "experimental"))] - { - // we double the minimum block-period so each author can always propose within - // the majority of its slot. - ::MinimumPeriod::get().saturating_mul(2u32.into()) - } + T::SlotDuration::get() } /// Ensure the correctness of the state of this pallet. diff --git a/substrate/frame/aura/src/mock.rs b/substrate/frame/aura/src/mock.rs index 8bc3e4071583..e39762e13d64 100644 --- a/substrate/frame/aura/src/mock.rs +++ b/substrate/frame/aura/src/mock.rs @@ -84,8 +84,6 @@ impl pallet_aura::Config for Test { type DisabledValidators = MockDisabledValidators; type MaxAuthorities = ConstU32<10>; type AllowMultipleBlocksPerSlot = AllowMultipleBlocksPerSlot; - - #[cfg(feature = "experimental")] type SlotDuration = ConstU64; } diff --git a/substrate/frame/core-fellowship/Cargo.toml b/substrate/frame/core-fellowship/Cargo.toml index 3e678d327446..59d9b9996f18 100644 --- a/substrate/frame/core-fellowship/Cargo.toml +++ b/substrate/frame/core-fellowship/Cargo.toml @@ -34,7 +34,6 @@ default = ["std"] std = [ "codec/std", "frame-benchmarking?/std", - "frame-support/experimental", "frame-support/std", "frame-system/std", "log/std", diff --git a/substrate/frame/examples/frame-crate/Cargo.toml b/substrate/frame/examples/frame-crate/Cargo.toml index 93a46ba7b249..eee4bc1c3a0c 100644 --- a/substrate/frame/examples/frame-crate/Cargo.toml +++ b/substrate/frame/examples/frame-crate/Cargo.toml @@ -19,7 +19,7 @@ targets = ["x86_64-unknown-linux-gnu"] codec = { package = "parity-scale-codec", version = "3.6.1", default-features = false } scale-info = { version = "2.5.0", default-features = false, features = ["derive"] } -frame = { path = "../..", default-features = false, features = ["experimental", "runtime"] } +frame = { path = "../..", default-features = false, features = ["runtime"] } [features] diff --git a/substrate/frame/examples/kitchensink/Cargo.toml b/substrate/frame/examples/kitchensink/Cargo.toml index 37384107530e..0aa14cc50247 100644 --- a/substrate/frame/examples/kitchensink/Cargo.toml +++ b/substrate/frame/examples/kitchensink/Cargo.toml @@ -20,7 +20,7 @@ codec = { package = "parity-scale-codec", version = "3.6.1", default-features = log = { workspace = true } scale-info = { version = "2.10.0", default-features = false, features = ["derive"] } -frame-support = { path = "../../support", default-features = false, features = ["experimental"] } +frame-support = { path = "../../support", default-features = false } frame-system = { path = "../../system", default-features = false } sp-io = { path = "../../../primitives/io", default-features = false } diff --git a/substrate/frame/examples/tasks/Cargo.toml b/substrate/frame/examples/tasks/Cargo.toml index 41521114366a..088014ca9d97 100644 --- a/substrate/frame/examples/tasks/Cargo.toml +++ b/substrate/frame/examples/tasks/Cargo.toml @@ -53,4 +53,3 @@ try-runtime = [ "frame-system/try-runtime", "sp-runtime/try-runtime", ] -experimental = ["frame-support/experimental", "frame-system/experimental"] diff --git a/substrate/frame/examples/tasks/src/tests.rs b/substrate/frame/examples/tasks/src/tests.rs index fc3c69f4aef9..787df445cb9d 100644 --- a/substrate/frame/examples/tasks/src/tests.rs +++ b/substrate/frame/examples/tasks/src/tests.rs @@ -19,12 +19,9 @@ #![cfg(test)] use crate::{mock::*, Numbers}; -use frame_support::traits::Task; +use frame_support::{assert_noop, assert_ok, traits::Task}; use sp_runtime::BuildStorage; -#[cfg(feature = "experimental")] -use frame_support::{assert_noop, assert_ok}; - // This function basically just builds a genesis storage key/value store according to // our desired mockup. pub fn new_test_ext() -> sp_io::TestExternalities { @@ -92,7 +89,6 @@ fn task_index_works_at_runtime_level() { }); } -#[cfg(feature = "experimental")] #[test] fn task_execution_works() { new_test_ext().execute_with(|| { @@ -114,7 +110,6 @@ fn task_execution_works() { }); } -#[cfg(feature = "experimental")] #[test] fn task_execution_fails_for_invalid_task() { new_test_ext().execute_with(|| { diff --git a/substrate/frame/executive/Cargo.toml b/substrate/frame/executive/Cargo.toml index 63285e4cb493..b24060f6d588 100644 --- a/substrate/frame/executive/Cargo.toml +++ b/substrate/frame/executive/Cargo.toml @@ -45,7 +45,6 @@ default = ["std"] with-tracing = ["sp-tracing/with-tracing"] std = [ "codec/std", - "frame-support/experimental", "frame-support/std", "frame-system/std", "frame-try-runtime/std", diff --git a/substrate/frame/parameters/Cargo.toml b/substrate/frame/parameters/Cargo.toml index 07ebeea52d52..8240425ade95 100644 --- a/substrate/frame/parameters/Cargo.toml +++ b/substrate/frame/parameters/Cargo.toml @@ -14,7 +14,7 @@ paste = { version = "1.0.14", default-features = false } serde = { features = ["derive"], optional = true, workspace = true, default-features = true } docify = "0.2.5" -frame-support = { path = "../support", default-features = false, features = ["experimental"] } +frame-support = { path = "../support", default-features = false } frame-system = { path = "../system", default-features = false } sp-core = { path = "../../primitives/core", default-features = false } sp-runtime = { path = "../../primitives/runtime", default-features = false } diff --git a/substrate/frame/safe-mode/Cargo.toml b/substrate/frame/safe-mode/Cargo.toml index 0c59740bef30..faca5812df96 100644 --- a/substrate/frame/safe-mode/Cargo.toml +++ b/substrate/frame/safe-mode/Cargo.toml @@ -34,7 +34,7 @@ sp-io = { path = "../../primitives/io" } pallet-balances = { path = "../balances" } pallet-utility = { path = "../utility" } pallet-proxy = { path = "../proxy" } -frame-support = { path = "../support", features = ["experimental"] } +frame-support = { path = "../support" } [features] default = ["std"] diff --git a/substrate/frame/salary/Cargo.toml b/substrate/frame/salary/Cargo.toml index ba57fd46eebb..5d3be0bb7146 100644 --- a/substrate/frame/salary/Cargo.toml +++ b/substrate/frame/salary/Cargo.toml @@ -34,7 +34,6 @@ default = ["std"] std = [ "codec/std", "frame-benchmarking?/std", - "frame-support/experimental", "frame-support/std", "frame-system/std", "log/std", diff --git a/substrate/frame/src/lib.rs b/substrate/frame/src/lib.rs index 549e177491d3..03fe209c1d45 100644 --- a/substrate/frame/src/lib.rs +++ b/substrate/frame/src/lib.rs @@ -34,10 +34,6 @@ //! //! See [`polkadot_sdk::frame`](../polkadot_sdk_docs/polkadot_sdk/frame_runtime/index.html). //! -//! ## Warning: Experimental -//! -//! This crate and all of its content is experimental, and should not yet be used in production. -//! //! ## Underlying dependencies //! //! This crate is an amalgamation of multiple other crates that are often used together to compose a @@ -47,7 +43,6 @@ //! sources are listed (and re-exported again) in [`deps`]. #![cfg_attr(not(feature = "std"), no_std)] -#![cfg(feature = "experimental")] /// Exports the main pallet macro. This can wrap a `mod pallet` and will transform it into /// being a pallet, eg `#[frame::pallet] mod pallet { .. }`. diff --git a/substrate/frame/support/Cargo.toml b/substrate/frame/support/Cargo.toml index 113af41751ed..5a668bb29160 100644 --- a/substrate/frame/support/Cargo.toml +++ b/substrate/frame/support/Cargo.toml @@ -109,7 +109,6 @@ try-runtime = [ "sp-debug-derive/force-debug", "sp-runtime/try-runtime", ] -experimental = [] # By default some types have documentation, `no-metadata-docs` allows to reduce the documentation # in the metadata. no-metadata-docs = [ diff --git a/substrate/frame/support/src/lib.rs b/substrate/frame/support/src/lib.rs index 6ea7fa33e774..17e230b89138 100644 --- a/substrate/frame/support/src/lib.rs +++ b/substrate/frame/support/src/lib.rs @@ -177,8 +177,7 @@ pub use frame_support_procedural::storage_alias; pub use frame_support_procedural::derive_impl; -/// Experimental macros for defining dynamic params that can be used in pallet configs. -#[cfg(feature = "experimental")] +/// Macros for defining dynamic params that can be used in pallet configs. pub mod dynamic_params { pub use frame_support_procedural::{ dynamic_aggregated_params_internal, dynamic_pallet_params, dynamic_params, @@ -835,7 +834,6 @@ macro_rules! assert_error_encoded_size { /// /// Returns the original result of the closure. #[macro_export] -#[cfg(feature = "experimental")] macro_rules! hypothetically { ( $e:expr ) => { $crate::storage::transactional::with_transaction(|| -> $crate::__private::TransactionOutcome> { @@ -849,7 +847,6 @@ macro_rules! hypothetically { /// /// Reverts any storage changes made by the closure. #[macro_export] -#[cfg(feature = "experimental")] macro_rules! hypothetically_ok { ($e:expr $(, $args:expr)* $(,)?) => { $crate::assert_ok!($crate::hypothetically!($e) $(, $args)*); diff --git a/substrate/frame/support/test/Cargo.toml b/substrate/frame/support/test/Cargo.toml index ae2c56a531fd..024850b10861 100644 --- a/substrate/frame/support/test/Cargo.toml +++ b/substrate/frame/support/test/Cargo.toml @@ -61,10 +61,6 @@ std = [ "sp-version/std", "test-pallet/std", ] -experimental = [ - "frame-support/experimental", - "frame-system/experimental", -] try-runtime = [ "frame-executive/try-runtime", "frame-support/try-runtime", diff --git a/substrate/frame/support/test/stg_frame_crate/Cargo.toml b/substrate/frame/support/test/stg_frame_crate/Cargo.toml index 632ea4e794f6..4869185f04c7 100644 --- a/substrate/frame/support/test/stg_frame_crate/Cargo.toml +++ b/substrate/frame/support/test/stg_frame_crate/Cargo.toml @@ -16,7 +16,7 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] codec = { package = "parity-scale-codec", version = "3.6.1", default-features = false, features = ["derive"] } -frame = { path = "../../..", default-features = false, features = ["experimental", "runtime"] } +frame = { path = "../../..", default-features = false, features = ["runtime"] } scale-info = { version = "2.10.0", default-features = false, features = ["derive"] } [features] diff --git a/substrate/frame/support/test/tests/pallet_outer_enums_explicit.rs b/substrate/frame/support/test/tests/pallet_outer_enums_explicit.rs index 33b96dea9486..3da392b65c65 100644 --- a/substrate/frame/support/test/tests/pallet_outer_enums_explicit.rs +++ b/substrate/frame/support/test/tests/pallet_outer_enums_explicit.rs @@ -91,9 +91,7 @@ fn module_error_outer_enum_expand_explicit() { frame_system::Error::NonZeroRefCount => (), frame_system::Error::CallFiltered => (), frame_system::Error::MultiBlockMigrationsOngoing => (), - #[cfg(feature = "experimental")] frame_system::Error::InvalidTask => (), - #[cfg(feature = "experimental")] frame_system::Error::FailedTask => (), frame_system::Error::NothingAuthorized => (), frame_system::Error::Unauthorized => (), diff --git a/substrate/frame/support/test/tests/pallet_outer_enums_implicit.rs b/substrate/frame/support/test/tests/pallet_outer_enums_implicit.rs index db006fe79359..18eca3fd6092 100644 --- a/substrate/frame/support/test/tests/pallet_outer_enums_implicit.rs +++ b/substrate/frame/support/test/tests/pallet_outer_enums_implicit.rs @@ -91,9 +91,7 @@ fn module_error_outer_enum_expand_implicit() { frame_system::Error::NonZeroRefCount => (), frame_system::Error::CallFiltered => (), frame_system::Error::MultiBlockMigrationsOngoing => (), - #[cfg(feature = "experimental")] frame_system::Error::InvalidTask => (), - #[cfg(feature = "experimental")] frame_system::Error::FailedTask => (), frame_system::Error::NothingAuthorized => (), frame_system::Error::Unauthorized => (), diff --git a/substrate/frame/system/Cargo.toml b/substrate/frame/system/Cargo.toml index 416969e9c477..87c6fff66baa 100644 --- a/substrate/frame/system/Cargo.toml +++ b/substrate/frame/system/Cargo.toml @@ -56,7 +56,6 @@ runtime-benchmarks = [ "sp-runtime/runtime-benchmarks", ] try-runtime = ["frame-support/try-runtime", "sp-runtime/try-runtime"] -experimental = ["frame-support/experimental"] [[bench]] name = "bench" diff --git a/substrate/frame/system/src/lib.rs b/substrate/frame/system/src/lib.rs index 0318f77342e0..6f70b827ebaa 100644 --- a/substrate/frame/system/src/lib.rs +++ b/substrate/frame/system/src/lib.rs @@ -746,7 +746,6 @@ pub mod pallet { Ok(().into()) } - #[cfg(feature = "experimental")] #[pallet::call_index(8)] #[pallet::weight(task.weight())] pub fn do_task(origin: OriginFor, task: T::RuntimeTask) -> DispatchResultWithPostInfo { @@ -835,13 +834,10 @@ pub mod pallet { KilledAccount { account: T::AccountId }, /// On on-chain remark happened. Remarked { sender: T::AccountId, hash: T::Hash }, - #[cfg(feature = "experimental")] /// A [`Task`] has started executing TaskStarted { task: T::RuntimeTask }, - #[cfg(feature = "experimental")] /// A [`Task`] has finished executing. TaskCompleted { task: T::RuntimeTask }, - #[cfg(feature = "experimental")] /// A [`Task`] failed during execution. TaskFailed { task: T::RuntimeTask, err: DispatchError }, /// An upgrade was authorized. @@ -869,10 +865,8 @@ pub mod pallet { CallFiltered, /// A multi-block migration is ongoing and prevents the current code from being replaced. MultiBlockMigrationsOngoing, - #[cfg(feature = "experimental")] /// The specified [`Task`] is not valid. InvalidTask, - #[cfg(feature = "experimental")] /// The specified [`Task`] failed during execution. FailedTask, /// No upgrade authorized. diff --git a/templates/minimal/node/Cargo.toml b/templates/minimal/node/Cargo.toml index 410cfc9f6c34..dde381d5569c 100644 --- a/templates/minimal/node/Cargo.toml +++ b/templates/minimal/node/Cargo.toml @@ -49,10 +49,7 @@ substrate-frame-rpc-system = { path = "../../../substrate/utils/frame/rpc/system # Once the native runtime is gone, there should be little to no dependency on FRAME here, and # certainly no dependency on the runtime. -frame = { path = "../../../substrate/frame", features = [ - "experimental", - "runtime", -] } +frame = { path = "../../../substrate/frame", features = ["runtime"] } runtime = { package = "minimal-template-runtime", path = "../runtime" } [build-dependencies] diff --git a/templates/minimal/pallets/template/Cargo.toml b/templates/minimal/pallets/template/Cargo.toml index 9982e5ea53bc..cef3296519a7 100644 --- a/templates/minimal/pallets/template/Cargo.toml +++ b/templates/minimal/pallets/template/Cargo.toml @@ -22,10 +22,7 @@ codec = { package = "parity-scale-codec", version = "3.0.0", features = [ scale-info = { version = "2.10.0", default-features = false, features = [ "derive", ] } -frame = { path = "../../../../substrate/frame", default-features = false, features = [ - "experimental", - "runtime", -] } +frame = { path = "../../../../substrate/frame", default-features = false, features = ["runtime"] } [features] diff --git a/templates/minimal/runtime/Cargo.toml b/templates/minimal/runtime/Cargo.toml index 20ffb706eb49..c1b81b5c9c3e 100644 --- a/templates/minimal/runtime/Cargo.toml +++ b/templates/minimal/runtime/Cargo.toml @@ -17,10 +17,7 @@ parity-scale-codec = { version = "3.0.0", default-features = false } scale-info = { version = "2.6.0", default-features = false } # this is a frame-based runtime, thus importing `frame` with runtime feature enabled. -frame = { path = "../../../substrate/frame", default-features = false, features = [ - "experimental", - "runtime", -] } +frame = { path = "../../../substrate/frame", default-features = false, features = ["runtime"] } # pallets that we want to use pallet-balances = { path = "../../../substrate/frame/balances", default-features = false } diff --git a/templates/parachain/runtime/Cargo.toml b/templates/parachain/runtime/Cargo.toml index 44e9341b568a..ce87577e730f 100644 --- a/templates/parachain/runtime/Cargo.toml +++ b/templates/parachain/runtime/Cargo.toml @@ -196,5 +196,3 @@ try-runtime = [ "polkadot-runtime-common/try-runtime", "sp-runtime/try-runtime", ] - -experimental = ["pallet-aura/experimental"] diff --git a/templates/parachain/runtime/src/lib.rs b/templates/parachain/runtime/src/lib.rs index 74ecd751f672..34b82fa1513b 100644 --- a/templates/parachain/runtime/src/lib.rs +++ b/templates/parachain/runtime/src/lib.rs @@ -454,7 +454,6 @@ impl pallet_aura::Config for Runtime { type DisabledValidators = (); type MaxAuthorities = ConstU32<100_000>; type AllowMultipleBlocksPerSlot = ConstBool; - #[cfg(feature = "experimental")] type SlotDuration = pallet_aura::MinimumPeriodTimesTwo; } diff --git a/templates/solochain/runtime/Cargo.toml b/templates/solochain/runtime/Cargo.toml index 4f22e7ff6a3b..e65999531802 100644 --- a/templates/solochain/runtime/Cargo.toml +++ b/templates/solochain/runtime/Cargo.toml @@ -148,5 +148,3 @@ try-runtime = [ "pallet-transaction-payment/try-runtime", "sp-runtime/try-runtime", ] - -experimental = ["pallet-aura/experimental"] diff --git a/templates/solochain/runtime/src/lib.rs b/templates/solochain/runtime/src/lib.rs index 409b639f021e..036978dc3b64 100644 --- a/templates/solochain/runtime/src/lib.rs +++ b/templates/solochain/runtime/src/lib.rs @@ -180,8 +180,6 @@ impl pallet_aura::Config for Runtime { type DisabledValidators = (); type MaxAuthorities = ConstU32<32>; type AllowMultipleBlocksPerSlot = ConstBool; - - #[cfg(feature = "experimental")] type SlotDuration = pallet_aura::MinimumPeriodTimesTwo; } From c2fb8e42b890a693cd12896ee89d7be1f7835d96 Mon Sep 17 00:00:00 2001 From: Dmitry Sinyavin Date: Wed, 13 Mar 2024 17:20:22 +0100 Subject: [PATCH 2/4] Revert FRAME-related changes --- cumulus/pallets/xcmp-queue/Cargo.toml | 2 +- docs/sdk/Cargo.toml | 5 ++++- scripts/update-ui-tests.sh | 2 +- substrate/bin/node/runtime/Cargo.toml | 5 +++++ substrate/frame/Cargo.toml | 3 +++ substrate/frame/aura/Cargo.toml | 1 + substrate/frame/core-fellowship/Cargo.toml | 1 + substrate/frame/examples/frame-crate/Cargo.toml | 2 +- substrate/frame/examples/kitchensink/Cargo.toml | 2 +- substrate/frame/examples/tasks/Cargo.toml | 1 + substrate/frame/examples/tasks/src/tests.rs | 7 ++++++- substrate/frame/executive/Cargo.toml | 1 + substrate/frame/parameters/Cargo.toml | 2 +- substrate/frame/safe-mode/Cargo.toml | 2 +- substrate/frame/salary/Cargo.toml | 1 + substrate/frame/src/lib.rs | 5 +++++ substrate/frame/support/Cargo.toml | 1 + substrate/frame/support/src/lib.rs | 5 ++++- substrate/frame/support/test/Cargo.toml | 4 ++++ substrate/frame/support/test/stg_frame_crate/Cargo.toml | 2 +- .../support/test/tests/pallet_outer_enums_explicit.rs | 2 ++ .../support/test/tests/pallet_outer_enums_implicit.rs | 2 ++ substrate/frame/system/Cargo.toml | 1 + substrate/frame/system/src/lib.rs | 6 ++++++ templates/minimal/node/Cargo.toml | 5 ++++- templates/minimal/pallets/template/Cargo.toml | 5 ++++- templates/minimal/runtime/Cargo.toml | 5 ++++- 27 files changed, 67 insertions(+), 13 deletions(-) diff --git a/cumulus/pallets/xcmp-queue/Cargo.toml b/cumulus/pallets/xcmp-queue/Cargo.toml index 93f8a22a3989..9078d5eda997 100644 --- a/cumulus/pallets/xcmp-queue/Cargo.toml +++ b/cumulus/pallets/xcmp-queue/Cargo.toml @@ -44,7 +44,7 @@ bp-xcm-bridge-hub-router = { path = "../../../bridges/primitives/xcm-bridge-hub- # Substrate sp-core = { path = "../../../substrate/primitives/core" } pallet-balances = { path = "../../../substrate/frame/balances" } -frame-support = { path = "../../../substrate/frame/support" } +frame-support = { path = "../../../substrate/frame/support", features = ["experimental"] } # Polkadot xcm-builder = { package = "staging-xcm-builder", path = "../../../polkadot/xcm/xcm-builder" } diff --git a/docs/sdk/Cargo.toml b/docs/sdk/Cargo.toml index a3d6fdc7f43c..3f40a950c286 100644 --- a/docs/sdk/Cargo.toml +++ b/docs/sdk/Cargo.toml @@ -17,7 +17,10 @@ workspace = true # Needed for all FRAME-based code parity-scale-codec = { version = "3.0.0", default-features = false } scale-info = { version = "2.6.0", default-features = false } -frame = { path = "../../substrate/frame", features = ["runtime"] } +frame = { path = "../../substrate/frame", features = [ + "experimental", + "runtime", +] } pallet-examples = { path = "../../substrate/frame/examples" } pallet-default-config-example = { path = "../../substrate/frame/examples/default-config" } pallet-example-offchain-worker = { path = "../../substrate/frame/examples/offchain-worker" } diff --git a/scripts/update-ui-tests.sh b/scripts/update-ui-tests.sh index bf1315e51143..dedee8e641f8 100755 --- a/scripts/update-ui-tests.sh +++ b/scripts/update-ui-tests.sh @@ -37,4 +37,4 @@ export TRYBUILD=overwrite $RUSTUP_RUN cargo test --manifest-path substrate/primitives/runtime-interface/Cargo.toml ui $RUSTUP_RUN cargo test -p sp-api-test ui $RUSTUP_RUN cargo test -p frame-election-provider-solution-type ui -$RUSTUP_RUN cargo test -p frame-support-test --features=no-metadata-docs,try-runtime ui +$RUSTUP_RUN cargo test -p frame-support-test --features=no-metadata-docs,try-runtime,experimental ui diff --git a/substrate/bin/node/runtime/Cargo.toml b/substrate/bin/node/runtime/Cargo.toml index ebe5610f95bf..bdef42474d09 100644 --- a/substrate/bin/node/runtime/Cargo.toml +++ b/substrate/bin/node/runtime/Cargo.toml @@ -425,3 +425,8 @@ try-runtime = [ "pallet-whitelist/try-runtime", "sp-runtime/try-runtime", ] +experimental = [ + "frame-support/experimental", + "frame-system/experimental", + "pallet-example-tasks/experimental", +] diff --git a/substrate/frame/Cargo.toml b/substrate/frame/Cargo.toml index afb1efcd61d0..6746723e72f7 100644 --- a/substrate/frame/Cargo.toml +++ b/substrate/frame/Cargo.toml @@ -13,6 +13,8 @@ publish = false workspace = true [package.metadata.docs.rs] +# enable `experimental` feature for docs +features = ["experimental"] targets = ["x86_64-unknown-linux-gnu"] [dependencies] @@ -57,6 +59,7 @@ pallet-examples = { path = "./examples" } [features] default = ["runtime", "std"] +experimental = ["frame-support/experimental"] runtime = [ "sp-api", "sp-block-builder", diff --git a/substrate/frame/aura/Cargo.toml b/substrate/frame/aura/Cargo.toml index 24a279b0d939..de698487efa7 100644 --- a/substrate/frame/aura/Cargo.toml +++ b/substrate/frame/aura/Cargo.toml @@ -53,3 +53,4 @@ try-runtime = [ "pallet-timestamp/try-runtime", "sp-runtime/try-runtime", ] +experimental = [] diff --git a/substrate/frame/core-fellowship/Cargo.toml b/substrate/frame/core-fellowship/Cargo.toml index 59d9b9996f18..3e678d327446 100644 --- a/substrate/frame/core-fellowship/Cargo.toml +++ b/substrate/frame/core-fellowship/Cargo.toml @@ -34,6 +34,7 @@ default = ["std"] std = [ "codec/std", "frame-benchmarking?/std", + "frame-support/experimental", "frame-support/std", "frame-system/std", "log/std", diff --git a/substrate/frame/examples/frame-crate/Cargo.toml b/substrate/frame/examples/frame-crate/Cargo.toml index eee4bc1c3a0c..93a46ba7b249 100644 --- a/substrate/frame/examples/frame-crate/Cargo.toml +++ b/substrate/frame/examples/frame-crate/Cargo.toml @@ -19,7 +19,7 @@ targets = ["x86_64-unknown-linux-gnu"] codec = { package = "parity-scale-codec", version = "3.6.1", default-features = false } scale-info = { version = "2.5.0", default-features = false, features = ["derive"] } -frame = { path = "../..", default-features = false, features = ["runtime"] } +frame = { path = "../..", default-features = false, features = ["experimental", "runtime"] } [features] diff --git a/substrate/frame/examples/kitchensink/Cargo.toml b/substrate/frame/examples/kitchensink/Cargo.toml index 0aa14cc50247..37384107530e 100644 --- a/substrate/frame/examples/kitchensink/Cargo.toml +++ b/substrate/frame/examples/kitchensink/Cargo.toml @@ -20,7 +20,7 @@ codec = { package = "parity-scale-codec", version = "3.6.1", default-features = log = { workspace = true } scale-info = { version = "2.10.0", default-features = false, features = ["derive"] } -frame-support = { path = "../../support", default-features = false } +frame-support = { path = "../../support", default-features = false, features = ["experimental"] } frame-system = { path = "../../system", default-features = false } sp-io = { path = "../../../primitives/io", default-features = false } diff --git a/substrate/frame/examples/tasks/Cargo.toml b/substrate/frame/examples/tasks/Cargo.toml index 088014ca9d97..41521114366a 100644 --- a/substrate/frame/examples/tasks/Cargo.toml +++ b/substrate/frame/examples/tasks/Cargo.toml @@ -53,3 +53,4 @@ try-runtime = [ "frame-system/try-runtime", "sp-runtime/try-runtime", ] +experimental = ["frame-support/experimental", "frame-system/experimental"] diff --git a/substrate/frame/examples/tasks/src/tests.rs b/substrate/frame/examples/tasks/src/tests.rs index 787df445cb9d..fc3c69f4aef9 100644 --- a/substrate/frame/examples/tasks/src/tests.rs +++ b/substrate/frame/examples/tasks/src/tests.rs @@ -19,9 +19,12 @@ #![cfg(test)] use crate::{mock::*, Numbers}; -use frame_support::{assert_noop, assert_ok, traits::Task}; +use frame_support::traits::Task; use sp_runtime::BuildStorage; +#[cfg(feature = "experimental")] +use frame_support::{assert_noop, assert_ok}; + // This function basically just builds a genesis storage key/value store according to // our desired mockup. pub fn new_test_ext() -> sp_io::TestExternalities { @@ -89,6 +92,7 @@ fn task_index_works_at_runtime_level() { }); } +#[cfg(feature = "experimental")] #[test] fn task_execution_works() { new_test_ext().execute_with(|| { @@ -110,6 +114,7 @@ fn task_execution_works() { }); } +#[cfg(feature = "experimental")] #[test] fn task_execution_fails_for_invalid_task() { new_test_ext().execute_with(|| { diff --git a/substrate/frame/executive/Cargo.toml b/substrate/frame/executive/Cargo.toml index b24060f6d588..63285e4cb493 100644 --- a/substrate/frame/executive/Cargo.toml +++ b/substrate/frame/executive/Cargo.toml @@ -45,6 +45,7 @@ default = ["std"] with-tracing = ["sp-tracing/with-tracing"] std = [ "codec/std", + "frame-support/experimental", "frame-support/std", "frame-system/std", "frame-try-runtime/std", diff --git a/substrate/frame/parameters/Cargo.toml b/substrate/frame/parameters/Cargo.toml index 8240425ade95..07ebeea52d52 100644 --- a/substrate/frame/parameters/Cargo.toml +++ b/substrate/frame/parameters/Cargo.toml @@ -14,7 +14,7 @@ paste = { version = "1.0.14", default-features = false } serde = { features = ["derive"], optional = true, workspace = true, default-features = true } docify = "0.2.5" -frame-support = { path = "../support", default-features = false } +frame-support = { path = "../support", default-features = false, features = ["experimental"] } frame-system = { path = "../system", default-features = false } sp-core = { path = "../../primitives/core", default-features = false } sp-runtime = { path = "../../primitives/runtime", default-features = false } diff --git a/substrate/frame/safe-mode/Cargo.toml b/substrate/frame/safe-mode/Cargo.toml index faca5812df96..0c59740bef30 100644 --- a/substrate/frame/safe-mode/Cargo.toml +++ b/substrate/frame/safe-mode/Cargo.toml @@ -34,7 +34,7 @@ sp-io = { path = "../../primitives/io" } pallet-balances = { path = "../balances" } pallet-utility = { path = "../utility" } pallet-proxy = { path = "../proxy" } -frame-support = { path = "../support" } +frame-support = { path = "../support", features = ["experimental"] } [features] default = ["std"] diff --git a/substrate/frame/salary/Cargo.toml b/substrate/frame/salary/Cargo.toml index 5d3be0bb7146..ba57fd46eebb 100644 --- a/substrate/frame/salary/Cargo.toml +++ b/substrate/frame/salary/Cargo.toml @@ -34,6 +34,7 @@ default = ["std"] std = [ "codec/std", "frame-benchmarking?/std", + "frame-support/experimental", "frame-support/std", "frame-system/std", "log/std", diff --git a/substrate/frame/src/lib.rs b/substrate/frame/src/lib.rs index 03fe209c1d45..549e177491d3 100644 --- a/substrate/frame/src/lib.rs +++ b/substrate/frame/src/lib.rs @@ -34,6 +34,10 @@ //! //! See [`polkadot_sdk::frame`](../polkadot_sdk_docs/polkadot_sdk/frame_runtime/index.html). //! +//! ## Warning: Experimental +//! +//! This crate and all of its content is experimental, and should not yet be used in production. +//! //! ## Underlying dependencies //! //! This crate is an amalgamation of multiple other crates that are often used together to compose a @@ -43,6 +47,7 @@ //! sources are listed (and re-exported again) in [`deps`]. #![cfg_attr(not(feature = "std"), no_std)] +#![cfg(feature = "experimental")] /// Exports the main pallet macro. This can wrap a `mod pallet` and will transform it into /// being a pallet, eg `#[frame::pallet] mod pallet { .. }`. diff --git a/substrate/frame/support/Cargo.toml b/substrate/frame/support/Cargo.toml index 5a668bb29160..113af41751ed 100644 --- a/substrate/frame/support/Cargo.toml +++ b/substrate/frame/support/Cargo.toml @@ -109,6 +109,7 @@ try-runtime = [ "sp-debug-derive/force-debug", "sp-runtime/try-runtime", ] +experimental = [] # By default some types have documentation, `no-metadata-docs` allows to reduce the documentation # in the metadata. no-metadata-docs = [ diff --git a/substrate/frame/support/src/lib.rs b/substrate/frame/support/src/lib.rs index 17e230b89138..6ea7fa33e774 100644 --- a/substrate/frame/support/src/lib.rs +++ b/substrate/frame/support/src/lib.rs @@ -177,7 +177,8 @@ pub use frame_support_procedural::storage_alias; pub use frame_support_procedural::derive_impl; -/// Macros for defining dynamic params that can be used in pallet configs. +/// Experimental macros for defining dynamic params that can be used in pallet configs. +#[cfg(feature = "experimental")] pub mod dynamic_params { pub use frame_support_procedural::{ dynamic_aggregated_params_internal, dynamic_pallet_params, dynamic_params, @@ -834,6 +835,7 @@ macro_rules! assert_error_encoded_size { /// /// Returns the original result of the closure. #[macro_export] +#[cfg(feature = "experimental")] macro_rules! hypothetically { ( $e:expr ) => { $crate::storage::transactional::with_transaction(|| -> $crate::__private::TransactionOutcome> { @@ -847,6 +849,7 @@ macro_rules! hypothetically { /// /// Reverts any storage changes made by the closure. #[macro_export] +#[cfg(feature = "experimental")] macro_rules! hypothetically_ok { ($e:expr $(, $args:expr)* $(,)?) => { $crate::assert_ok!($crate::hypothetically!($e) $(, $args)*); diff --git a/substrate/frame/support/test/Cargo.toml b/substrate/frame/support/test/Cargo.toml index 024850b10861..ae2c56a531fd 100644 --- a/substrate/frame/support/test/Cargo.toml +++ b/substrate/frame/support/test/Cargo.toml @@ -61,6 +61,10 @@ std = [ "sp-version/std", "test-pallet/std", ] +experimental = [ + "frame-support/experimental", + "frame-system/experimental", +] try-runtime = [ "frame-executive/try-runtime", "frame-support/try-runtime", diff --git a/substrate/frame/support/test/stg_frame_crate/Cargo.toml b/substrate/frame/support/test/stg_frame_crate/Cargo.toml index 4869185f04c7..632ea4e794f6 100644 --- a/substrate/frame/support/test/stg_frame_crate/Cargo.toml +++ b/substrate/frame/support/test/stg_frame_crate/Cargo.toml @@ -16,7 +16,7 @@ targets = ["x86_64-unknown-linux-gnu"] [dependencies] codec = { package = "parity-scale-codec", version = "3.6.1", default-features = false, features = ["derive"] } -frame = { path = "../../..", default-features = false, features = ["runtime"] } +frame = { path = "../../..", default-features = false, features = ["experimental", "runtime"] } scale-info = { version = "2.10.0", default-features = false, features = ["derive"] } [features] diff --git a/substrate/frame/support/test/tests/pallet_outer_enums_explicit.rs b/substrate/frame/support/test/tests/pallet_outer_enums_explicit.rs index 3da392b65c65..33b96dea9486 100644 --- a/substrate/frame/support/test/tests/pallet_outer_enums_explicit.rs +++ b/substrate/frame/support/test/tests/pallet_outer_enums_explicit.rs @@ -91,7 +91,9 @@ fn module_error_outer_enum_expand_explicit() { frame_system::Error::NonZeroRefCount => (), frame_system::Error::CallFiltered => (), frame_system::Error::MultiBlockMigrationsOngoing => (), + #[cfg(feature = "experimental")] frame_system::Error::InvalidTask => (), + #[cfg(feature = "experimental")] frame_system::Error::FailedTask => (), frame_system::Error::NothingAuthorized => (), frame_system::Error::Unauthorized => (), diff --git a/substrate/frame/support/test/tests/pallet_outer_enums_implicit.rs b/substrate/frame/support/test/tests/pallet_outer_enums_implicit.rs index 18eca3fd6092..db006fe79359 100644 --- a/substrate/frame/support/test/tests/pallet_outer_enums_implicit.rs +++ b/substrate/frame/support/test/tests/pallet_outer_enums_implicit.rs @@ -91,7 +91,9 @@ fn module_error_outer_enum_expand_implicit() { frame_system::Error::NonZeroRefCount => (), frame_system::Error::CallFiltered => (), frame_system::Error::MultiBlockMigrationsOngoing => (), + #[cfg(feature = "experimental")] frame_system::Error::InvalidTask => (), + #[cfg(feature = "experimental")] frame_system::Error::FailedTask => (), frame_system::Error::NothingAuthorized => (), frame_system::Error::Unauthorized => (), diff --git a/substrate/frame/system/Cargo.toml b/substrate/frame/system/Cargo.toml index 87c6fff66baa..416969e9c477 100644 --- a/substrate/frame/system/Cargo.toml +++ b/substrate/frame/system/Cargo.toml @@ -56,6 +56,7 @@ runtime-benchmarks = [ "sp-runtime/runtime-benchmarks", ] try-runtime = ["frame-support/try-runtime", "sp-runtime/try-runtime"] +experimental = ["frame-support/experimental"] [[bench]] name = "bench" diff --git a/substrate/frame/system/src/lib.rs b/substrate/frame/system/src/lib.rs index 6f70b827ebaa..0318f77342e0 100644 --- a/substrate/frame/system/src/lib.rs +++ b/substrate/frame/system/src/lib.rs @@ -746,6 +746,7 @@ pub mod pallet { Ok(().into()) } + #[cfg(feature = "experimental")] #[pallet::call_index(8)] #[pallet::weight(task.weight())] pub fn do_task(origin: OriginFor, task: T::RuntimeTask) -> DispatchResultWithPostInfo { @@ -834,10 +835,13 @@ pub mod pallet { KilledAccount { account: T::AccountId }, /// On on-chain remark happened. Remarked { sender: T::AccountId, hash: T::Hash }, + #[cfg(feature = "experimental")] /// A [`Task`] has started executing TaskStarted { task: T::RuntimeTask }, + #[cfg(feature = "experimental")] /// A [`Task`] has finished executing. TaskCompleted { task: T::RuntimeTask }, + #[cfg(feature = "experimental")] /// A [`Task`] failed during execution. TaskFailed { task: T::RuntimeTask, err: DispatchError }, /// An upgrade was authorized. @@ -865,8 +869,10 @@ pub mod pallet { CallFiltered, /// A multi-block migration is ongoing and prevents the current code from being replaced. MultiBlockMigrationsOngoing, + #[cfg(feature = "experimental")] /// The specified [`Task`] is not valid. InvalidTask, + #[cfg(feature = "experimental")] /// The specified [`Task`] failed during execution. FailedTask, /// No upgrade authorized. diff --git a/templates/minimal/node/Cargo.toml b/templates/minimal/node/Cargo.toml index dde381d5569c..410cfc9f6c34 100644 --- a/templates/minimal/node/Cargo.toml +++ b/templates/minimal/node/Cargo.toml @@ -49,7 +49,10 @@ substrate-frame-rpc-system = { path = "../../../substrate/utils/frame/rpc/system # Once the native runtime is gone, there should be little to no dependency on FRAME here, and # certainly no dependency on the runtime. -frame = { path = "../../../substrate/frame", features = ["runtime"] } +frame = { path = "../../../substrate/frame", features = [ + "experimental", + "runtime", +] } runtime = { package = "minimal-template-runtime", path = "../runtime" } [build-dependencies] diff --git a/templates/minimal/pallets/template/Cargo.toml b/templates/minimal/pallets/template/Cargo.toml index cef3296519a7..9982e5ea53bc 100644 --- a/templates/minimal/pallets/template/Cargo.toml +++ b/templates/minimal/pallets/template/Cargo.toml @@ -22,7 +22,10 @@ codec = { package = "parity-scale-codec", version = "3.0.0", features = [ scale-info = { version = "2.10.0", default-features = false, features = [ "derive", ] } -frame = { path = "../../../../substrate/frame", default-features = false, features = ["runtime"] } +frame = { path = "../../../../substrate/frame", default-features = false, features = [ + "experimental", + "runtime", +] } [features] diff --git a/templates/minimal/runtime/Cargo.toml b/templates/minimal/runtime/Cargo.toml index c1b81b5c9c3e..20ffb706eb49 100644 --- a/templates/minimal/runtime/Cargo.toml +++ b/templates/minimal/runtime/Cargo.toml @@ -17,7 +17,10 @@ parity-scale-codec = { version = "3.0.0", default-features = false } scale-info = { version = "2.6.0", default-features = false } # this is a frame-based runtime, thus importing `frame` with runtime feature enabled. -frame = { path = "../../../substrate/frame", default-features = false, features = ["runtime"] } +frame = { path = "../../../substrate/frame", default-features = false, features = [ + "experimental", + "runtime", +] } # pallets that we want to use pallet-balances = { path = "../../../substrate/frame/balances", default-features = false } From 63dcd6b070cda1c722ae76982218a0fe26c109f4 Mon Sep 17 00:00:00 2001 From: Dmitry Sinyavin Date: Sat, 16 Mar 2024 10:41:58 +0100 Subject: [PATCH 3/4] Add prdoc --- prdoc/pr_3654.prdoc | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 prdoc/pr_3654.prdoc diff --git a/prdoc/pr_3654.prdoc b/prdoc/pr_3654.prdoc new file mode 100644 index 000000000000..bd6150a3a5a7 --- /dev/null +++ b/prdoc/pr_3654.prdoc @@ -0,0 +1,14 @@ +# Schema: Polkadot SDK PRDoc Schema (prdoc) v1.0.0 +# See doc at https://raw.githubusercontent.com/paritytech/polkadot-sdk/master/prdoc/schema_user.json + +title: Remove `experimental` feature from `pallet-aura` + +doc: + - audience: Node Dev + description: | + The `experimental` feature in `pallet-aura`, previously used to gate different experimental + changes, became redundant with the introduction of the async backing which relies on the + mentioned changes, therefore, it is removed. + +crates: + - name: pallet-aura From a00709b7ab96277816813dc352de0156c5d43528 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bastian=20K=C3=B6cher?= Date: Sun, 17 Mar 2024 20:28:10 +0100 Subject: [PATCH 4/4] Update prdoc/pr_3654.prdoc --- prdoc/pr_3654.prdoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/prdoc/pr_3654.prdoc b/prdoc/pr_3654.prdoc index bd6150a3a5a7..de4a68d23569 100644 --- a/prdoc/pr_3654.prdoc +++ b/prdoc/pr_3654.prdoc @@ -4,7 +4,7 @@ title: Remove `experimental` feature from `pallet-aura` doc: - - audience: Node Dev + - audience: Runtime Dev description: | The `experimental` feature in `pallet-aura`, previously used to gate different experimental changes, became redundant with the introduction of the async backing which relies on the