-
Notifications
You must be signed in to change notification settings - Fork 1.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
Only cache check point state if it hasn't existed in other cache #7037
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
… into multipleBranchProcessing
…rysm into share-cache
Codecov Report
@@ Coverage Diff @@
## master #7037 +/- ##
==========================================
- Coverage 62.55% 62.16% -0.39%
==========================================
Files 401 401
Lines 31638 31279 -359
==========================================
- Hits 19792 19446 -346
+ Misses 9067 9066 -1
+ Partials 2779 2767 -12 |
rauljordan
approved these changes
Aug 17, 2020
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Background:
There's 2 main group of state storages. One used for stategen and one used for process attestations.
1.) The stategen's storages consists of
hot_state_cache
,epoch_boundary_state_cache
anddb
2.) The process attestation's state storage consist of
check_point_cache
.Why do we need both?
Because of skip slots!
check_point_cache
stores beacon state for the epoch views. If there's a skip slot at 64, 63 and 62. Check point cache will get state of 61 and process slots and epoch up to 64. The processed state of 64 will be stored with the root of 61 and epoch at 2.How can we do better?
We can reuse some of the spaces between them. For example if there's already a state at 64, we don't need to store it in the check point cache. We already know it's in the stategen stroage and it can be retrieved from stategen storage
What does this PR do?
This PR checks whether there's already a state in the stategen storage's bucket before saving it to the check point cache