-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Increase regen historical state cache size #5613
Conversation
// Using max possible size to avoid using DB to save and retrieve pre state (slow) | ||
// The size is 80 because block at slot 43772 built on top of block at slot 43693. | ||
// That is the worst case. | ||
cacheState, err := lru.New(80) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be a global constant? Just so its not hardcoded into a parameter.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep! Done
Codecov Report
@@ Coverage Diff @@
## master #5613 +/- ##
===========================================
+ Coverage 13.04% 47.01% +33.97%
===========================================
Files 116 239 +123
Lines 9285 20738 +11453
===========================================
+ Hits 1211 9750 +8539
- Misses 7865 9235 +1370
- Partials 209 1753 +1544 |
This PR fixes #5611. It has no impact to beacon node run time, it only impacts the duration when beacon node is generating and saving historical states. It's 8 mins given current chain length
Change list:
regenHistoricalStates