After upgrading the Substrate to polkadot-v0.9.43.

I got the following error while running the runtime benchmarks.

2023-07-21 19:55:56 Starting benchmark: frame_system::set_code    
Error: Input("Benchmark frame_system::set_code failed: ValidationDataNotAvailable")

Before this upgrade, everything works well.

1 Answer 1


I found that I missed an update on Cumulus/Substrate side.

- impl frame_system_benchmarking::Config for Runtime {}
+ impl frame_system_benchmarking::Config for Runtime {
+   fn setup_set_code_requirements(code: &sp_std::vec::Vec<u8>) -> 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::<Runtime>::ValidationFunctionStored.into());
+   }
+ }

For more detail check, https://github.com/paritytech/cumulus/pull/2766.

The interesting thing is that this PR was not included in polkadot-v0.9.43. And I also found that cumulus didn't benchmark frame-system for polkadot-v0.9.43.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.