Runtime dependent weights#5064
Conversation
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
| /// We allow `Normal` extrinsics to fill up the block up to 75%, the rest can be used | ||
| /// by Operational extrinsics. | ||
| const NORMAL_DISPATCH_RATIO: Perbill = Perbill::from_percent(75); | ||
| pub const NORMAL_DISPATCH_RATIO: Perbill = Perbill::from_percent(75); |
There was a problem hiding this comment.
This is the only intended logic change.
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
| println!("Base: {}", BlockWeights::get().get(DispatchClass::Normal).base_extrinsic); | ||
| let x = WeightToFee::calc(&BlockWeights::get().max_block); | ||
| println!("Base: {}", ExtrinsicBaseWeight::get()); | ||
| let x = WeightToFee::calc(&MAXIMUM_BLOCK_WEIGHT); |
There was a problem hiding this comment.
Test here looks weird so I changed it to look like in the other runtimes; in polkadot, kusama and westend it is all done this way.
Could also be macro generated 🤷
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
|
would be good to sanity check the metadata constants have not changed with regard to these weight parameters. |
|
Waiting for this to be resolved, since cumulus should 🤞 already build with this version: #5037 (comment)
I will extract the metadata manually and check but CI would be much preferred. |
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
|
I wrote a small script to compare the metadata between branches and there is no change for |
kianenigma
left a comment
There was a problem hiding this comment.
Didn't look at the whole diff, but sounds right to me, and much cleaner now 👍
|
bot merge |
This MR makes the
BlockExecution,ExtrinsicBase,RocksDbandParityDbWeights runtime dependent.Later on paritytech/substrate#10977 will be used to generate weights for each runtime instead of using the Substrate defaults.
Changes:
frame_supportinto each*_runtime_constantsmoduleruntime_commoninto each runtime with a newimpl_runtime_weights!macroNORMAL_DISPATCH_RATIOpublic since it is mentioned in the doc ofTargetBlockFullness. Can make it private again if that is better.I checked that the runtime did not change: #5064 (comment), CI confirmation would still be appreciated.
cumulus companion: paritytech/cumulus#1076