diff --git a/.github/actions/shared/action.yml b/.github/actions/shared/action.yml index f09694c88..8087e1cf4 100644 --- a/.github/actions/shared/action.yml +++ b/.github/actions/shared/action.yml @@ -25,12 +25,24 @@ runs: df -h shell: bash - - name: Install package + # Free GitHub Actions Environment Disk Space + - name: Maximize Build Space + uses: jlumbroso/free-disk-space@main + with: + tool-cache: false + large-packages: false + + # Steps taken from https://github.com/actions/runner-images/issues/7192#issuecomment-1446766800 + - name: Disable Phase Updates + shell: bash run: | echo 'APT::Get::Always-Include-Phased-Updates "false";' | sudo tee /etc/apt/apt.conf.d/99-phased-updates - sudo apt-get update && sudo apt-get upgrade -y - sudo apt-get install -y protobuf-compiler libprotobuf-dev + + - name: Update, Upgrade, and Install Protobuf shell: bash + run: | + sudo apt-get update && sudo apt-get upgrade -y + sudo apt-get install -y protobuf-compiler libprotobuf-dev # Steps taken from https://github.com/actions/cache/blob/master/examples.md#rust---cargo - name: Cache cargo registry diff --git a/.github/workflows/clippy-checks.yml b/.github/workflows/clippy-checks.yml new file mode 100644 index 000000000..a2626806c --- /dev/null +++ b/.github/workflows/clippy-checks.yml @@ -0,0 +1,38 @@ +name: Clippy Checks + +on: + pull_request: + push: + branches: + - main + +jobs: + clippy-checks: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Free up Space and Installation + uses: ./.github/actions/shared + + - name: Clippy -- Main + uses: actions-rs/cargo@v1 + with: + command: clippy + args: --release --all-features -- -W clippy::all -A clippy::style -A forgetting_copy_types -A forgetting_references + + - name: Clippy -- All Targets (except integration) + uses: actions-rs/cargo@v1 + with: + command: clippy + # We are a bit more forgiving when it comes to the code in tests and only check for correctness + args: --release --workspace --all-features --all-targets --exclude runtime-integration-tests -- -A clippy::all -W clippy::correctness -A forgetting_copy_types -A forgetting_references + + - name: Clippy -- Integration + uses: actions-rs/cargo@v1 + with: + command: clippy + # We are a bit more forgiving when it comes to the code in tests and only check for correctness + args: --release --package runtime-integration-tests --all-features --all-targets -- -A clippy::all -W clippy::correctness -A forgetting_copy_types -A forgetting_references + diff --git a/.github/workflows/test-code.yml b/.github/workflows/test-code.yml index e1263947f..b00ec0604 100644 --- a/.github/workflows/test-code.yml +++ b/.github/workflows/test-code.yml @@ -2,8 +2,6 @@ name: Test Code on: pull_request: - branches: - - main push: branches: - main @@ -16,23 +14,11 @@ jobs: RUSTFLAGS: "-Dwarnings" steps: - - uses: actions/checkout@v3 - - uses: ./.github/actions/shared - - - name: Remove rust-toolchain.toml - # To make sure that the nightly version will be used all throughout - run: | - rm /home/runner/work/pendulum/pendulum/rust-toolchain.toml + - name: Checkout + uses: actions/checkout@v4 - - name: Setup nightly Rust toolchain - uses: dtolnay/rust-toolchain@nightly - with: - toolchain: nightly-2024-05-30 - components: rustfmt, clippy - target: wasm32-unknown-unknown - - - name: Setup nightly Rust as default - run: rustup default nightly-2024-05-30 + - name: Free up Space and Installation + uses: ./.github/actions/shared - name: Install Protoc uses: arduino/setup-protoc@v1 @@ -42,30 +28,11 @@ jobs: - name: Test uses: actions-rs/cargo@v1 with: - toolchain: nightly-2024-05-30 command: test args: --release - - name: Clippy -- Main - uses: actions-rs/cargo@v1 - with: - toolchain: nightly-2024-05-30 - command: clippy - args: --release --all-features -- -W clippy::all -A clippy::style -A forgetting_copy_types -A forgetting_references - - - name: Clippy -- All Targets (except integration) - uses: actions-rs/cargo@v1 - with: - toolchain: nightly-2024-05-30 - command: clippy - # We are a bit more forgiving when it comes to the code in tests and only check for correctness - args: --workspace --release --all-features --all-targets --exclude runtime-integration-tests -- -A clippy::all -W clippy::correctness -A forgetting_copy_types -A forgetting_references - - - name: Clippy -- Integration + - name: Test for Runtime Benchmarks uses: actions-rs/cargo@v1 with: - toolchain: nightly-2024-05-30 - command: clippy - # We are a bit more forgiving when it comes to the code in tests and only check for correctness - args: --package runtime-integration-tests --release --all-features --all-targets -- -A clippy::all -W clippy::correctness -A forgetting_copy_types -A forgetting_references - \ No newline at end of file + command: test + args: --release --features=runtime-benchmarks,try-runtime \ No newline at end of file diff --git a/Cargo.lock b/Cargo.lock index 14a660e51..97956f136 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -429,6 +429,19 @@ dependencies = [ "hashbrown 0.13.2", ] +[[package]] +name = "ark-scale" +version = "0.0.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49b08346a3e38e2be792ef53ee168623c9244d968ff00cd70fb9932f6fe36393" +dependencies = [ + "ark-ec", + "ark-ff", + "ark-serialize", + "ark-std", + "parity-scale-codec", +] + [[package]] name = "ark-scale" version = "0.0.11" @@ -446,7 +459,7 @@ dependencies = [ [[package]] name = "ark-secret-scalar" version = "0.0.2" -source = "git+https://github.com/w3f//ring-vrf?rev=3ddc20#3ddc2051066c4b3f0eadd0ba5700df12500d9754" +source = "git+https://github.com/w3f/ring-vrf?rev=3119f51#3119f51b54b69308abfb0671f6176cb125ae1bf1" dependencies = [ "ark-ec", "ark-ff", @@ -494,7 +507,7 @@ dependencies = [ [[package]] name = "ark-transcript" version = "0.0.2" -source = "git+https://github.com/w3f//ring-vrf?rev=3ddc20#3ddc2051066c4b3f0eadd0ba5700df12500d9754" +source = "git+https://github.com/w3f/ring-vrf?rev=3119f51#3119f51b54b69308abfb0671f6176cb125ae1bf1" dependencies = [ "ark-ff", "ark-serialize", @@ -676,6 +689,7 @@ dependencies = [ "frame-system-benchmarking", "frame-system-rpc-runtime-api", "frame-try-runtime", + "hex-literal 0.4.1", "log", "pallet-asset-tx-payment", "pallet-assets", @@ -745,6 +759,7 @@ dependencies = [ "frame-system-benchmarking", "frame-system-rpc-runtime-api", "frame-try-runtime", + "hex-literal 0.4.1", "log", "pallet-asset-conversion", "pallet-asset-conversion-tx-payment", @@ -1058,13 +1073,14 @@ dependencies = [ [[package]] name = "bandersnatch_vrfs" -version = "0.0.4" -source = "git+https://github.com/w3f//ring-vrf?rev=3ddc20#3ddc2051066c4b3f0eadd0ba5700df12500d9754" +version = "0.0.1" +source = "git+https://github.com/w3f/ring-vrf?rev=3119f51#3119f51b54b69308abfb0671f6176cb125ae1bf1" dependencies = [ "ark-bls12-381", "ark-ec", "ark-ed-on-bls12-381-bandersnatch", "ark-ff", + "ark-scale 0.0.11", "ark-serialize", "ark-std", "dleq_vrf", @@ -2284,7 +2300,7 @@ dependencies = [ [[package]] name = "common" version = "0.1.0" -source = "git+https://github.com/burdges/ring-proof?branch=patch-1#05a756076cb20f981a52afea3a620168de49f95f" +source = "git+https://github.com/w3f/ring-proof?rev=0e948f3#0e948f3c28cbacecdd3020403c4841c0eb339213" dependencies = [ "ark-ec", "ark-ff", @@ -2293,7 +2309,6 @@ dependencies = [ "ark-std", "fflonk", "merlin 3.0.0", - "rand_chacha 0.3.1", ] [[package]] @@ -3560,11 +3575,11 @@ dependencies = [ [[package]] name = "dleq_vrf" version = "0.0.2" -source = "git+https://github.com/w3f//ring-vrf?rev=3ddc20#3ddc2051066c4b3f0eadd0ba5700df12500d9754" +source = "git+https://github.com/w3f/ring-vrf?rev=3119f51#3119f51b54b69308abfb0671f6176cb125ae1bf1" dependencies = [ "ark-ec", "ark-ff", - "ark-scale", + "ark-scale 0.0.10", "ark-secret-scalar", "ark-serialize", "ark-std", @@ -6830,26 +6845,6 @@ dependencies = [ "syn 1.0.109", ] -[[package]] -name = "mocktopus" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e4f0d5a1621fea252541cf67533c4b9c32ee892d790768f4ad48f1063059537" -dependencies = [ - "mocktopus_macros", -] - -[[package]] -name = "mocktopus_macros" -version = "0.7.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3048ef3680533a27f9f8e7d6a0bce44dc61e4895ea0f42709337fa1c8616fefe" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - [[package]] name = "module-issue-rpc" version = "1.0.10" @@ -7474,7 +7469,7 @@ dependencies = [ [[package]] name = "orml-asset-registry" version = "0.4.1-dev" -source = "git+https://github.com/open-web3-stack/open-runtime-module-library?branch=polkadot-v1.1.0#981d707437a22d881b993f9e902d27b163ad8bca" +source = "git+https://github.com/open-web3-stack/open-runtime-module-library?branch=polkadot-v1.1.0#2778a86fb12a1a61ca8ea9348f68b3c974f786e0" dependencies = [ "frame-support", "frame-system", @@ -7495,7 +7490,7 @@ dependencies = [ [[package]] name = "orml-currencies" version = "0.4.1-dev" -source = "git+https://github.com/open-web3-stack/open-runtime-module-library?branch=polkadot-v1.1.0#981d707437a22d881b993f9e902d27b163ad8bca" +source = "git+https://github.com/open-web3-stack/open-runtime-module-library?branch=polkadot-v1.1.0#2778a86fb12a1a61ca8ea9348f68b3c974f786e0" dependencies = [ "frame-support", "frame-system", @@ -7516,7 +7511,6 @@ dependencies = [ "frame-benchmarking", "frame-support", "frame-system", - "mocktopus", "orml-currencies", "orml-tokens", "orml-traits", @@ -7534,7 +7528,7 @@ dependencies = [ [[package]] name = "orml-oracle" version = "0.4.1-dev" -source = "git+https://github.com/open-web3-stack/open-runtime-module-library?branch=polkadot-v1.1.0#981d707437a22d881b993f9e902d27b163ad8bca" +source = "git+https://github.com/open-web3-stack/open-runtime-module-library?branch=polkadot-v1.1.0#2778a86fb12a1a61ca8ea9348f68b3c974f786e0" dependencies = [ "frame-support", "frame-system", @@ -7591,7 +7585,6 @@ dependencies = [ "frame-benchmarking", "frame-support", "frame-system", - "mocktopus", "orml-currencies", "orml-tokens", "orml-traits", @@ -7645,7 +7638,7 @@ dependencies = [ [[package]] name = "orml-utilities" version = "0.4.1-dev" -source = "git+https://github.com/open-web3-stack/open-runtime-module-library?branch=polkadot-v1.1.0#981d707437a22d881b993f9e902d27b163ad8bca" +source = "git+https://github.com/open-web3-stack/open-runtime-module-library?branch=polkadot-v1.1.0#2778a86fb12a1a61ca8ea9348f68b3c974f786e0" dependencies = [ "frame-support", "parity-scale-codec", @@ -7675,7 +7668,7 @@ dependencies = [ [[package]] name = "orml-xcm" version = "0.4.1-dev" -source = "git+https://github.com/open-web3-stack/open-runtime-module-library?branch=polkadot-v1.1.0#981d707437a22d881b993f9e902d27b163ad8bca" +source = "git+https://github.com/open-web3-stack/open-runtime-module-library?branch=polkadot-v1.1.0#2778a86fb12a1a61ca8ea9348f68b3c974f786e0" dependencies = [ "frame-support", "frame-system", @@ -7689,7 +7682,7 @@ dependencies = [ [[package]] name = "orml-xcm-support" version = "0.4.1-dev" -source = "git+https://github.com/open-web3-stack/open-runtime-module-library?branch=polkadot-v1.1.0#981d707437a22d881b993f9e902d27b163ad8bca" +source = "git+https://github.com/open-web3-stack/open-runtime-module-library?branch=polkadot-v1.1.0#2778a86fb12a1a61ca8ea9348f68b3c974f786e0" dependencies = [ "frame-support", "orml-traits", @@ -7703,7 +7696,7 @@ dependencies = [ [[package]] name = "orml-xtokens" version = "0.4.1-dev" -source = "git+https://github.com/open-web3-stack/open-runtime-module-library?branch=polkadot-v1.1.0#981d707437a22d881b993f9e902d27b163ad8bca" +source = "git+https://github.com/open-web3-stack/open-runtime-module-library?branch=polkadot-v1.1.0#2778a86fb12a1a61ca8ea9348f68b3c974f786e0" dependencies = [ "cumulus-primitives-core", "frame-support", @@ -7727,6 +7720,7 @@ name = "pallet-alliance" version = "4.0.0-dev" source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#e51a91fcac27d2f95ad631989622848aa8043f9e" dependencies = [ + "array-bytes", "frame-benchmarking", "frame-support", "frame-system", @@ -9562,6 +9556,7 @@ dependencies = [ "frame-system-benchmarking", "frame-system-rpc-runtime-api", "frame-try-runtime", + "hex-literal 0.4.1", "log", "pallet-asset-tx-payment", "pallet-assets", @@ -11746,14 +11741,13 @@ dependencies = [ [[package]] name = "ring" version = "0.1.0" -source = "git+https://github.com/burdges/ring-proof?branch=patch-1#05a756076cb20f981a52afea3a620168de49f95f" +source = "git+https://github.com/w3f/ring-proof?rev=0e948f3#0e948f3c28cbacecdd3020403c4841c0eb339213" dependencies = [ "ark-ec", "ark-ff", "ark-poly", "ark-serialize", "ark-std", - "blake2", "common", "fflonk", "merlin 3.0.0", @@ -15890,7 +15884,6 @@ dependencies = [ "frame-benchmarking", "frame-support", "frame-system", - "mocktopus", "orml-currencies", "orml-tokens", "orml-traits", @@ -16034,7 +16027,7 @@ checksum = "97fee6b57c6a41524a810daee9286c02d7752c4253064d0b05472833a438f675" dependencies = [ "cfg-if", "digest 0.10.7", - "rand 0.7.3", + "rand 0.8.5", "static_assertions", ] diff --git a/Cargo.toml b/Cargo.toml index 36ea682c1..12401da87 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -32,7 +32,4 @@ orml-tokens = { git = "https://github.com/open-web3-stack//open-runtime-module-l ### need this because of bifrost farming dependency in runtime ### bifrost uses : ### orml packages { version = "0.4.1-dev" } -### zenlink packages { version = "*" } - -[patch."https://github.com/w3f/ring-vrf"] -bandersnatch_vrfs = { git = "https://github.com/w3f//ring-vrf", version = "0.0.4", rev = "3ddc20" } \ No newline at end of file +### zenlink packages { version = "*" } \ No newline at end of file diff --git a/README.md b/README.md index 7fb059e37..01cd56a44 100644 --- a/README.md +++ b/README.md @@ -3,12 +3,8 @@ Pendulum chain by SatoshiPay. More information about Pendulum can be found [here](https://docs.pendulumchain.org/). ### How to Run Tests - -[`mocktopus`](https://docs.rs/mocktopus/latest/mocktopus/) is nightly-only lib, and is used in testing. -So to run the tests, override the toolchain with nightly; minimum version is `nightly-2024-05-30`. - ``` -cargo +nightly test +cargo test ``` ### How to Build diff --git a/pallets/orml-currencies-allowance-extension/Cargo.toml b/pallets/orml-currencies-allowance-extension/Cargo.toml index 391852a57..227de55a1 100644 --- a/pallets/orml-currencies-allowance-extension/Cargo.toml +++ b/pallets/orml-currencies-allowance-extension/Cargo.toml @@ -25,7 +25,6 @@ orml-traits = { git = "https://github.com/open-web3-stack/open-runtime-module-li pallet-balances = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false, optional = true } [dev-dependencies] -mocktopus = "0.8.0" frame-benchmarking = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } sp-io = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } diff --git a/pallets/orml-currencies-allowance-extension/src/lib.rs b/pallets/orml-currencies-allowance-extension/src/lib.rs index b4cdfda56..7f488a0e4 100644 --- a/pallets/orml-currencies-allowance-extension/src/lib.rs +++ b/pallets/orml-currencies-allowance-extension/src/lib.rs @@ -1,14 +1,9 @@ #![deny(warnings)] -#![cfg_attr(test, feature(proc_macro_hygiene))] #![cfg_attr(not(feature = "std"), no_std)] -#[cfg(test)] -extern crate mocktopus; use frame_support::{dispatch::DispatchResult, ensure}; -#[cfg(test)] -use mocktopus::macros::mockable; use orml_traits::MultiCurrency; use sp_runtime::traits::*; use sp_std::{convert::TryInto, prelude::*, vec}; @@ -245,7 +240,6 @@ pub mod pallet { forgetting_references, forgetting_copy_types )] -#[cfg_attr(test, mockable)] impl Pallet { // Check the amount approved to be spent by an owner to a delegate pub fn is_allowed_currency(asset: CurrencyOf) -> bool { diff --git a/pallets/orml-tokens-management-extension/Cargo.toml b/pallets/orml-tokens-management-extension/Cargo.toml index 2ed4fe093..2e9af0bdb 100644 --- a/pallets/orml-tokens-management-extension/Cargo.toml +++ b/pallets/orml-tokens-management-extension/Cargo.toml @@ -26,7 +26,6 @@ orml-tokens = { git = "https://github.com/open-web3-stack/open-runtime-module-li [dev-dependencies] -mocktopus = "0.8.0" frame-benchmarking = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } sp-io = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } pallet-balances = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } diff --git a/pallets/orml-tokens-management-extension/src/ext.rs b/pallets/orml-tokens-management-extension/src/ext.rs index 3cb1a5077..503caf995 100644 --- a/pallets/orml-tokens-management-extension/src/ext.rs +++ b/pallets/orml-tokens-management-extension/src/ext.rs @@ -1,7 +1,4 @@ -#[cfg(test)] -use mocktopus::macros::mockable; -#[cfg_attr(test, mockable)] pub(crate) mod orml_currencies_ext { use crate::types::{AccountIdOf, BalanceOf, CurrencyOf}; use frame_support::traits::BalanceStatus; diff --git a/pallets/orml-tokens-management-extension/src/lib.rs b/pallets/orml-tokens-management-extension/src/lib.rs index 81dd145e9..bcff84c1f 100644 --- a/pallets/orml-tokens-management-extension/src/lib.rs +++ b/pallets/orml-tokens-management-extension/src/lib.rs @@ -1,12 +1,7 @@ #![deny(warnings)] -#![cfg_attr(test, feature(proc_macro_hygiene))] #![cfg_attr(not(feature = "std"), no_std)] -#[cfg(test)] -extern crate mocktopus; -#[cfg(test)] -use mocktopus::macros::mockable; use sp_std::{convert::TryInto, prelude::*, vec}; #[cfg(feature = "runtime-benchmarks")] @@ -326,7 +321,6 @@ pub mod pallet { } } -#[cfg_attr(test, mockable)] impl Pallet {} pub trait CurrencyIdCheck { diff --git a/pallets/treasury-buyout-extension/Cargo.toml b/pallets/treasury-buyout-extension/Cargo.toml index f0733a778..827a52b78 100644 --- a/pallets/treasury-buyout-extension/Cargo.toml +++ b/pallets/treasury-buyout-extension/Cargo.toml @@ -28,7 +28,6 @@ orml-tokens = { git = "https://github.com/open-web3-stack/open-runtime-module-li spacewalk-primitives = { git = "https://github.com/pendulum-chain/spacewalk", default-features = false, rev = "580dd307ede65f90f17df6731645b678f3596e0f" } [dev-dependencies] -mocktopus = "0.8.0" frame-benchmarking = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0" } sp-io = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } xcm = { git = "https://github.com/paritytech/polkadot-sdk", package = "staging-xcm", branch = "release-polkadot-v1.1.0" } diff --git a/pallets/treasury-buyout-extension/src/lib.rs b/pallets/treasury-buyout-extension/src/lib.rs index c8c4b5839..a1831fdc6 100644 --- a/pallets/treasury-buyout-extension/src/lib.rs +++ b/pallets/treasury-buyout-extension/src/lib.rs @@ -1,5 +1,4 @@ #![deny(warnings)] -#![cfg_attr(test, feature(proc_macro_hygiene))] #![cfg_attr(not(feature = "std"), no_std)] #[cfg(feature = "runtime-benchmarks")] diff --git a/runtime/amplitude/src/lib.rs b/runtime/amplitude/src/lib.rs index 8f81286e1..3f3f36caf 100644 --- a/runtime/amplitude/src/lib.rs +++ b/runtime/amplitude/src/lib.rs @@ -1788,15 +1788,15 @@ impl_runtime_apis! { use frame_system_benchmarking::Pallet as SystemBench; use baseline::Pallet as BaselineBench; - #[allow(non_local_definitions)] + impl frame_system_benchmarking::Config for Runtime {} - #[allow(non_local_definitions)] + impl baseline::Config for Runtime {} - #[allow(non_local_definitions)] + impl runtime_common::benchmarking::orml_asset_registry::Config for Runtime {} use cumulus_pallet_session_benchmarking::Pallet as SessionBench; - #[allow(non_local_definitions)] + impl cumulus_pallet_session_benchmarking::Config for Runtime {} let whitelist: Vec = vec![ diff --git a/runtime/foucoco/src/lib.rs b/runtime/foucoco/src/lib.rs index 11cbb642a..276727c56 100644 --- a/runtime/foucoco/src/lib.rs +++ b/runtime/foucoco/src/lib.rs @@ -1793,15 +1793,15 @@ impl_runtime_apis! { use frame_system_benchmarking::Pallet as SystemBench; use baseline::Pallet as BaselineBench; - #[allow(non_local_definitions)] + impl frame_system_benchmarking::Config for Runtime {} - #[allow(non_local_definitions)] + impl baseline::Config for Runtime {} - #[allow(non_local_definitions)] + impl runtime_common::benchmarking::orml_asset_registry::Config for Runtime {} use cumulus_pallet_session_benchmarking::Pallet as SessionBench; - #[allow(non_local_definitions)] + impl cumulus_pallet_session_benchmarking::Config for Runtime {} let whitelist: Vec = vec![ diff --git a/runtime/integration-tests/Cargo.toml b/runtime/integration-tests/Cargo.toml index 073c6f780..0ab1735d2 100644 --- a/runtime/integration-tests/Cargo.toml +++ b/runtime/integration-tests/Cargo.toml @@ -81,4 +81,20 @@ amplitude-runtime = { path = "../amplitude" } default = ["std"] std = [ "codec/std", + "xcm-builder/std" ] + +try-runtime = [ + "kusama-runtime/try-runtime", + "polkadot-runtime-parachains/try-runtime", + "amplitude-runtime/try-runtime", + "pendulum-runtime/try-runtime", +] + +runtime-benchmarks = [ + "kusama-runtime/runtime-benchmarks", + "polkadot-parachain/runtime-benchmarks", + "integration-tests-common/runtime-benchmarks", + "amplitude-runtime/runtime-benchmarks", + "pendulum-runtime/runtime-benchmarks", +] \ No newline at end of file diff --git a/runtime/integration-tests/src/genesis.rs b/runtime/integration-tests/src/genesis.rs index 84abb30a3..672031da2 100644 --- a/runtime/integration-tests/src/genesis.rs +++ b/runtime/integration-tests/src/genesis.rs @@ -81,7 +81,6 @@ macro_rules! genesis_gen { pub fn genesis_sibling(para_id: u32) -> Storage { use sibling::BuildStorage; - use crate::genesis::SAFE_XCM_VERSION; let token_balances = accounts::init_balances() .iter() diff --git a/runtime/integration-tests/src/lib.rs b/runtime/integration-tests/src/lib.rs index 5f4b82297..af2125453 100644 --- a/runtime/integration-tests/src/lib.rs +++ b/runtime/integration-tests/src/lib.rs @@ -1,3 +1,5 @@ +#![cfg(all(test, not(any(feature = "try-runtime", feature = "runtime-benchmarks"))))] + #[cfg(test)] mod mock; diff --git a/runtime/integration-tests/src/sibling.rs b/runtime/integration-tests/src/sibling.rs index f696f9a5c..12dabc227 100644 --- a/runtime/integration-tests/src/sibling.rs +++ b/runtime/integration-tests/src/sibling.rs @@ -406,6 +406,9 @@ impl pallet_xcm::Config for Runtime { type AdminOrigin = EnsureRoot; type MaxRemoteLockConsumers = ConstU32<0>; type RemoteLockConsumerIdentifier = (); + + #[cfg(feature = "runtime-benchmarks")] + type ReachableDest = (); } parameter_type_with_key! { diff --git a/runtime/pendulum/src/lib.rs b/runtime/pendulum/src/lib.rs index 49448dfb0..043d54860 100644 --- a/runtime/pendulum/src/lib.rs +++ b/runtime/pendulum/src/lib.rs @@ -1789,15 +1789,15 @@ impl_runtime_apis! { use frame_system_benchmarking::Pallet as SystemBench; use baseline::Pallet as BaselineBench; - #[allow(non_local_definitions)] + impl frame_system_benchmarking::Config for Runtime {} - #[allow(non_local_definitions)] + impl baseline::Config for Runtime {} - #[allow(non_local_definitions)] + impl runtime_common::benchmarking::orml_asset_registry::Config for Runtime {} use cumulus_pallet_session_benchmarking::Pallet as SessionBench; - #[allow(non_local_definitions)] + impl cumulus_pallet_session_benchmarking::Config for Runtime {}