0

I'm following along this benchmark docs to run benchmarking on my Substrate node (dependencies on branch = "polkadot-v0.9.25") with the command cargo build --release --features runtime-benchmarks and it works successfully. But then, when I tried to run the next step with this command:

./target/release/my-node benchmark pallet \
--chain=dev \
--execution=wasm \
--wasm-execution=compiled \
--pallet "*" \
--extrinsic "*" \
--steps 50 \
--repeat 20 \
--output pallets/all-weight.rs

I got an error:

Error: Input("Runtime benchmarking wasn't enabled when building the node. You can enable it with `--features runtime-benchmarks`.")

I've checked the runtime-benchmarks features in Cargo.toml and define_benchmarks! in the Runtime but I don't think something missing there.

I suspected that the problem could probably come from runner.sync_run in node's command.rs but couldn't get a good grasp of the root cause.

What else could I miss here?

2
  • Did you change anything about the code? Commented Feb 17, 2023 at 16:04
  • If the context is Substrate node template, yes it has changed quite a lot.
    – Kresna
    Commented Feb 21, 2023 at 9:17

0

Your Answer

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

Browse other questions tagged or ask your own question.