3

The following is a current issue when migrating from a Solochain to a Parachain (presently as a test on the Rococo relay chain):

On the Rococo chain, we are unable to produce new blocks - it is throwing the Discarding slot xxx, block production took too long. It is happening because of some operation(s) are happening on the on_initialize hook which might be taking more weights than expected. However with the same code, our solo chain is seems to be working fine. Any help will be appreciated.

1 Answer 1

1

When running as a solo chain you having currently more time to produce a block. If you are using the default 6 seconds, you have 2 seconds to build the block. For a parachain you currently have in maximum 500ms to build the block. So, only 1/4 of the time your solo chain has. Whatever the on_initialize is doing, it should be doing less. There isn't that much what you can do instead.

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.