You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A recent incident has shown that we need to ensure our generated weights don't lead to excess of the maximum block weight or PoV size. Therefore, we need a CI job which checks that for at least Altair and Centrifuge runtime for every release. It can be coupled with the WASM build trigger as both have the same frequency.
The script needs to through all files inside the weights directory of a runtime, calculate the call weights based on the runtimes parameters (e.g. MaxKeys) and compare it with the maximum block weight and maximum pov size.
Research/based on
function update_collection weight having 175% PoV size for MaxKeys = 1000 and MaxFeeders = 10.
How will this affect the code base
Improve security
What are foreseen obstacles or hurdles to overcome?
Mapping the right parameters from the runtime lib.rs to the generic n, m etc. parameters inside the weight files. The correct parameters can be determined by looking into the corresponding pallet's lib.rs, so we might need manual cases for parametrized calls which then requires maintenance for breaking changes (i.e. renaming of parameters)
Whoever tackles this issue, needs to check whether such a tool already exists in the Polkadot Ecosystem as it is agnostic to Centrifuge and needed by every Substrate chain.
The text was updated successfully, but these errors were encountered:
The correct parameters can be determined by looking into the corresponding pallet's lib.rs, so we might need manual cases for parametrized calls which then requires maintenance for breaking changes
I think we do not need it. We can get the weight from the DispatchInfo of the extrinsic: extrinsic.get_dispatch_info().weight.
What I think we need is to call all extrinsics manually. But maybe we can create something similar to what currently works for benchmarking. Some kind of macro in the runtime that calls all extrinsics under the hood if they are registered for benchmarks
Description
A recent incident has shown that we need to ensure our generated weights don't lead to excess of the maximum block weight or PoV size. Therefore, we need a CI job which checks that for at least Altair and Centrifuge runtime for every release. It can be coupled with the WASM build trigger as both have the same frequency.
The script needs to through all files inside the
weights
directory of a runtime, calculate the call weights based on the runtimes parameters (e.g.MaxKeys
) and compare it with the maximum block weight and maximum pov size.Research/based on
function update_collection
weight having 175% PoV size forMaxKeys = 1000
andMaxFeeders = 10
.How will this affect the code base
What are foreseen obstacles or hurdles to overcome?
lib.rs
to the genericn
,m
etc. parameters inside the weight files. The correct parameters can be determined by looking into the corresponding pallet'slib.rs
, so we might need manual cases for parametrized calls which then requires maintenance for breaking changes (i.e. renaming of parameters)Whoever tackles this issue, needs to check whether such a tool already exists in the Polkadot Ecosystem as it is agnostic to Centrifuge and needed by every Substrate chain.
The text was updated successfully, but these errors were encountered: