-
-
Notifications
You must be signed in to change notification settings - Fork 325
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
Potential performance issue in initiateValidatorExit() #2342
Comments
there is a performance test for it lodestar/packages/beacon-state-transition/test/perf/phase0/fast/block/block.test.ts Line 32 in 393836d
|
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 15 days if no further activity occurs. Thank you for your contributions. |
@tuyennhv do we have a performance problem? Processing a block with 16 exits is a x100 times slower..
|
yeah we should definitely improve it |
Describe the bug
Every time
initiateValidatorExit()
is called it iterates over the entire validators array. initiateValidatorExit may be called multiple times per block with the right conditions.lodestar/packages/beacon-state-transition/src/util/validatorStatus.ts
Line 37 in e481a84
Expected behavior
We should do something smarter and cache this computation
The text was updated successfully, but these errors were encountered: