Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid iterating all operator during epoch transition #2605

Open
NingLin-P opened this issue Mar 11, 2024 · 0 comments
Open

Avoid iterating all operator during epoch transition #2605

NingLin-P opened this issue Mar 11, 2024 · 0 comments

Comments

@NingLin-P
Copy link
Member

During epoch transition, all operators are iterated over, even though we have short-circuit optimization to skip further processing for operators who have no deposit/withdraw/reward within this epoch, we still need to read the operator state first to determine if we can safely skip such operator.

Thus currently a database read is required for every operator during the epoch transition and because the total number of operators of a specific domain is unbounded, the weight of the epoch transition is also unbounded.

One way to fix this is to manually track operators who have deposit/withdraw/reward happened within the current epoch, and during epoch transition we only need to process these operators and leave the rest of the operators untouched.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant