Closed Chralt98 closed 7 months ago
hey @Chralt98 thanks for sending this. Yes it is likely that we can use the unwrap_or_default
instead of the expect since the slot is later verified but maybe there are other ways around this that we can explore.
Likely the proper way to do this would be to implement a set_timestamp_info
in the OnTimestampSet
trait that we can use for benchmarks. But this is a PR to substrate so it will take more time to do, for now you can probably do the unwrap_or_default
instead of the .expect("slot digest should exist");
, at least when the benchmark features is enabeld (you can also do a PR with the change)
https://github.com/moondance-labs/tanssi/pull/389 should fix it. I am going to work to polish it a bit for you to able to benchmark every pallet
I use the
tanssi-polkadot-v1.1.0
branch right now.I use this command
./target/release/container-chain-template-simple-node benchmark pallet --chain=dev --steps=50 --repeat=20 --pallet=pallet_timestamp --extrinsic='set' --wasm-execution=compiled --heap-pages=4096 --template=./benchmarking/frame-weight-template.hbs --output=./container-chains/templates/simple/runtime/src/weights/
But then my benchmark for
pallet_timestamp
errors here.This is my error output:
Background information:
I properly added the timestamp pallet in my benchmark configuration:
What can I do to fix it?