Skip to content

Commit cd41f54

Browse files
A0-3921: Fix runtime-benchmarks build (#1674)
# Description In `polkadot-sdk` 1.4.0, `pallet-contracts` depends on `xcm-builder` package. [It failed to build with `runtime-benchmarks` feature](https://github.com/Cardinal-Cryptography/aleph-node/actions/runs/8605918122/job/23583222670). Fix is to enable `runtime-benchmarks` for `pallet-contracts` in our runtime. Also, this PR enables other `runtime-benchmark` features for various pallets our runtime uses. ## Type of change Please delete options that are not relevant. - Bug fix (non-breaking change which fixes an issue) ## Testing https://github.com/Cardinal-Cryptography/aleph-node/actions/runs/8611531265
1 parent 910fafc commit cd41f54

File tree

3 files changed

+21
-2
lines changed

3 files changed

+21
-2
lines changed

Cargo.lock

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

bin/runtime/Cargo.toml

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -164,9 +164,23 @@ try-runtime = [
164164
]
165165
enable_treasury_proposals = []
166166
runtime-benchmarks = [
167-
"frame-system/runtime-benchmarks",
168-
"frame-benchmarking/runtime-benchmarks",
169167
"baby-liminal-extension/runtime-benchmarks",
168+
"frame-benchmarking/runtime-benchmarks",
169+
"frame-support/runtime-benchmarks",
170+
"frame-system/runtime-benchmarks",
171+
"pallet-balances/runtime-benchmarks",
172+
"pallet-contracts/runtime-benchmarks",
170173
"pallet-feature-control/runtime-benchmarks",
174+
"pallet-identity/runtime-benchmarks",
175+
"pallet-multisig/runtime-benchmarks",
176+
"pallet-nomination-pools/runtime-benchmarks",
177+
"pallet-proxy/runtime-benchmarks",
178+
"pallet-scheduler/runtime-benchmarks",
179+
"pallet-staking/runtime-benchmarks",
180+
"pallet-sudo/runtime-benchmarks",
181+
"pallet-timestamp/runtime-benchmarks",
182+
"pallet-treasury/runtime-benchmarks",
183+
"pallet-utility/runtime-benchmarks",
184+
"pallet-vesting/runtime-benchmarks",
171185
"pallet-vk-storage/runtime-benchmarks",
172186
]

bin/runtime/src/lib.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -695,6 +695,8 @@ impl pallet_treasury::Config for Runtime {
695695
type Paymaster = PayFromAccount<Balances, TreasuryAccount>;
696696
type BalanceConverter = UnityAssetBalanceConversion;
697697
type PayoutPeriod = ConstU32<0>;
698+
#[cfg(feature = "runtime-benchmarks")]
699+
type BenchmarkHelper = ();
698700
}
699701

700702
impl pallet_utility::Config for Runtime {

0 commit comments

Comments
 (0)