-
-
Notifications
You must be signed in to change notification settings - Fork 318
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 getTotalBalance() #3096
Avoid getTotalBalance() #3096
Conversation
Code Climate has analyzed commit 68b968d and detected 0 issues on this pull request. View more on Code Climate. |
Performance Report✔️ no performance regression detected Full benchmark results
|
Codecov Report
@@ Coverage Diff @@
## master #3096 +/- ##
==========================================
- Coverage 59.72% 58.26% -1.47%
==========================================
Files 376 379 +3
Lines 8958 9416 +458
Branches 1320 1412 +92
==========================================
+ Hits 5350 5486 +136
- Misses 3225 3544 +319
- Partials 383 386 +3 |
Oh nice pick, but why is the node computing the weak subjectivity period every epoch? Why does it need that info? EDIT: Oh, for the lightclient initer |
Motivation
getTotalBalance
is called per finalized checkpoint, basically it means per epochgetTotalBalance
is very slow, it's >3s in the below profiler in my local environment (and usually the server is 2x slower than my environment)Description
totalActiveBalanceByIncrement
is available for epochProcess and altair, we should calculate, use it and cache it in EpochContext for both phase0 and altair