Skip to content
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

Closed
athei opened this issue Jan 4, 2021 · 1 comment · Fixed by #11202
Closed

contracts: Move lazy removal to on_idle #7817

athei opened this issue Jan 4, 2021 · 1 comment · Fixed by #11202
Assignees
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

Comments

@athei
Copy link
Member

athei commented Jan 4, 2021

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 than AVERAGE_ON_INITIALIZE_RATIO. For more information see this discussion.

Lazy deletions are executed inside an on_initialize block and are able to break the AVERAGE_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 during on_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

@athei athei added I9-optimisation An enhancement to provide better overall performance in terms of time-to-completion for a task. U2-some_time_soon Issue is worth doing soon. Z1-easy Can be fixed primarily by duplicating and adapting code by an intermediate coder labels Jan 4, 2021
@athei athei added U1-asap No need to stop dead in your tracks, however issue should be addressed as soon as possible. U2-some_time_soon Issue is worth doing soon. and removed U2-some_time_soon Issue is worth doing soon. U1-asap No need to stop dead in your tracks, however issue should be addressed as soon as possible. labels Mar 22, 2021
@athei athei changed the title contracts: Move lazy removal to on_idle contracts: Move lazy removal to on_idle Mar 23, 2021
@athei athei removed the U2-some_time_soon Issue is worth doing soon. label Mar 25, 2021
@stale
Copy link

stale bot commented Jul 7, 2021

Hey, is anyone still working on this? Due to the inactivity this issue has been automatically marked as stale. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the A5-stale Pull request did not receive any updates in a long time. No review needed at this stage. Close it. label Jul 7, 2021
@athei athei removed the A5-stale Pull request did not receive any updates in a long time. No review needed at this stage. Close it. label Jul 8, 2021
@achimcc achimcc self-assigned this Apr 1, 2022
@athei athei moved this to Done in Smart Contracts Jul 27, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
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
Projects
Status: No status
Development

Successfully merging a pull request may close this issue.

2 participants