Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.
This repository was archived by the owner on Nov 15, 2023. It is now read-only.

contracts: Move lazy removal to on_idle #7817

@athei

Description

@athei

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

Metadata

Metadata

Assignees

Labels

I9-optimisationAn enhancement to provide better overall performance in terms of time-to-completion for a task.Z1-easyCan be fixed primarily by duplicating and adapting code by an intermediate coder

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions