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

Remove disable ssz cache feature flag #7513

Merged
merged 12 commits into from
Oct 14, 2020
Merged

Conversation

terencechain
Copy link
Member

@terencechain terencechain commented Oct 12, 2020

Part of #7509

SSZ cache has been running by default since Topaz. This PR removes the usage for disable ssz cache flag. I didn't completely remove the ssz cache usages but it's heavily used by tests + fuzz. That will be done in subsequent PR

@terencechain terencechain added Ready For Review A pull request ready for code review OK to merge labels Oct 12, 2020
@terencechain terencechain requested a review from a team as a code owner October 12, 2020 22:30
@terencechain terencechain self-assigned this Oct 12, 2020
@@ -34,8 +34,7 @@ func TestBeaconState_ProtoBeaconStateCompatibility(t *testing.T) {

r1, err := customState.HashTreeRoot(ctx)
require.NoError(t, err)
beaconState, err := stateTrie.InitializeFromProto(genesis)
require.NoError(t, err)
beaconState := customState.Copy()
Copy link
Member Author

Choose a reason for hiding this comment

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

Using copy here to ensure that caches don't get shared

@codecov
Copy link

codecov bot commented Oct 13, 2020

Codecov Report

Merging #7513 into master will decrease coverage by 0.19%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master    #7513      +/-   ##
==========================================
- Coverage   60.98%   60.79%   -0.20%     
==========================================
  Files         428      427       -1     
  Lines       30714    30402     -312     
==========================================
- Hits        18732    18482     -250     
+ Misses       8934     8908      -26     
+ Partials     3048     3012      -36     

@@ -180,11 +180,6 @@ func ConfigureBeaconChain(ctx *cli.Context) {
log.Warn("Disabled dynamic attestation committee subnets")
cfg.DisableDynamicCommitteeSubnets = true
}
cfg.EnableSSZCache = true
Copy link
Member

Choose a reason for hiding this comment

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

Don't you have to remove the use of this value? Otherwise this PR is just disabling ssz cache.

Copy link
Member Author

Choose a reason for hiding this comment

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

We could. But a lot of the tests will fail because they don't run well with state ssz cache. We'll need to investigate individual tests (~10 of them) and update state pkg to provide setters to clear the ssz cache for these tests to pass.

I was thinking to do that in subsequent PR. Do you prefer to do it in this PR?

Copy link
Member

Choose a reason for hiding this comment

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

I would not accept this PR as is. This PR disables SSZ cache with no way to turn it on.

We either need to remove usage of this field, or leave line 183 untouched so that the default of ssz cache enabled is still true.

Copy link
Member Author

Choose a reason for hiding this comment

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

Big face palm moment 🤦
Line 183 should stay untouched. Thank you

@prestonvanloon prestonvanloon added this to the v1.0.0-beta milestone Oct 14, 2020
@prylabs-bulldozer prylabs-bulldozer bot merged commit 7de161e into master Oct 14, 2020
@delete-merged-branch delete-merged-branch bot deleted the ff-cleanup-part3 branch October 14, 2020 03:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Ready For Review A pull request ready for code review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants