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
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Remove disable head update on per attestation
terencechain committed Oct 14, 2020

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
commit b3ae660560f45b4efc7ade4cc681ba79b41d7215
12 changes: 3 additions & 9 deletions beacon-chain/blockchain/receive_attestation.go
Original file line number Diff line number Diff line change
@@ -12,7 +12,6 @@ import (
"github.com/prysmaticlabs/prysm/beacon-chain/state"
pb "github.com/prysmaticlabs/prysm/proto/beacon/p2p/v1"
"github.com/prysmaticlabs/prysm/shared/bytesutil"
"github.com/prysmaticlabs/prysm/shared/featureconfig"
"github.com/prysmaticlabs/prysm/shared/params"
"github.com/prysmaticlabs/prysm/shared/slotutil"
"github.com/prysmaticlabs/prysm/shared/timeutils"
@@ -43,14 +42,9 @@ func (s *Service) ReceiveAttestationNoPubsub(ctx context.Context, att *ethpb.Att
return errors.Wrap(err, "could not process attestation")
}

if !featureconfig.Get().DisableUpdateHeadPerAttestation {
// This updates fork choice head, if a new head could not be updated due to
// long range or intermediate forking. It simply logs a warning and returns nil
// as that's more appropriate than returning errors.
if err := s.updateHead(ctx, s.getJustifiedBalances()); err != nil {
log.Warnf("Resolving fork due to new attestation: %v", err)
return nil
}
if err := s.updateHead(ctx, s.getJustifiedBalances()); err != nil {
log.Warnf("Resolving fork due to new attestation: %v", err)
return nil
}

return nil
31 changes: 13 additions & 18 deletions shared/featureconfig/config.go
Original file line number Diff line number Diff line change
@@ -39,20 +39,19 @@ type Flags struct {
ZinkenTestnet bool // ZinkenTestnet defines the flag through which we can enable the node to run on the Zinken testnet.

// Feature related flags.
WriteSSZStateTransitions bool // WriteSSZStateTransitions to tmp directory.
SkipBLSVerify bool // Skips BLS verification across the runtime.
EnableBlst bool // Enables new BLS library from supranational.
EnableBackupWebhook bool // EnableBackupWebhook to allow database backups to trigger from monitoring port /db/backup.
PruneEpochBoundaryStates bool // PruneEpochBoundaryStates prunes the epoch boundary state before last finalized check point.
EnableSnappyDBCompression bool // EnableSnappyDBCompression in the database.
LocalProtection bool // LocalProtection prevents the validator client from signing any messages that would be considered a slashable offense from the validators view.
SlasherProtection bool // SlasherProtection protects validator fron sending over a slashable offense over the network using external slasher.
DisableUpdateHeadPerAttestation bool // DisableUpdateHeadPerAttestation will disabling update head on per attestation basis.
EnableNoise bool // EnableNoise enables the beacon node to use NOISE instead of SECIO when performing a handshake with another peer.
EnableAccountsV2 bool // EnableAccountsV2 for Prysm validator clients.
EnableEth1DataMajorityVote bool // EnableEth1DataMajorityVote uses the Voting With The Majority algorithm to vote for eth1data.
EnablePeerScorer bool // EnablePeerScorer enables experimental peer scoring in p2p.
EnablePruningDepositProofs bool // EnablePruningDepositProofs enables pruning deposit proofs which significantly reduces the size of a deposit
WriteSSZStateTransitions bool // WriteSSZStateTransitions to tmp directory.
SkipBLSVerify bool // Skips BLS verification across the runtime.
EnableBlst bool // Enables new BLS library from supranational.
EnableBackupWebhook bool // EnableBackupWebhook to allow database backups to trigger from monitoring port /db/backup.
PruneEpochBoundaryStates bool // PruneEpochBoundaryStates prunes the epoch boundary state before last finalized check point.
EnableSnappyDBCompression bool // EnableSnappyDBCompression in the database.
LocalProtection bool // LocalProtection prevents the validator client from signing any messages that would be considered a slashable offense from the validators view.
SlasherProtection bool // SlasherProtection protects validator fron sending over a slashable offense over the network using external slasher.
EnableNoise bool // EnableNoise enables the beacon node to use NOISE instead of SECIO when performing a handshake with another peer.
EnableAccountsV2 bool // EnableAccountsV2 for Prysm validator clients.
EnableEth1DataMajorityVote bool // EnableEth1DataMajorityVote uses the Voting With The Majority algorithm to vote for eth1data.
EnablePeerScorer bool // EnablePeerScorer enables experimental peer scoring in p2p.
EnablePruningDepositProofs bool // EnablePruningDepositProofs enables pruning deposit proofs which significantly reduces the size of a deposit

// Logging related toggles.
DisableGRPCConnectionLogs bool // Disables logging when a new grpc client has connected.
@@ -162,10 +161,6 @@ func ConfigureBeaconChain(ctx *cli.Context) {
log.Warn("Enabling experimental kafka streaming.")
cfg.KafkaBootstrapServers = ctx.String(kafkaBootstrapServersFlag.Name)
}
if ctx.Bool(disableUpdateHeadPerAttestation.Name) {
log.Warn("Disabled update head on per attestation basis")
cfg.DisableUpdateHeadPerAttestation = true
}

if ctx.IsSet(disableGRPCConnectionLogging.Name) {
cfg.DisableGRPCConnectionLogs = true
13 changes: 1 addition & 12 deletions shared/featureconfig/flags.go
Original file line number Diff line number Diff line change
@@ -34,10 +34,6 @@ var (
Name: "dev",
Usage: "Enable experimental features still in development. These features may not be stable.",
}
disableBroadcastSlashingFlag = &cli.BoolFlag{
Name: "disable-broadcast-slashings",
Usage: "Disables broadcasting slashings submitted to the beacon node.",
}
writeSSZStateTransitionsFlag = &cli.BoolFlag{
Name: "interop-write-ssz-state-transitions",
Usage: "Write ssz states to disk after attempted state transition",
@@ -61,10 +57,6 @@ var (
Usage: "Enables the validator to connect to external slasher to prevent it from " +
"transmitting a slashable offence over the network.",
}
disableUpdateHeadPerAttestation = &cli.BoolFlag{
Name: "disable-update-head-attestation",
Usage: "Disable update fork choice head on per attestation. See PR 4802 for details.",
}
disableLookbackFlag = &cli.BoolFlag{
Name: "disable-lookback",
Usage: "Disables use of the lookback feature and updates attestation history for validators from head to epoch 0",
@@ -136,17 +128,14 @@ var SlasherFlags = append(deprecatedFlags, []cli.Flag{
}...)

// E2EValidatorFlags contains a list of the validator feature flags to be tested in E2E.
var E2EValidatorFlags = []string{
"--wait-for-synced",
}
var E2EValidatorFlags []string

// BeaconChainFlags contains a list of all the feature flags that apply to the beacon-chain client.
var BeaconChainFlags = append(deprecatedFlags, []cli.Flag{
devModeFlag,
writeSSZStateTransitionsFlag,
kafkaBootstrapServersFlag,
enableBackupWebhookFlag,
disableBroadcastSlashingFlag,
disableGRPCConnectionLogging,
attestationAggregationStrategy,
AltonaTestnet,