Remove feature flags within the scope of pkg (#7511)

* Remove feature flags within the scope of pkg

* Remove DisableForkChoice

* Remove e2e usages

Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
This commit is contained in:
terence tsao 2020-10-14 11:34:49 -07:00 committed by GitHub
parent a005c77b3f
commit e5ed2cd141
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 0 additions and 51 deletions

View File

@ -51,9 +51,7 @@ type Flags struct {
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.
CheckHeadState bool // CheckHeadState checks the current headstate before retrieving the desired state from the db.
EnableNoise bool // EnableNoise enables the beacon node to use NOISE instead of SECIO when performing a handshake with another peer.
DontPruneStateStartUp bool // DontPruneStateStartUp disables pruning state upon beacon node start up.
WaitForSynced bool // WaitForSynced uses WaitForSynced in validator startup to ensure it can communicate with the beacon node as soon as possible.
EnableAccountsV2 bool // EnableAccountsV2 for Prysm validator clients.
InitSyncVerbose bool // InitSyncVerbose logs every processed block during initial syncing.
@ -63,11 +61,6 @@ type Flags struct {
EnablePeerScorer bool // EnablePeerScorer enables experimental peer scoring in p2p.
EnablePruningDepositProofs bool // EnablePruningDepositProofs enables pruning deposit proofs which significantly reduces the size of a deposit
// DisableForkChoice disables using LMD-GHOST fork choice to update
// the head of the chain based on attestations and instead accepts any valid received block
// as the chain head. UNSAFE, use with caution.
DisableForkChoice bool
// Logging related toggles.
DisableGRPCConnectionLogs bool // Disables logging when a new grpc client has connected.
@ -80,7 +73,6 @@ type Flags struct {
EnableSSZCache bool // EnableSSZCache see https://github.com/prysmaticlabs/prysm/pull/4558.
EnableEth1DataVoteCache bool // EnableEth1DataVoteCache; see https://github.com/prysmaticlabs/prysm/issues/3106.
EnableSlasherConnection bool // EnableSlasher enable retrieval of slashing events from a slasher instance.
EnableBlockTreeCache bool // EnableBlockTreeCache enable fork choice service to maintain latest filtered block tree.
UseCheckPointInfoCache bool // UseCheckPointInfoCache uses check point info cache to efficiently verify attestation signatures.
KafkaBootstrapServers string // KafkaBootstrapServers to find kafka servers to stream blocks, attestations, etc.
@ -167,10 +159,6 @@ func ConfigureBeaconChain(ctx *cli.Context) {
log.Warn("Writing SSZ states and blocks after state transitions")
cfg.WriteSSZStateTransitions = true
}
if ctx.Bool(disableForkChoiceUnsafeFlag.Name) {
log.Warn("UNSAFE: Disabled fork choice for updating chain head")
cfg.DisableForkChoice = true
}
if ctx.Bool(disableDynamicCommitteeSubnets.Name) {
log.Warn("Disabled dynamic attestation committee subnets")
cfg.DisableDynamicCommitteeSubnets = true
@ -186,27 +174,15 @@ func ConfigureBeaconChain(ctx *cli.Context) {
log.Warn("Enabling experimental kafka streaming.")
cfg.KafkaBootstrapServers = ctx.String(kafkaBootstrapServersFlag.Name)
}
if ctx.Bool(cacheFilteredBlockTreeFlag.Name) {
log.Warn("Enabled filtered block tree cache for fork choice.")
cfg.EnableBlockTreeCache = true
}
if ctx.Bool(disableUpdateHeadPerAttestation.Name) {
log.Warn("Disabled update head on per attestation basis")
cfg.DisableUpdateHeadPerAttestation = true
}
if ctx.Bool(checkHeadState.Name) {
log.Warn("Enabling check head state for chainservice")
cfg.CheckHeadState = true
}
cfg.EnableNoise = true
if ctx.Bool(disableNoiseHandshake.Name) {
log.Warn("Disabling noise handshake for peer")
cfg.EnableNoise = false
}
if ctx.Bool(dontPruneStateStartUp.Name) {
log.Warn("Not enabling state pruning upon start up")
cfg.DontPruneStateStartUp = true
}
if ctx.Bool(disableBroadcastSlashingFlag.Name) {
log.Warn("Disabling slashing broadcasting to p2p network")
cfg.DisableBroadcastSlashings = true

View File

@ -46,13 +46,6 @@ var (
Name: "disable-dynamic-committee-subnets",
Usage: "Disable dynamic committee attestation subnets.",
}
// disableForkChoiceUnsafeFlag disables using the LMD-GHOST fork choice to update
// the head of the chain based on attestations and instead accepts any valid received block
// as the chain head. UNSAFE, use with caution.
disableForkChoiceUnsafeFlag = &cli.BoolFlag{
Name: "disable-fork-choice-unsafe",
Usage: "UNSAFE: disable fork choice for determining head of the beacon chain.",
}
enableBackupWebhookFlag = &cli.BoolFlag{
Name: "enable-db-backup-webhook",
Usage: "Serve HTTP handler to initiate database backups. The handler is served on the monitoring port at path /db/backup.",
@ -61,11 +54,6 @@ var (
Name: "kafka-url",
Usage: "Stream attestations and blocks to specified kafka servers. This field is used for bootstrap.servers kafka config field.",
}
cacheFilteredBlockTreeFlag = &cli.BoolFlag{
Name: "cache-filtered-block-tree",
Usage: "Cache filtered block tree by maintaining it rather than continually recalculating on the fly, " +
"this is used for fork choice.",
}
enableLocalProtectionFlag = &cli.BoolFlag{
Name: "enable-local-protection",
Usage: "Enables functionality to prevent the validator client from signing and " +
@ -81,19 +69,11 @@ var (
Name: "disable-update-head-attestation",
Usage: "Disable update fork choice head on per attestation. See PR 4802 for details.",
}
checkHeadState = &cli.BoolFlag{
Name: "check-head-state",
Usage: "Enables the checking of head state in chainservice first before retrieving the desired state from the db.",
}
disableNoiseHandshake = &cli.BoolFlag{
Name: "disable-noise",
Usage: "This disables the beacon node from using NOISE and instead uses SECIO instead for performing handshakes between peers and " +
"securing transports between peers",
}
dontPruneStateStartUp = &cli.BoolFlag{
Name: "dont-prune-state-start-up",
Usage: "Don't prune historical states upon start up",
}
waitForSyncedFlag = &cli.BoolFlag{
Name: "wait-for-synced",
Usage: "Uses WaitForSynced for validator startup, to ensure a validator is able to communicate with the beacon node as quick as possible",
@ -195,15 +175,10 @@ var E2EValidatorFlags = []string{
var BeaconChainFlags = append(deprecatedFlags, []cli.Flag{
devModeFlag,
writeSSZStateTransitionsFlag,
disableForkChoiceUnsafeFlag,
disableDynamicCommitteeSubnets,
kafkaBootstrapServersFlag,
enableBackupWebhookFlag,
cacheFilteredBlockTreeFlag,
disableUpdateHeadPerAttestation,
checkHeadState,
disableNoiseHandshake,
dontPruneStateStartUp,
disableBroadcastSlashingFlag,
waitForSyncedFlag,
disableGRPCConnectionLogging,
@ -226,8 +201,6 @@ var BeaconChainFlags = append(deprecatedFlags, []cli.Flag{
// E2EBeaconChainFlags contains a list of the beacon chain feature flags to be tested in E2E.
var E2EBeaconChainFlags = []string{
"--cache-filtered-block-tree",
"--check-head-state",
"--attestation-aggregation-strategy=max_cover",
"--dev",
"--enable-eth1-data-majority-vote",