diff --git a/Cargo.toml b/Cargo.toml index e1c5f0966..88efa2c81 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -26,6 +26,8 @@ version = "0.4.0" # Substrate runtime requires unwinding. panic = "unwind" opt-level = 3 +strip = "debuginfo" + [profile.dev] split-debuginfo = "unpacked" diff --git a/integration-tests/Cargo.toml b/integration-tests/Cargo.toml index 5215b2c9d..7d08c7c12 100644 --- a/integration-tests/Cargo.toml +++ b/integration-tests/Cargo.toml @@ -96,6 +96,7 @@ std = [ "parachains-common/std", "parity-scale-codec/std", "penpal-runtime/std", + "polimec-common/std", "polimec-parachain-runtime/std", "polimec-receiver/std", "polkadot-core-primitives/std", @@ -115,7 +116,6 @@ std = [ "xcm-builder/std", "xcm-executor/std", "xcm/std", - "polimec-common/std" ] runtime-benchmarks = [ @@ -137,6 +137,7 @@ runtime-benchmarks = [ "pallet-xcm/runtime-benchmarks", "penpal-runtime/runtime-benchmarks", "polimec-base-runtime/runtime-benchmarks", + "polimec-common/runtime-benchmarks", "polimec-parachain-runtime/runtime-benchmarks", "polimec-receiver/runtime-benchmarks", "polkadot-parachain/runtime-benchmarks", @@ -147,7 +148,6 @@ runtime-benchmarks = [ "sp-runtime/runtime-benchmarks", "xcm-builder/runtime-benchmarks", "xcm-executor/runtime-benchmarks", - "polimec-common/runtime-benchmarks" ] try-runtime = [ "asset-hub-polkadot-runtime/try-runtime", @@ -170,9 +170,9 @@ try-runtime = [ "parachain-info/try-runtime", "penpal-runtime/try-runtime", "polimec-base-runtime/try-runtime", + "polimec-common/try-runtime", "polimec-parachain-runtime/try-runtime", "polimec-receiver/try-runtime", - "polimec-common/try-runtime", "polkadot-runtime-parachains/try-runtime", "polkadot-runtime/try-runtime", "polkadot-service/try-runtime", diff --git a/integration-tests/penpal/Cargo.toml b/integration-tests/penpal/Cargo.toml index 1114b1689..8cf73e746 100644 --- a/integration-tests/penpal/Cargo.toml +++ b/integration-tests/penpal/Cargo.toml @@ -116,6 +116,7 @@ std = [ "pallet-xcm/std", "parachain-info/std", "parachains-common/std", + "polimec-common/std", "polimec-receiver/std", "polkadot-parachain/std", "polkadot-primitives/std", @@ -137,7 +138,6 @@ std = [ "xcm-builder/std", "xcm-executor/std", "xcm/std", - "polimec-common/std" ] runtime-benchmarks = [ @@ -157,6 +157,7 @@ runtime-benchmarks = [ "pallet-timestamp/runtime-benchmarks", "pallet-vesting/runtime-benchmarks", "pallet-xcm/runtime-benchmarks", + "polimec-common/runtime-benchmarks", "polimec-receiver/runtime-benchmarks", "polkadot-parachain/runtime-benchmarks", "polkadot-primitives/runtime-benchmarks", @@ -165,7 +166,6 @@ runtime-benchmarks = [ "sp-runtime/runtime-benchmarks", "xcm-builder/runtime-benchmarks", "xcm-executor/runtime-benchmarks", - "polimec-common/runtime-benchmarks" ] try-runtime = [ diff --git a/justfile b/justfile index b38338cca..0a0fe6f86 100644 --- a/justfile +++ b/justfile @@ -20,7 +20,7 @@ build-parachain-node: # Build the "Base" Runtime using srtool build-base-srtool: - srtool build --root -p polimec-base-runtime --runtime-dir runtimes/base + srtool build --root -p polimec-base-runtime --runtime-dir runtimes/base --build-opts="--features=on-chain-release-build" # Build the "Testnet" Runtime using srtool build-parachain-srtool: diff --git a/pallets/funding/Cargo.toml b/pallets/funding/Cargo.toml index 71d52a362..4e943cd70 100644 --- a/pallets/funding/Cargo.toml +++ b/pallets/funding/Cargo.toml @@ -62,11 +62,12 @@ assert_matches2.workspace = true xcm-executor.workspace = true [features] -default = ["std"] +default = [ "std" ] std = [ "frame-benchmarking?/std", "frame-support/std", "frame-system/std", + "futures", "itertools/use_std", "log/std", "pallet-assets/std", @@ -77,8 +78,8 @@ std = [ "pallet-xcm/std", "parachains-common/std", "parity-scale-codec/std", - "polimec-receiver/std", "polimec-common/std", + "polimec-receiver/std", "polimec-xcm-executor/std", "polkadot-parachain/std", "polkadot-runtime-parachains/std", @@ -90,11 +91,10 @@ std = [ "sp-io/std", "sp-runtime/std", "sp-std/std", + "tokio", "xcm-builder/std", "xcm-executor/std", "xcm/std", - "tokio", - "futures", ] runtime-benchmarks = [ "frame-benchmarking/runtime-benchmarks", @@ -106,8 +106,8 @@ runtime-benchmarks = [ "pallet-linear-release/runtime-benchmarks", "pallet-timestamp/runtime-benchmarks", "pallet-xcm/runtime-benchmarks", - "polimec-receiver/runtime-benchmarks", "polimec-common/runtime-benchmarks", + "polimec-receiver/runtime-benchmarks", "polimec-xcm-executor/runtime-benchmarks", "polkadot-parachain/runtime-benchmarks", "polkadot-runtime-parachains/runtime-benchmarks", @@ -115,7 +115,6 @@ runtime-benchmarks = [ "sp-runtime/runtime-benchmarks", "xcm-builder/runtime-benchmarks", "xcm-executor/runtime-benchmarks", - "pallet-xcm/runtime-benchmarks" ] try-runtime = [ "frame-support/try-runtime", @@ -126,8 +125,8 @@ try-runtime = [ "pallet-linear-release/try-runtime", "pallet-timestamp/try-runtime", "pallet-xcm/try-runtime", - "polimec-receiver/try-runtime", "polimec-common/try-runtime", + "polimec-receiver/try-runtime", "polkadot-runtime-parachains/try-runtime", "polkadot-runtime/try-runtime", "sp-runtime/try-runtime", diff --git a/pallets/linear-release/Cargo.toml b/pallets/linear-release/Cargo.toml index 648f294f0..7671f336b 100644 --- a/pallets/linear-release/Cargo.toml +++ b/pallets/linear-release/Cargo.toml @@ -42,12 +42,12 @@ std = [ "parity-scale-codec/std", "polimec-common/std", "scale-info/std", + "serde/std", "sp-core/std", "sp-io/std", "sp-runtime/std", "sp-std/std", "xcm-builder?/std", - "serde/std" ] runtime-benchmarks = [ "frame-benchmarking/runtime-benchmarks", diff --git a/pallets/parachain-staking/Cargo.toml b/pallets/parachain-staking/Cargo.toml index 0604087e4..6271fc70a 100644 --- a/pallets/parachain-staking/Cargo.toml +++ b/pallets/parachain-staking/Cargo.toml @@ -55,6 +55,7 @@ std = [ "pallet-session/std", "pallet-timestamp/std", "parity-scale-codec/std", + "polimec-common/std", "scale-info/std", "serde/std", "sp-consensus-aura/std", @@ -64,7 +65,6 @@ std = [ "sp-staking/std", "sp-std/std", "substrate-fixed/std", - "polimec-common/std" ] runtime-benchmarks = [ "frame-benchmarking", @@ -73,9 +73,9 @@ runtime-benchmarks = [ "frame-system/runtime-benchmarks", "pallet-balances/runtime-benchmarks", "pallet-timestamp/runtime-benchmarks", + "polimec-common/runtime-benchmarks", "sp-runtime/runtime-benchmarks", "sp-staking/runtime-benchmarks", - "polimec-common/runtime-benchmarks" ] try-runtime = [ "frame-support/try-runtime", diff --git a/runtimes/base/Cargo.toml b/runtimes/base/Cargo.toml index 622265dd0..1b57ca562 100644 --- a/runtimes/base/Cargo.toml +++ b/runtimes/base/Cargo.toml @@ -116,8 +116,8 @@ std = [ "pallet-authorship/std", "pallet-balances/std", "pallet-membership/std", - "pallet-oracle-ocw/std", "pallet-multisig/std", + "pallet-oracle-ocw/std", "pallet-parachain-staking/std", "pallet-proxy/std", "pallet-session/std", @@ -200,8 +200,8 @@ try-runtime = [ "pallet-authorship/try-runtime", "pallet-balances/try-runtime", "pallet-membership/try-runtime", - "pallet-oracle-ocw/try-runtime", "pallet-multisig/try-runtime", + "pallet-oracle-ocw/try-runtime", "pallet-parachain-staking/try-runtime", "pallet-proxy/try-runtime", "pallet-session/try-runtime", @@ -218,3 +218,8 @@ try-runtime = [ "shared-configuration/try-runtime", "sp-runtime/try-runtime", ] + +# 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. +on-chain-release-build = [ "sp-api/disable-logging" ] diff --git a/runtimes/testnet/Cargo.toml b/runtimes/testnet/Cargo.toml index 8de1dac1b..3e6b069df 100644 --- a/runtimes/testnet/Cargo.toml +++ b/runtimes/testnet/Cargo.toml @@ -148,11 +148,11 @@ std = [ "parachain-info/std", "parachains-common/std", "parity-scale-codec/std", + "polimec-common/std", "polimec-xcm-executor/std", "polkadot-parachain/std", "polkadot-primitives/std", "polkadot-runtime-common/std", - "polimec-common/std", "scale-info/std", "serde/std", "shared-configuration/std", @@ -200,11 +200,11 @@ runtime-benchmarks = [ "pallet-utility/runtime-benchmarks", "pallet-vesting/runtime-benchmarks", "pallet-xcm/runtime-benchmarks", + "polimec-common/runtime-benchmarks", "polimec-xcm-executor/runtime-benchmarks", "polkadot-parachain/runtime-benchmarks", "polkadot-primitives/runtime-benchmarks", "polkadot-runtime-common/runtime-benchmarks", - "polimec-common/runtime-benchmarks", "shared-configuration/runtime-benchmarks", "sp-runtime/runtime-benchmarks", "xcm-builder/runtime-benchmarks", @@ -248,9 +248,9 @@ try-runtime = [ "pallet-vesting/try-runtime", "pallet-xcm/try-runtime", "parachain-info/try-runtime", + "polimec-common/try-runtime", "polimec-xcm-executor/try-runtime", "polkadot-runtime-common/try-runtime", - "polimec-common/try-runtime", "shared-configuration/try-runtime", "sp-runtime/try-runtime", ]