I am trying to benchmark pallet_staking for my runtime. I am on an older substrate release branch. When I try to benchmark using the command.
./target/release/borderless benchmark pallet --chain dev --steps 50 --repeat 20 --pallet=pallet_staking --extrinsic="*" --execution=wasm --wasm-execution=compiled --heap-pages=4096 --header=./header.txt --output ./runtime/src/weights/
I get the error as
Error: Input("Error executing and verifying runtime benchmark: Execution aborted due to trap: wasm trap: wasm
unreachable
instruction executed\nWASM backtrace:\n\n 0: 0x512285 - !rust_begin_unwind\n 1: 0x5a00 - !core::panicking::panic_fmt::h57b56b1dc717ba48\n 2: 0x59c1 - !core::panicking::panic::h152edf3fad35a2e6\n 3: 0x1ac138 - !pallet_staking::benchmarking::create_validator_with_nominators::h38f57aea28e187e4\n 4: 0x1a63d8 - !<pallet_staking::benchmarking::SelectedBenchmark as frame_benchmarking::utils::BenchmarkingSetup>::instance::hdef68fef5b3e3daa\n 5: 0x3baf5a - !pallet_staking::benchmarking::<impl frame_benchmarking::utils::Benchmarking for pallet_staking::pallet::pallet::Pallet>::run_benchmark::h0c943ea8d8286323\n 6: 0x28142d - !<borderless_runtime::Runtime as frame_benchmarking::utils::runtime_decl_for_Benchmark::Benchmark<sp_runtime::generic::block::Block<sp_runtime::generic::header::Header<u32,sp_runtime::traits::BlakeTwo256>,fp_self_contained::unchecked_extrinsic::UncheckedExtrinsic<<pallet_indices::pallet::Pallet<borderless_runtime::Runtime> as sp_runtime::traits::StaticLookup>::Source,borderless_runtime::Call,sp_runtime::MultiSignature,(frame_system::extensions::check_non_zero_sender::CheckNonZeroSender<borderless_runtime::Runtime>,frame_system::extensions::check_spec_version::CheckSpecVersion<borderless_runtime::Runtime>,frame_system::extensions::check_tx_version::CheckTxVersion<borderless_runtime::Runtime>,frame_system::extensions::check_genesis::CheckGenesis<borderless_runtime::Runtime>,frame_system::extensions::check_mortality::CheckMortality<borderless_runtime::Runtime>,frame_system::extensions::check_nonce::CheckNonce<borderless_runtime::Runtime>,frame_system::extensions::check_weight::CheckWeight<borderless_runtime::Runtime>,pallet_transaction_payment::ChargeTransactionPayment<borderless_runtime::Runtime>)>>>>::dispatch_benchmark::h290c63e0542faac3\n 7: 0x324281 - !Benchmark_dispatch_benchmark\n")
How do I fix this? I checked some individual extrinsic and I can benchmark them but when I try to benchmark all of them together I get this error.
MaxNominatorRewardedPerValidator
is. Not sure where the error is originating from