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

More feature flag deletions #7533

Merged
merged 17 commits into from
Oct 14, 2020
Merged

More feature flag deletions #7533

merged 17 commits into from
Oct 14, 2020

Conversation

terencechain
Copy link
Member

@terencechain terencechain commented Oct 14, 2020

Part of #7509

This PR removes the following flags. The rationales are outlined in the issue above.

  • disable-broadcast-slashings
  • disable-dynamic-committee-subnets
  • disable-update-head-attestation
  • disable-noise
  • wait-for-synced
  • disable-new-beacon-state-locks
  • init-sync-verbose
  • disable-finalized-deposits-cache

Note: deep source failed coverage reported lines that's out of this scope

@terencechain terencechain added Ready For Review A pull request ready for code review OK to merge labels Oct 14, 2020
@terencechain terencechain requested a review from a team as a code owner October 14, 2020 19:46
@terencechain terencechain self-assigned this Oct 14, 2020
@terencechain terencechain added this to the v1.0.0-beta milestone Oct 14, 2020
enableBlst,
enableEth1DataMajorityVote,
enableAttBroadcastDiscoveryAttempts,
Copy link
Member

Choose a reason for hiding this comment

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

Are you removing this?

Copy link
Member Author

Choose a reason for hiding this comment

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

My bad. I'm going to leave this in.

@@ -62,18 +62,14 @@ func run(ctx context.Context, v Validator) {
log.Fatalf("Slasher is not ready: %v", err)
}
}
if featureconfig.Get().WaitForSynced {
if err := v.WaitForSynced(ctx); err != nil {
Copy link
Member

Choose a reason for hiding this comment

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

Are you going to delete this method too?

Copy link
Member

Choose a reason for hiding this comment

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

This feature looks like it wasn't launched yet, but you are removing it?

Copy link
Member

Choose a reason for hiding this comment

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

cc: @0xKiwi

Copy link
Member Author

Choose a reason for hiding this comment

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

Similar to StateGenSigVerify, this looks to be a feature that we should never release on beta/mainnet. This skips WaitForChainStart and is only utilized during test (e.g. e2e). Could also be dangerous if someone were to try this on mainnet

Copy link
Member Author

Choose a reason for hiding this comment

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

Chatted with @0xKiwi this feature is not done. We'll leave it in for now

Comment on lines 97 to 98
if featureconfig.Get().DisableDynamicCommitteeSubnets {
for i := uint64(0); i < params.BeaconNetworkConfig().AttestationSubnetCount; i++ {
formattedTopic := fmt.Sprintf(attTopic, digest, i)
topicPeerCount.WithLabelValues(formattedTopic).Set(float64(len(s.p2p.PubSub().ListPeers(formattedTopic))))
}
} else {
for _, committeeIdx := range indices {
formattedTopic := fmt.Sprintf(attTopic, digest, committeeIdx)
topicPeerCount.WithLabelValues(formattedTopic).Set(float64(len(s.p2p.PubSub().ListPeers(formattedTopic))))
}
for _, committeeIdx := range indices {
formattedTopic := fmt.Sprintf(attTopic, digest, committeeIdx)
topicPeerCount.WithLabelValues(formattedTopic).Set(float64(len(s.p2p.PubSub().ListPeers(formattedTopic))))
}
Copy link
Member

Choose a reason for hiding this comment

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

I don't think this is a good idea. I think it should always be in the path of DisableDynamicCommitteeSubnets.
If was on committee 5 and I have 10 peers on that subnet. Prometheus polls this metric, and the topic is updated with the value 10.

Now, one epoch later, I am no longer on committee 5. When prometheus polls the metrics again, the value for committee subnet 5 is still 10 and it is not updated. This leads to stale and inaccurate results.

@codecov
Copy link

codecov bot commented Oct 14, 2020

Codecov Report

Merging #7533 into master will increase coverage by 0.03%.
The diff coverage is 88.31%.

@@            Coverage Diff             @@
##           master    #7533      +/-   ##
==========================================
+ Coverage   61.62%   61.66%   +0.03%     
==========================================
  Files         421      421              
  Lines       29740    29428     -312     
==========================================
- Hits        18328    18146     -182     
+ Misses       8452     8376      -76     
+ Partials     2960     2906      -54     

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