From 19a111bade4c2d8c8ea3cf374a95013bd71d14ba Mon Sep 17 00:00:00 2001 From: tmpolaczyk <44604217+tmpolaczyk@users.noreply.github.com> Date: Mon, 18 Dec 2023 11:26:38 +0100 Subject: [PATCH] Add zepter toml linter to CI (#368) --- .cargo/zepter.yaml | 43 +++++++++++++ .github/workflows/release.yml | 18 ++++++ Cargo.lock | 2 + .../templates/frontier/node/Cargo.toml | 18 +++++- .../templates/frontier/runtime/Cargo.toml | 34 +++++++++++ .../templates/simple/node/Cargo.toml | 16 ++++- .../templates/simple/runtime/Cargo.toml | 33 ++++++++++ node/Cargo.toml | 13 +++- pallets/author-noting/Cargo.toml | 27 ++++++++- pallets/authority-assignment/Cargo.toml | 12 +++- pallets/authority-mapping/Cargo.toml | 10 +++- pallets/collator-assignment/Cargo.toml | 13 +++- .../rpc/runtime-api/Cargo.toml | 1 + pallets/configuration/Cargo.toml | 20 ++++++- pallets/data-preservers/Cargo.toml | 24 +++++++- pallets/inflation-rewards/Cargo.toml | 24 +++++++- pallets/initializer/Cargo.toml | 9 ++- pallets/invulnerables/Cargo.toml | 15 ++++- pallets/pooled-staking/Cargo.toml | 25 +++++++- pallets/registrar/Cargo.toml | 37 +++++++++++- pallets/registrar/rpc/runtime-api/Cargo.toml | 3 + pallets/services-payment/Cargo.toml | 23 ++++++- primitives/author-noting-inherent/Cargo.toml | 6 ++ primitives/consensus/Cargo.toml | 15 ++++- .../container-chain-genesis-data/Cargo.toml | 20 ++++++- primitives/maths/Cargo.toml | 4 +- primitives/traits/Cargo.toml | 5 +- runtime/dancebox/Cargo.toml | 60 +++++++++++++++++++ 28 files changed, 504 insertions(+), 26 deletions(-) create mode 100644 .cargo/zepter.yaml diff --git a/.cargo/zepter.yaml b/.cargo/zepter.yaml new file mode 100644 index 000000000..cc702c20c --- /dev/null +++ b/.cargo/zepter.yaml @@ -0,0 +1,43 @@ +# This file should be kept updated with the upstream config file: +# https://github.com/paritytech/polkadot-sdk/blob/master/.config/zepter.yaml + +version: + format: 1 + # Minimum version of the binary that is expected to work. This is just for printing a nice error + # message when someone tries to use an older version. + binary: 0.13.2 + +# The examples in this file assume crate `A` to have a dependency on crate `B`. +workflows: + check: + - [ + 'lint', + # Check that `A` activates the features of `B`. + 'propagate-feature', + # These are the features to check: + '--features=try-runtime,runtime-benchmarks,std', + # Do not try to add a new section into `[features]` of `A` only because `B` expose that feature. There are edge-cases where this is still needed, but we can add them manually. + '--left-side-feature-missing=ignore', + # Ignore the case that `A` it outside of the workspace. Otherwise it will report errors in external dependencies that we have no influence on. + '--left-side-outside-workspace=ignore', + # Some features imply that they activate a specific dependency as non-optional. Otherwise the default behaviour with a `?` is used. + '--feature-enables-dep=try-runtime:frame-try-runtime,runtime-benchmarks:frame-benchmarking', + # Auxillary flags: + '--offline', + '--locked', + '--show-path', + '--quiet', + ] + # Same as `check`, but with the `--fix` flag. + default: + - [ $check.0, '--fix' ] + +# Will be displayed when any workflow fails: +help: + text: | + Polkadot-SDK uses the Zepter CLI to detect abnormalities in the feature configuration. + It looks like one more more checks failed; please check the console output. You can try to automatically address them by running `zepter`. + Otherwise please ask directly in the Merge Request, GitHub Discussions or on Matrix Chat, thank you. + links: + - "https://github.com/paritytech/polkadot-sdk/issues/1831" + - "https://github.com/ggwpez/zepter" diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index beff51770..7107aa087 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -117,6 +117,24 @@ jobs: - name: Clippy run: SKIP_WASM_BUILD=1 env -u RUSTFLAGS cargo clippy --all-targets --locked --workspace --features runtime-benchmarks + cargo-toml-feature-propagation: + runs-on: ubuntu-latest + needs: ["set-tags"] + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + ref: ${{ needs.set-tags.outputs.git_ref }} + + - name: Setup Rust toolchain + run: rustup show + + - name: Install zepter + run: cargo install --locked -f zepter + + - name: Run zepter + run: zepter run check + typescript-formatting: runs-on: ubuntu-latest needs: ["set-tags"] diff --git a/Cargo.lock b/Cargo.lock index d03d8f8d7..9d6bb0235 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -6990,6 +6990,7 @@ version = "0.9.0" source = "git+https://github.com/moondance-labs/moonkit?branch=tanssi-polkadot-v1.3.0#de13eacce0681be329ec06c57c469ef98df22ad9" dependencies = [ "async-trait", + "frame-benchmarking", "frame-support", "frame-system", "parity-scale-codec", @@ -8380,6 +8381,7 @@ name = "pallet-migrations" version = "0.1.0" source = "git+https://github.com/moondance-labs/moonkit?branch=tanssi-polkadot-v1.3.0#de13eacce0681be329ec06c57c469ef98df22ad9" dependencies = [ + "frame-benchmarking", "frame-support", "frame-system", "impl-trait-for-tuples", diff --git a/container-chains/templates/frontier/node/Cargo.toml b/container-chains/templates/frontier/node/Cargo.toml index abd486be0..2c8a89898 100644 --- a/container-chains/templates/frontier/node/Cargo.toml +++ b/container-chains/templates/frontier/node/Cargo.toml @@ -109,8 +109,24 @@ substrate-build-script-utils = { workspace = true } [features] default = [] -runtime-benchmarks = [ "container-chain-template-frontier-runtime/runtime-benchmarks", "pallet-ethereum/runtime-benchmarks", "polkadot-cli/runtime-benchmarks" ] +runtime-benchmarks = [ + "container-chain-template-frontier-runtime/runtime-benchmarks", + "pallet-ethereum/runtime-benchmarks", + "polkadot-cli/runtime-benchmarks", + "frame-benchmarking/runtime-benchmarks", + "frame-benchmarking-cli/runtime-benchmarks", + "nimbus-primitives/runtime-benchmarks", + "polkadot-primitives/runtime-benchmarks", + "polkadot-service/runtime-benchmarks", + "sc-service/runtime-benchmarks", + "sp-runtime/runtime-benchmarks" +] try-runtime = [ "container-chain-template-frontier-runtime/try-runtime", "try-runtime-cli/try-runtime", + "nimbus-primitives/try-runtime", + "pallet-ethereum/try-runtime", + "polkadot-cli/try-runtime", + "polkadot-service/try-runtime", + "sp-runtime/try-runtime" ] diff --git a/container-chains/templates/frontier/runtime/Cargo.toml b/container-chains/templates/frontier/runtime/Cargo.toml index 9b748ade8..e0de57a4d 100644 --- a/container-chains/templates/frontier/runtime/Cargo.toml +++ b/container-chains/templates/frontier/runtime/Cargo.toml @@ -170,6 +170,16 @@ std = [ "staging-xcm/std", "tp-consensus/std", "xcm-primitives/std", + "cumulus-pallet-session-benchmarking/std", + "nimbus-primitives/std", + "num_enum/std", + "pallet-author-inherent/std", + "pallet-root-testing/std", + "pallet-transaction-payment/std", + "serde?/std", + "sp-debug-derive/std", + "sp-session/std", + "sp-trie/std" ] # Allow to print logs details (no wasm:stripped) @@ -186,6 +196,24 @@ runtime-benchmarks = [ "pallet-xcm/runtime-benchmarks", "sp-runtime/runtime-benchmarks", "staging-xcm-builder/runtime-benchmarks", + "cumulus-pallet-parachain-system/runtime-benchmarks", + "cumulus-pallet-xcmp-queue/runtime-benchmarks", + "cumulus-primitives-utility/runtime-benchmarks", + "nimbus-primitives/runtime-benchmarks", + "pallet-author-inherent/runtime-benchmarks", + "pallet-cc-authorities-noting/runtime-benchmarks", + "pallet-evm/runtime-benchmarks", + "pallet-evm-precompile-xcm-utils/runtime-benchmarks", + "pallet-hotfix-sufficients/runtime-benchmarks", + "pallet-migrations/runtime-benchmarks", + "pallet-proxy/runtime-benchmarks", + "pallet-sudo/runtime-benchmarks", + "pallet-tx-pause/runtime-benchmarks", + "pallet-utility/runtime-benchmarks", + "polkadot-parachain-primitives/runtime-benchmarks", + "polkadot-runtime-common/runtime-benchmarks", + "staging-xcm-executor/runtime-benchmarks", + "xcm-primitives/runtime-benchmarks" ] try-runtime = [ @@ -215,4 +243,10 @@ try-runtime = [ "parachain-info/try-runtime", "polkadot-runtime-common/try-runtime", "sp-runtime/try-runtime", + "cumulus-pallet-dmp-queue/try-runtime", + "cumulus-pallet-xcm/try-runtime", + "cumulus-pallet-xcmp-queue/try-runtime", + "pallet-author-inherent/try-runtime", + "pallet-root-testing/try-runtime", + "pallet-xcm/try-runtime" ] diff --git a/container-chains/templates/simple/node/Cargo.toml b/container-chains/templates/simple/node/Cargo.toml index 8c5502b6c..7d4e8e973 100644 --- a/container-chains/templates/simple/node/Cargo.toml +++ b/container-chains/templates/simple/node/Cargo.toml @@ -88,8 +88,22 @@ substrate-build-script-utils = { workspace = true } [features] default = [] -runtime-benchmarks = [ "container-chain-template-simple-runtime/runtime-benchmarks", "polkadot-cli/runtime-benchmarks" ] +runtime-benchmarks = [ + "container-chain-template-simple-runtime/runtime-benchmarks", + "polkadot-cli/runtime-benchmarks", + "frame-benchmarking/runtime-benchmarks", + "frame-benchmarking-cli/runtime-benchmarks", + "nimbus-primitives/runtime-benchmarks", + "polkadot-primitives/runtime-benchmarks", + "polkadot-service/runtime-benchmarks", + "sc-service/runtime-benchmarks", + "sp-runtime/runtime-benchmarks" +] try-runtime = [ "container-chain-template-simple-runtime/try-runtime", "try-runtime-cli/try-runtime", + "nimbus-primitives/try-runtime", + "polkadot-cli/try-runtime", + "polkadot-service/try-runtime", + "sp-runtime/try-runtime" ] diff --git a/container-chains/templates/simple/runtime/Cargo.toml b/container-chains/templates/simple/runtime/Cargo.toml index 37b816d3c..02d74a369 100644 --- a/container-chains/templates/simple/runtime/Cargo.toml +++ b/container-chains/templates/simple/runtime/Cargo.toml @@ -135,6 +135,15 @@ std = [ "staging-xcm/std", "tp-consensus/std", "xcm-primitives/std", + "cumulus-pallet-session-benchmarking/std", + "frame-benchmarking?/std", + "frame-system-benchmarking?/std", + "pallet-root-testing/std", + "pallet-transaction-payment/std", + "serde?/std", + "sp-debug-derive/std", + "sp-session/std", + "sp-trie/std" ] # Allow to print logs details (no wasm:stripped) @@ -153,6 +162,21 @@ runtime-benchmarks = [ "pallet-xcm/runtime-benchmarks", "sp-runtime/runtime-benchmarks", "staging-xcm-builder/runtime-benchmarks", + "cumulus-pallet-parachain-system/runtime-benchmarks", + "cumulus-pallet-xcmp-queue/runtime-benchmarks", + "cumulus-primitives-utility/runtime-benchmarks", + "frame-benchmarking/runtime-benchmarks", + "nimbus-primitives/runtime-benchmarks", + "pallet-author-inherent/runtime-benchmarks", + "pallet-migrations/runtime-benchmarks", + "pallet-proxy/runtime-benchmarks", + "pallet-sudo/runtime-benchmarks", + "pallet-tx-pause/runtime-benchmarks", + "pallet-utility/runtime-benchmarks", + "polkadot-parachain-primitives/runtime-benchmarks", + "polkadot-runtime-common/runtime-benchmarks", + "staging-xcm-executor/runtime-benchmarks", + "xcm-primitives/runtime-benchmarks" ] try-runtime = [ @@ -174,4 +198,13 @@ try-runtime = [ "parachain-info/try-runtime", "polkadot-runtime-common/try-runtime", "sp-runtime/try-runtime", + "cumulus-pallet-dmp-queue/try-runtime", + "cumulus-pallet-xcm/try-runtime", + "cumulus-pallet-xcmp-queue/try-runtime", + "frame-try-runtime/try-runtime", + "pallet-author-inherent/try-runtime", + "pallet-migrations/try-runtime", + "pallet-root-testing/try-runtime", + "pallet-transaction-payment/try-runtime", + "pallet-xcm/try-runtime" ] diff --git a/node/Cargo.toml b/node/Cargo.toml index e021abf10..e98c83653 100644 --- a/node/Cargo.toml +++ b/node/Cargo.toml @@ -103,7 +103,18 @@ substrate-build-script-utils = { workspace = true } [features] default = [] -runtime-benchmarks = [ "dancebox-runtime/runtime-benchmarks", "polkadot-cli/runtime-benchmarks", "polkadot-service/runtime-benchmarks" ] +runtime-benchmarks = [ + "dancebox-runtime/runtime-benchmarks", + "polkadot-cli/runtime-benchmarks", + "polkadot-service/runtime-benchmarks", + "frame-benchmarking/runtime-benchmarks", + "frame-benchmarking-cli/runtime-benchmarks", + "nimbus-primitives/runtime-benchmarks", + "pallet-configuration/runtime-benchmarks", + "polkadot-primitives/runtime-benchmarks", + "sc-service/runtime-benchmarks", + "sp-runtime/runtime-benchmarks" +] try-runtime = [ "dancebox-runtime/try-runtime", "nimbus-primitives/try-runtime", "pallet-configuration/try-runtime", "polkadot-cli/try-runtime", "polkadot-service/try-runtime", "sp-runtime/try-runtime", "try-runtime-cli/try-runtime" ] fast-runtime = [ "dancebox-runtime/fast-runtime" ] diff --git a/pallets/author-noting/Cargo.toml b/pallets/author-noting/Cargo.toml index 26179842d..92e19de41 100644 --- a/pallets/author-noting/Cargo.toml +++ b/pallets/author-noting/Cargo.toml @@ -63,11 +63,36 @@ std = [ "sp-trie/std", "tp-author-noting-inherent/std", "tp-traits/std", + "bounded-collections/std", + "hex?/std", + "log/std", + "polkadot-parachain-primitives/std", + "polkadot-primitives/std", + "serde?/std", + "sp-core/std", + "sp-externalities/std", + "sp-inherents/std", + "sp-io/std", + "sp-runtime/std", + "sp-std/std", + "sp-version/std", + "test-relay-sproof-builder/std" ] runtime-benchmarks = [ "cumulus-pallet-parachain-system/runtime-benchmarks", "frame-benchmarking", "hex", "tp-traits/runtime-benchmarks", + "frame-benchmarking/runtime-benchmarks", + "frame-support/runtime-benchmarks", + "frame-system/runtime-benchmarks", + "polkadot-parachain-primitives/runtime-benchmarks", + "polkadot-primitives/runtime-benchmarks", + "sp-runtime/runtime-benchmarks" +] +try-runtime = [ + "frame-support/try-runtime", + "cumulus-pallet-parachain-system/try-runtime", + "frame-system/try-runtime", + "sp-runtime/try-runtime" ] -try-runtime = [ "frame-support/try-runtime" ] diff --git a/pallets/authority-assignment/Cargo.toml b/pallets/authority-assignment/Cargo.toml index 128361a16..cf89f5643 100644 --- a/pallets/authority-assignment/Cargo.toml +++ b/pallets/authority-assignment/Cargo.toml @@ -34,5 +34,15 @@ std = [ "scale-info/std", "serde", "tp-traits/std", + "log/std", + "serde?/std", + "sp-core/std", + "sp-io/std", + "sp-runtime/std", + "sp-std/std" +] +try-runtime = [ + "frame-support/try-runtime", + "frame-system/try-runtime", + "sp-runtime/try-runtime" ] -try-runtime = [ "frame-support/try-runtime" ] diff --git a/pallets/authority-mapping/Cargo.toml b/pallets/authority-mapping/Cargo.toml index 52c6d752b..0fd727998 100644 --- a/pallets/authority-mapping/Cargo.toml +++ b/pallets/authority-mapping/Cargo.toml @@ -27,5 +27,13 @@ std = [ "frame-system/std", "parity-scale-codec/std", "scale-info/std", + "sp-core/std", + "sp-io/std", + "sp-runtime/std", + "sp-std/std" +] +try-runtime = [ + "frame-support/try-runtime", + "frame-system/try-runtime", + "sp-runtime/try-runtime" ] -try-runtime = [ "frame-support/try-runtime" ] diff --git a/pallets/collator-assignment/Cargo.toml b/pallets/collator-assignment/Cargo.toml index 1f04aea99..4e74e0ce1 100644 --- a/pallets/collator-assignment/Cargo.toml +++ b/pallets/collator-assignment/Cargo.toml @@ -40,11 +40,22 @@ std = [ "sp-runtime/std", "sp-std/std", "tp-traits/std", + "log/std", + "rand/std", + "rand_chacha/std", + "serde?/std", + "sp-core/std", + "sp-io/std" ] runtime-benchmarks = [ "frame-benchmarking/runtime-benchmarks", "frame-support/runtime-benchmarks", "frame-system/runtime-benchmarks", "tp-traits/runtime-benchmarks", + "sp-runtime/runtime-benchmarks" +] +try-runtime = [ + "frame-support/try-runtime", + "frame-system/try-runtime", + "sp-runtime/try-runtime" ] -try-runtime = [ "frame-support/try-runtime" ] diff --git a/pallets/collator-assignment/rpc/runtime-api/Cargo.toml b/pallets/collator-assignment/rpc/runtime-api/Cargo.toml index 2404cd7f4..74f18e5d6 100644 --- a/pallets/collator-assignment/rpc/runtime-api/Cargo.toml +++ b/pallets/collator-assignment/rpc/runtime-api/Cargo.toml @@ -18,4 +18,5 @@ default = [ "std" ] std = [ "parity-scale-codec/std", "sp-api/std", + "scale-info/std" ] diff --git a/pallets/configuration/Cargo.toml b/pallets/configuration/Cargo.toml index a1d490281..137a2d252 100644 --- a/pallets/configuration/Cargo.toml +++ b/pallets/configuration/Cargo.toml @@ -34,6 +34,22 @@ std = [ "scale-info/std", "serde/std", "tp-traits/std", + "log/std", + "sp-core/std", + "sp-io/std", + "sp-runtime/std", + "sp-std/std" +] +runtime-benchmarks = [ + "frame-benchmarking", + "frame-benchmarking/runtime-benchmarks", + "frame-support/runtime-benchmarks", + "frame-system/runtime-benchmarks", + "sp-runtime/runtime-benchmarks", + "tp-traits/runtime-benchmarks" +] +try-runtime = [ + "frame-support/try-runtime", + "frame-system/try-runtime", + "sp-runtime/try-runtime" ] -runtime-benchmarks = [ "frame-benchmarking" ] -try-runtime = [ "frame-support/try-runtime" ] diff --git a/pallets/data-preservers/Cargo.toml b/pallets/data-preservers/Cargo.toml index 85b5c4dc7..19527ce71 100644 --- a/pallets/data-preservers/Cargo.toml +++ b/pallets/data-preservers/Cargo.toml @@ -51,6 +51,26 @@ std = [ "sp-runtime/std", "sp-std/std", "tp-traits/std", + "bounded-collections/std", + "pallet-balances/std", + "serde?/std", + "sp-core/std", + "sp-io/std" +] +runtime-benchmarks = [ + "frame-benchmarking", + "frame-support/runtime-benchmarks", + "frame-system/runtime-benchmarks", + "frame-benchmarking/runtime-benchmarks", + "nimbus-primitives/runtime-benchmarks", + "pallet-balances/runtime-benchmarks", + "sp-runtime/runtime-benchmarks", + "tp-traits/runtime-benchmarks" +] +try-runtime = [ + "frame-support/try-runtime", + "frame-system/try-runtime", + "nimbus-primitives/try-runtime", + "pallet-balances/try-runtime", + "sp-runtime/try-runtime" ] -runtime-benchmarks = [ "frame-benchmarking", "frame-support/runtime-benchmarks", "frame-system/runtime-benchmarks" ] -try-runtime = [ "frame-support/try-runtime" ] diff --git a/pallets/inflation-rewards/Cargo.toml b/pallets/inflation-rewards/Cargo.toml index 218297011..56f664e05 100644 --- a/pallets/inflation-rewards/Cargo.toml +++ b/pallets/inflation-rewards/Cargo.toml @@ -51,6 +51,26 @@ std = [ "sp-runtime/std", "sp-std/std", "tp-traits/std", + "bounded-collections/std", + "pallet-balances/std", + "serde?/std", + "sp-core/std", + "sp-io/std" +] +runtime-benchmarks = [ + "frame-benchmarking", + "frame-benchmarking/runtime-benchmarks", + "frame-support/runtime-benchmarks", + "frame-system/runtime-benchmarks", + "nimbus-primitives/runtime-benchmarks", + "pallet-balances/runtime-benchmarks", + "sp-runtime/runtime-benchmarks", + "tp-traits/runtime-benchmarks" +] +try-runtime = [ + "frame-support/try-runtime", + "frame-system/try-runtime", + "nimbus-primitives/try-runtime", + "pallet-balances/try-runtime", + "sp-runtime/try-runtime" ] -runtime-benchmarks = [ "frame-benchmarking" ] -try-runtime = [ "frame-support/try-runtime" ] diff --git a/pallets/initializer/Cargo.toml b/pallets/initializer/Cargo.toml index e1f14fa81..bc0988fa4 100644 --- a/pallets/initializer/Cargo.toml +++ b/pallets/initializer/Cargo.toml @@ -31,5 +31,12 @@ std = [ "scale-info/std", "sp-runtime/std", "sp-std/std", + "sp-core/std", + "sp-io/std" +] +try-runtime = [ + "frame-support/try-runtime", + "frame-system/try-runtime", + "pallet-session/try-runtime", + "sp-runtime/try-runtime" ] -try-runtime = [ "frame-support/try-runtime" ] diff --git a/pallets/invulnerables/Cargo.toml b/pallets/invulnerables/Cargo.toml index ebf37d024..786439449 100644 --- a/pallets/invulnerables/Cargo.toml +++ b/pallets/invulnerables/Cargo.toml @@ -45,6 +45,10 @@ std = [ "sp-runtime/std", "sp-std/std", "tp-traits/std", + "rand?/std", + "sp-core/std", + "sp-io/std", + "sp-staking/std" ] runtime-benchmarks = [ "frame-benchmarking/runtime-benchmarks", @@ -52,6 +56,15 @@ runtime-benchmarks = [ "frame-system/runtime-benchmarks", "pallet-balances/runtime-benchmarks", "rand", + "sp-runtime/runtime-benchmarks", + "sp-staking/runtime-benchmarks", + "tp-traits/runtime-benchmarks" ] -try-runtime = [ "frame-support/try-runtime" ] +try-runtime = [ + "frame-support/try-runtime", + "frame-system/try-runtime", + "pallet-balances?/try-runtime", + "pallet-session/try-runtime", + "sp-runtime/try-runtime" +] diff --git a/pallets/pooled-staking/Cargo.toml b/pallets/pooled-staking/Cargo.toml index 2088972ff..d6f021ec0 100644 --- a/pallets/pooled-staking/Cargo.toml +++ b/pallets/pooled-staking/Cargo.toml @@ -50,6 +50,27 @@ std = [ "sp-std/std", "tp-maths/std", "tp-traits/std", + "log/std", + "pallet-balances/std", + "serde?/std", + "sp-core/std", + "sp-io/std" +] +runtime-benchmarks = [ + "frame-benchmarking", + "frame-benchmarking/runtime-benchmarks", + "frame-support/runtime-benchmarks", + "frame-system/runtime-benchmarks", + "nimbus-primitives/runtime-benchmarks", + "pallet-balances/runtime-benchmarks", + "sp-runtime/runtime-benchmarks", + "tp-maths/runtime-benchmarks", + "tp-traits/runtime-benchmarks" +] +try-runtime = [ + "frame-support/try-runtime", + "frame-system/try-runtime", + "nimbus-primitives/try-runtime", + "pallet-balances/try-runtime", + "sp-runtime/try-runtime" ] -runtime-benchmarks = [ "frame-benchmarking" ] -try-runtime = [ "frame-support/try-runtime" ] diff --git a/pallets/registrar/Cargo.toml b/pallets/registrar/Cargo.toml index c922f4850..0e482073d 100644 --- a/pallets/registrar/Cargo.toml +++ b/pallets/registrar/Cargo.toml @@ -31,6 +31,37 @@ sp-runtime = { workspace = true } [features] default = [ "std" ] -std = [ "frame-benchmarking/std", "frame-support/std", "frame-system/std", "pallet-balances/std", "pallet-configuration/std", "parity-scale-codec/std", "scale-info/std", "serde/std", "tp-container-chain-genesis-data/std", "tp-traits/std" ] -runtime-benchmarks = [ "frame-benchmarking", "tp-traits/runtime-benchmarks" ] -try-runtime = [ "frame-support/try-runtime" ] +std = [ + "frame-benchmarking/std", + "frame-support/std", + "frame-system/std", + "pallet-balances/std", + "pallet-configuration/std", + "parity-scale-codec/std", + "scale-info/std", + "serde/std", + "tp-container-chain-genesis-data/std", + "tp-traits/std", + "log/std", + "sp-core/std", + "sp-io/std", + "sp-runtime/std", + "sp-std/std" +] +runtime-benchmarks = [ + "frame-benchmarking", + "tp-traits/runtime-benchmarks", + "frame-benchmarking/runtime-benchmarks", + "frame-support/runtime-benchmarks", + "frame-system/runtime-benchmarks", + "pallet-balances/runtime-benchmarks", + "pallet-configuration/runtime-benchmarks", + "sp-runtime/runtime-benchmarks" +] +try-runtime = [ + "frame-support/try-runtime", + "frame-system/try-runtime", + "pallet-balances/try-runtime", + "pallet-configuration/try-runtime", + "sp-runtime/try-runtime" +] diff --git a/pallets/registrar/rpc/runtime-api/Cargo.toml b/pallets/registrar/rpc/runtime-api/Cargo.toml index 7815e7c57..e5d6329c3 100644 --- a/pallets/registrar/rpc/runtime-api/Cargo.toml +++ b/pallets/registrar/rpc/runtime-api/Cargo.toml @@ -22,4 +22,7 @@ std = [ "parity-scale-codec/std", "sp-api/std", "tp-container-chain-genesis-data/std", + "frame-support/std", + "pallet-registrar/std", + "scale-info/std" ] diff --git a/pallets/services-payment/Cargo.toml b/pallets/services-payment/Cargo.toml index 8bca212ea..b4ad13420 100644 --- a/pallets/services-payment/Cargo.toml +++ b/pallets/services-payment/Cargo.toml @@ -37,6 +37,25 @@ std = [ "scale-info/std", "sp-runtime/std", "sp-std/std", + "log/std", + "parity-scale-codec/std", + "serde?/std", + "sp-core/std", + "sp-io/std", + "tp-traits/std" +] +runtime-benchmarks = [ + "frame-benchmarking", + "tp-traits/runtime-benchmarks", + "frame-benchmarking/runtime-benchmarks", + "frame-support/runtime-benchmarks", + "frame-system/runtime-benchmarks", + "pallet-balances/runtime-benchmarks", + "sp-runtime/runtime-benchmarks" +] +try-runtime = [ + "frame-support/try-runtime", + "frame-system/try-runtime", + "pallet-balances/try-runtime", + "sp-runtime/try-runtime" ] -runtime-benchmarks = [ "frame-benchmarking", "tp-traits/runtime-benchmarks" ] -try-runtime = [ "frame-support/try-runtime" ] diff --git a/primitives/author-noting-inherent/Cargo.toml b/primitives/author-noting-inherent/Cargo.toml index aa5e67dba..be82e6603 100644 --- a/primitives/author-noting-inherent/Cargo.toml +++ b/primitives/author-noting-inherent/Cargo.toml @@ -66,4 +66,10 @@ std = [ "sp-storage", "sp-trie/std", "test-relay-sproof-builder/std", + "cumulus-primitives-parachain-inherent/std", + "frame-support?/std", + "log/std", + "polkadot-primitives?/std", + "sp-api?/std", + "sp-storage?/std" ] diff --git a/primitives/consensus/Cargo.toml b/primitives/consensus/Cargo.toml index f2c6821ae..08c7969a3 100644 --- a/primitives/consensus/Cargo.toml +++ b/primitives/consensus/Cargo.toml @@ -29,4 +29,17 @@ sp-io = { workspace = true } [features] default = [ "std" ] -std = [ "cumulus-primitives-core/std", "frame-support/std", "frame-system/std", "nimbus-primitives/std", "parity-scale-codec/std", "sp-api/std", "sp-consensus-aura/std", "sp-runtime/std", "sp-std/std" ] +std = [ + "cumulus-primitives-core/std", + "frame-support/std", + "frame-system/std", + "nimbus-primitives/std", + "parity-scale-codec/std", + "sp-api/std", + "sp-consensus-aura/std", + "sp-runtime/std", + "sp-std/std", + "scale-info/std", + "sp-core/std", + "sp-io/std" +] diff --git a/primitives/container-chain-genesis-data/Cargo.toml b/primitives/container-chain-genesis-data/Cargo.toml index 23a87b3d2..2ce02918d 100644 --- a/primitives/container-chain-genesis-data/Cargo.toml +++ b/primitives/container-chain-genesis-data/Cargo.toml @@ -35,5 +35,23 @@ polkadot-primitives = { workspace = true, optional = true } [features] default = [ "std" ] -std = [ "cumulus-primitives-core/std", "frame-support/std", "parity-scale-codec/std", "polkadot-primitives", "serde/std", "serde/std", "sp-core/std", "sp-runtime/std", "sp-state-machine/std", "sp-std/std", "sp-trie/std", "tp-traits/std" ] +std = [ + "cumulus-primitives-core/std", + "frame-support/std", + "parity-scale-codec/std", + "polkadot-primitives", + "serde/std", + "serde/std", + "sp-core/std", + "sp-runtime/std", + "sp-state-machine/std", + "sp-std/std", + "sp-trie/std", + "tp-traits/std", + "hex?/std", + "log/std", + "polkadot-primitives?/std", + "scale-info/std", + "serde_json?/std" +] json = [ "hex", "serde_json" ] diff --git a/primitives/maths/Cargo.toml b/primitives/maths/Cargo.toml index 2280cf032..ca56f6164 100644 --- a/primitives/maths/Cargo.toml +++ b/primitives/maths/Cargo.toml @@ -17,4 +17,6 @@ std = [ "sp-core/std", "sp-runtime/std", ] -runtime-benchmarks = [] +runtime-benchmarks = [ + "sp-runtime/runtime-benchmarks" +] diff --git a/primitives/traits/Cargo.toml b/primitives/traits/Cargo.toml index 39fbe53ec..b977e0d50 100644 --- a/primitives/traits/Cargo.toml +++ b/primitives/traits/Cargo.toml @@ -19,5 +19,8 @@ default = [ "std" ] std = [ "cumulus-primitives-core/std", "frame-support/std", + "sp-std/std" +] +runtime-benchmarks = [ + "frame-support/runtime-benchmarks" ] -runtime-benchmarks = [] diff --git a/runtime/dancebox/Cargo.toml b/runtime/dancebox/Cargo.toml index 18baf2609..7f6ae49c7 100644 --- a/runtime/dancebox/Cargo.toml +++ b/runtime/dancebox/Cargo.toml @@ -190,6 +190,35 @@ std = [ "tp-consensus/std", "tp-traits/std", "xcm-primitives/std", + "container-chain-template-frontier-runtime/std", + "container-chain-template-simple-runtime/std", + "cumulus-pallet-session-benchmarking/std", + "cumulus-primitives-parachain-inherent/std", + "cumulus-test-relay-sproof-builder/std", + "dp-core/std", + "frame-benchmarking?/std", + "frame-system-benchmarking?/std", + "pallet-author-inherent/std", + "pallet-authority-mapping/std", + "pallet-collator-assignment/std", + "pallet-im-online/std", + "pallet-message-queue/std", + "pallet-pooled-staking/std", + "pallet-root-testing/std", + "pallet-staking/std", + "pallet-transaction-payment/std", + "pallet-xcm-benchmarks?/std", + "polkadot-runtime-parachains/std", + "serde?/std", + "sp-consensus-babe/std", + "sp-consensus-beefy/std", + "sp-debug-derive/std", + "sp-io/std", + "sp-session/std", + "sp-trie/std", + "test-relay-sproof-builder/std", + "westend-runtime/std", + "westend-runtime-constants/std" ] # Allow to print logs details (no wasm:stripped) @@ -218,6 +247,28 @@ runtime-benchmarks = [ "sp-runtime/runtime-benchmarks", "staging-xcm-builder/runtime-benchmarks", "westend-runtime/runtime-benchmarks", + "container-chain-template-frontier-runtime/runtime-benchmarks", + "container-chain-template-simple-runtime/runtime-benchmarks", + "cumulus-pallet-parachain-system/runtime-benchmarks", + "cumulus-pallet-xcmp-queue/runtime-benchmarks", + "cumulus-primitives-utility/runtime-benchmarks", + "frame-benchmarking/runtime-benchmarks", + "nimbus-primitives/runtime-benchmarks", + "pallet-author-inherent/runtime-benchmarks", + "pallet-im-online/runtime-benchmarks", + "pallet-inflation-rewards/runtime-benchmarks", + "pallet-message-queue/runtime-benchmarks", + "pallet-migrations/runtime-benchmarks", + "pallet-proxy/runtime-benchmarks", + "pallet-staking/runtime-benchmarks", + "pallet-sudo/runtime-benchmarks", + "pallet-tx-pause/runtime-benchmarks", + "pallet-utility/runtime-benchmarks", + "polkadot-parachain-primitives/runtime-benchmarks", + "polkadot-runtime-parachains/runtime-benchmarks", + "staging-xcm-executor/runtime-benchmarks", + "tp-traits/runtime-benchmarks", + "xcm-primitives/runtime-benchmarks" ] try-runtime = [ @@ -257,6 +308,15 @@ try-runtime = [ "parachain-info/try-runtime", "polkadot-runtime-common/try-runtime", "sp-runtime/try-runtime", + "container-chain-template-frontier-runtime/try-runtime", + "container-chain-template-simple-runtime/try-runtime", + "pallet-im-online/try-runtime", + "pallet-message-queue/try-runtime", + "pallet-staking/try-runtime", + "pallet-transaction-payment/try-runtime", + "polkadot-runtime-parachains/try-runtime", + "polkadot-service/try-runtime", + "westend-runtime/try-runtime" ] fast-runtime = []