Measured base block & extrinsic overhead#1514
Conversation
ipapandinas
left a comment
There was a problem hiding this comment.
Can the following TODO be addressed now?
Astar/runtime/shibuya/src/lib.rs
Lines 254 to 259 in 0ebcf7f
Sure, I forgot it's present in Shibuya too, and wanted to handle it in the tx-pause/safe-mode PR for Astar. |
ipapandinas
left a comment
There was a problem hiding this comment.
Sure, I forgot it's present in Shibuya too, and wanted to handle it in the tx-pause/safe-mode PR for Astar.
Thanks for handling it here, it could have been done in the Astar PR, I didn't want to slow down your tests.
Minimum allowed line rate is |
| // TODO: This hardcoded addition is a temporary fix. Replace it with a proper | ||
| // benchmark in the future. | ||
| weights.base_extrinsic = ExtrinsicBaseWeight::get().saturating_add(<Runtime as frame_system::Config>::DbWeight::get().reads(1)); | ||
| weights.base_extrinsic = ExtrinsicBaseWeight::get(); |
There was a problem hiding this comment.
Not sure if BaseExtrinicWeight includes reads
There was a problem hiding this comment.
Although this read will happen only once, maybe it's ok not to measure it
There was a problem hiding this comment.
It does measure it since filter is part of extrinsic execution.
I'll confirm this in the other PR after re-running the benchmarks for Astar.
For measurement, it doesn't happen once per block but once per extrinsic.
Tx-pause is implemented in such a way that key is (pallet name, extrinsic name).
There was a problem hiding this comment.
yeah, I was thinking of safe-mode :)
There was a problem hiding this comment.
I assumed that safe-mode read is whitelisted...seems it's not.
Pull Request Summary
Parachain runtimes now use benchmarked block & extrinsic overhead.
Also updated benchmark script not to try & generate weights in case of an error.