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
Optimize Archival Assignment Retrieval #4480
Conversation
Codecov Report
@@ Coverage Diff @@
## master #4480 +/- ##
=========================================
Coverage ? 39.82%
=========================================
Files ? 193
Lines ? 13156
Branches ? 0
=========================================
Hits ? 5239
Misses ? 7029
Partials ? 888 |
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.
Just a typo change request, nice optimization
AttesterSlot: attesterSlot, | ||
ProposerSlot: proposerSlot, | ||
PublicKey: headState.Validators[index].PublicKey, | ||
assignment, ok := archivedAssingments[index] |
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.
assignment, ok := archivedAssingments[index] | |
assignment, ok := archivedAssignments[index] |
} | ||
proposerIndexToSlot[i] = slot | ||
} | ||
|
||
assingmentMap := make(map[uint64]*ethpb.ValidatorAssignments_CommitteeAssignment) |
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.
typo
* optimize further * remove func * Merge branch 'master' into optimizeArchival * Merge refs/heads/master into optimizeArchival * Merge refs/heads/master into optimizeArchival * Merge refs/heads/master into optimizeArchival * Merge refs/heads/master into optimizeArchival * Merge refs/heads/master into optimizeArchival * Merge refs/heads/master into optimizeArchival * raul's review * Merge branch 'optimizeArchival' of https://github.com/prysmaticlabs/geth-sharding into optimizeArchival * preston's review
* optimize further * remove func * Merge branch 'master' into optimizeArchival * Merge refs/heads/master into optimizeArchival * Merge refs/heads/master into optimizeArchival * Merge refs/heads/master into optimizeArchival * Merge refs/heads/master into optimizeArchival * Merge refs/heads/master into optimizeArchival * Merge refs/heads/master into optimizeArchival * raul's review * Merge branch 'optimizeArchival' of https://github.com/prysmaticlabs/geth-sharding into optimizeArchival * preston's review
Brings down archival assignment retrieval response times by only iterating through committees once and storing them all in a map.