diff --git a/runtime/basilisk/Cargo.toml b/runtime/basilisk/Cargo.toml index 72907bbda8..2bf480f1eb 100644 --- a/runtime/basilisk/Cargo.toml +++ b/runtime/basilisk/Cargo.toml @@ -161,6 +161,7 @@ runtime-benchmarks = [ "pallet-transaction-pause/runtime-benchmarks", "pallet-ema-oracle/runtime-benchmarks", "cumulus-pallet-xcmp-queue/runtime-benchmarks", + "cumulus-pallet-parachain-system/runtime-benchmarks", "pallet-xcm-rate-limiter/runtime-benchmarks", ] std = [ diff --git a/runtime/basilisk/src/lib.rs b/runtime/basilisk/src/lib.rs index 87aa1b61a3..1d01aa66dd 100644 --- a/runtime/basilisk/src/lib.rs +++ b/runtime/basilisk/src/lib.rs @@ -460,7 +460,7 @@ impl_runtime_apis! { fn dispatch_benchmark( config: frame_benchmarking::BenchmarkConfig ) -> Result, sp_runtime::RuntimeString> { - use frame_benchmarking::{Benchmarking, BenchmarkBatch, add_benchmark}; + use frame_benchmarking::{BenchmarkError, Benchmarking, BenchmarkBatch, add_benchmark}; use frame_support::traits::TrackedStorageKey; use orml_benchmarking::add_benchmark as orml_add_benchmark; @@ -468,7 +468,16 @@ impl_runtime_apis! { use frame_system_benchmarking::Pallet as SystemBench; use pallet_xyk_liquidity_mining_benchmarking::Pallet as XYKLiquidityMiningBench; - impl frame_system_benchmarking::Config for Runtime {} + impl frame_system_benchmarking::Config for Runtime { + fn setup_set_code_requirements(code: &sp_std::vec::Vec) -> Result<(), BenchmarkError> { + ParachainSystem::initialize_for_set_code_benchmark(code.len() as u32); + Ok(()) + } + + fn verify_set_code() { + System::assert_last_event(cumulus_pallet_parachain_system::Event::::ValidationFunctionStored.into()); + } + } impl pallet_xyk_liquidity_mining_benchmarking::Config for Runtime {} let whitelist: Vec = vec![