This repository has been archived by the owner on Nov 15, 2023. It is now read-only.
contracts: Move lazy removal to on_idle
#7817
Labels
I9-optimisation
An enhancement to provide better overall performance in terms of time-to-completion for a task.
Z1-easy
Can be fixed primarily by duplicating and adapting code by an intermediate coder
Due to the fact that offchain election solutions are submitted as an unsigned transaction they can be prevented from inclusion when the
on_initialize
blocks of any block are taking more weight thanAVERAGE_ON_INITIALIZE_RATIO
. For more information see this discussion.Lazy deletions are executed inside an
on_initialize
block and are able to break theAVERAGE_ON_INITIALIZE_RATIO
assumption depending on configuration and load. To avoid this scenario we should tune down or completely remove the amount of work that is done duringon_initialize
and move it to an upcoming on_idle (#4064) hook.Please note that the issue with offchain election will be resolved by #7319. The move to the new hook is still useful in order to increase throughput during low utilization.
cc @thiolliere @kianenigma
The text was updated successfully, but these errors were encountered: