Skip to content
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

Feature gate all caches #3894

Merged
merged 19 commits into from
Nov 4, 2019
Merged

Feature gate all caches #3894

merged 19 commits into from
Nov 4, 2019

Conversation

prestonvanloon
Copy link
Member

@prestonvanloon prestonvanloon commented Oct 30, 2019

As part of investigating #3885, we want to disable all caches until we can carefully roll them out with detection of abnormalities in block production.

  • Tested with local chain
  • Verified validator RPC calls are not too expensive with caches off.

@@ -67,6 +68,9 @@ func NewCommitteeCache() *CommitteeCache {
// ShuffledIndices fetches the shuffled indices by epoch and shard. Every list of indices
// represent one committee. Returns true if the list exists with epoch and shard. Otherwise returns false, nil.
func (c *CommitteeCache) ShuffledIndices(epoch uint64, shard uint64) ([]uint64, error) {
if !featureconfig.Get().EnableShuffledIndexCache {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the committee cache is already gated by the new-cache flag if I am not wrong.
@terencechain can you confirm ?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that's correct, we don't need this flag

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Then that flag needs to be moved here. Not putting the flag inside of the cache allows for misuse without proper flag control.

@terencechain
Copy link
Member

Per discussion of last night, checkpoint state is KV store is required for fork choice as it's currently implemented in the fork choice spec. We should move check_point.state from cache package to forkchoice package

@prestonvanloon prestonvanloon marked this pull request as ready for review October 31, 2019 23:22
@codecov
Copy link

codecov bot commented Oct 31, 2019

Codecov Report

Merging #3894 into master will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master    #3894   +/-   ##
=======================================
  Coverage   57.54%   57.54%           
=======================================
  Files         193      193           
  Lines       12499    12499           
=======================================
  Hits         7192     7192           
  Misses       4297     4297           
  Partials     1010     1010

@prestonvanloon
Copy link
Member Author

Confirmed locally that the chains advance normally with mixed nodes (cache on vs cache off) and that having the cache off is a minimal impact. I noticed only 1.4% difference in wall time for assignments with 128 validators in the system.

@terencechain terencechain merged commit 7d16332 into master Nov 4, 2019
@delete-merged-branch delete-merged-branch bot deleted the flag2 branch November 4, 2019 01:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants