Are the benchmarks run on the same machine in the cumulus repository as the ones in the substrate? That is, is the weight in weights.rs files the same in these two repositories?

Edit: The weights in these repositories are not the same.

How to generate the weights for cumulus?

1 Answer 1


The Cumulus weight generation follows the same logic as Substrate and Polkadot.
There exist two scripts that are used to regularly update the weights here and here.
Please note that we do not expect the exact same weights across all projects, even though the benchmarks are being run on the same machines.

Some reasons for that are:

  • The runtime configuration influences the weight. It is therefore important to re-benchmark all pallets for each runtime. One obvious example is the BlockExecutionWeight, which is dependent on the inherents of the runtime.
  • The benchmarks were run with different Substrate versions. AFAIK Cumulus does not always re-benchmark when updating Substrate, but only before a release. Different versions of Substrate can change the results.
  • The rust compiler improved since the benchmarks were last run, which would result in lower weights.
  • A slight leeway for the weights is expected in any case, since it is a measurement that cannot be 100% reproduced.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.