0

We need to run an on-initialize function that runs for 5 to 6 seconds. The error we run into when we do this is "Block production took too long".

We have tried to increase the AVERAGE_ON_INITIALIZE_RATIO, NORMAL_DISPATCH_RATIO and MAXIMUM_BLOCK_WEIGHT accordingly to be able to fit it within the block length, however those don't seem to work.

Are there correct values for AVERAGE_ON_INITIALIZE_RATIO, NORMAL_DISPATCH_RATIO, or MAXIMUM_BLOCK_WEIGHT to help us achieve this? For context, we are trying to run this on Kusama chain.

2
  • do you have the source code public?
    – flipchan
    Feb 2 at 18:28
  • Why would you do that? Parachain blocks should not take that long or they can get their' chain stuck. Are you trying to do a migration or what? Feb 2 at 19:55

0

Your Answer

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

Browse other questions tagged or ask your own question.