[benchmarking] Reset to genesis storage after each run (#5655)
The genesis state is currently partially provided via `OverlayedChanges`, but these changes are reset by the runtime after the first repetition, causing the second repitition to use an invalid genesis state. Changes: - Provide the genesis state as a `Storage` without any `OverlayedChanges` to make it work correctly with repetitions. - Add `--genesis-builder-preset` option to use different genesis preset names. - Improve error messages. --------- Signed-off-by:Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> Co-authored-by:
ggwpez <ggwpez@users.noreply.github.com> Co-authored-by:
Bastian Köcher <git@kchr.de> Co-authored-by:
Branislav Kontur <bkontur@gmail.com>
Showing
- prdoc/pr_5655.prdoc 15 additions, 0 deletionsprdoc/pr_5655.prdoc
- substrate/bin/node/cli/tests/benchmark_pallet_works.rs 35 additions, 0 deletionssubstrate/bin/node/cli/tests/benchmark_pallet_works.rs
- substrate/frame/benchmarking/pov/src/benchmarking.rs 31 additions, 0 deletionssubstrate/frame/benchmarking/pov/src/benchmarking.rs
- substrate/utils/frame/benchmarking-cli/src/pallet/command.rs 89 additions, 139 deletionssubstrate/utils/frame/benchmarking-cli/src/pallet/command.rs
- substrate/utils/frame/benchmarking-cli/src/pallet/mod.rs 12 additions, 4 deletionssubstrate/utils/frame/benchmarking-cli/src/pallet/mod.rs
- substrate/utils/frame/benchmarking-cli/src/pallet/types.rs 9 additions, 13 deletionssubstrate/utils/frame/benchmarking-cli/src/pallet/types.rs
- substrate/utils/frame/benchmarking-cli/src/pallet/writer.rs 6 additions, 1 deletionsubstrate/utils/frame/benchmarking-cli/src/pallet/writer.rs