mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2024-12-25 21:07:18 +00:00
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:
parent
a005c77b3f
commit
e5ed2cd141
@ -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.
|
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.
|
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.
|
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.
|
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.
|
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.
|
EnableAccountsV2 bool // EnableAccountsV2 for Prysm validator clients.
|
||||||
InitSyncVerbose bool // InitSyncVerbose logs every processed block during initial syncing.
|
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.
|
EnablePeerScorer bool // EnablePeerScorer enables experimental peer scoring in p2p.
|
||||||
EnablePruningDepositProofs bool // EnablePruningDepositProofs enables pruning deposit proofs which significantly reduces the size of a deposit
|
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.
|
// Logging related toggles.
|
||||||
DisableGRPCConnectionLogs bool // Disables logging when a new grpc client has connected.
|
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.
|
EnableSSZCache bool // EnableSSZCache see https://github.com/prysmaticlabs/prysm/pull/4558.
|
||||||
EnableEth1DataVoteCache bool // EnableEth1DataVoteCache; see https://github.com/prysmaticlabs/prysm/issues/3106.
|
EnableEth1DataVoteCache bool // EnableEth1DataVoteCache; see https://github.com/prysmaticlabs/prysm/issues/3106.
|
||||||
EnableSlasherConnection bool // EnableSlasher enable retrieval of slashing events from a slasher instance.
|
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.
|
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.
|
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")
|
log.Warn("Writing SSZ states and blocks after state transitions")
|
||||||
cfg.WriteSSZStateTransitions = true
|
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) {
|
if ctx.Bool(disableDynamicCommitteeSubnets.Name) {
|
||||||
log.Warn("Disabled dynamic attestation committee subnets")
|
log.Warn("Disabled dynamic attestation committee subnets")
|
||||||
cfg.DisableDynamicCommitteeSubnets = true
|
cfg.DisableDynamicCommitteeSubnets = true
|
||||||
@ -186,27 +174,15 @@ func ConfigureBeaconChain(ctx *cli.Context) {
|
|||||||
log.Warn("Enabling experimental kafka streaming.")
|
log.Warn("Enabling experimental kafka streaming.")
|
||||||
cfg.KafkaBootstrapServers = ctx.String(kafkaBootstrapServersFlag.Name)
|
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) {
|
if ctx.Bool(disableUpdateHeadPerAttestation.Name) {
|
||||||
log.Warn("Disabled update head on per attestation basis")
|
log.Warn("Disabled update head on per attestation basis")
|
||||||
cfg.DisableUpdateHeadPerAttestation = true
|
cfg.DisableUpdateHeadPerAttestation = true
|
||||||
}
|
}
|
||||||
if ctx.Bool(checkHeadState.Name) {
|
|
||||||
log.Warn("Enabling check head state for chainservice")
|
|
||||||
cfg.CheckHeadState = true
|
|
||||||
}
|
|
||||||
cfg.EnableNoise = true
|
cfg.EnableNoise = true
|
||||||
if ctx.Bool(disableNoiseHandshake.Name) {
|
if ctx.Bool(disableNoiseHandshake.Name) {
|
||||||
log.Warn("Disabling noise handshake for peer")
|
log.Warn("Disabling noise handshake for peer")
|
||||||
cfg.EnableNoise = false
|
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) {
|
if ctx.Bool(disableBroadcastSlashingFlag.Name) {
|
||||||
log.Warn("Disabling slashing broadcasting to p2p network")
|
log.Warn("Disabling slashing broadcasting to p2p network")
|
||||||
cfg.DisableBroadcastSlashings = true
|
cfg.DisableBroadcastSlashings = true
|
||||||
|
@ -46,13 +46,6 @@ var (
|
|||||||
Name: "disable-dynamic-committee-subnets",
|
Name: "disable-dynamic-committee-subnets",
|
||||||
Usage: "Disable dynamic committee attestation 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{
|
enableBackupWebhookFlag = &cli.BoolFlag{
|
||||||
Name: "enable-db-backup-webhook",
|
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.",
|
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",
|
Name: "kafka-url",
|
||||||
Usage: "Stream attestations and blocks to specified kafka servers. This field is used for bootstrap.servers kafka config field.",
|
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{
|
enableLocalProtectionFlag = &cli.BoolFlag{
|
||||||
Name: "enable-local-protection",
|
Name: "enable-local-protection",
|
||||||
Usage: "Enables functionality to prevent the validator client from signing and " +
|
Usage: "Enables functionality to prevent the validator client from signing and " +
|
||||||
@ -81,19 +69,11 @@ var (
|
|||||||
Name: "disable-update-head-attestation",
|
Name: "disable-update-head-attestation",
|
||||||
Usage: "Disable update fork choice head on per attestation. See PR 4802 for details.",
|
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{
|
disableNoiseHandshake = &cli.BoolFlag{
|
||||||
Name: "disable-noise",
|
Name: "disable-noise",
|
||||||
Usage: "This disables the beacon node from using NOISE and instead uses SECIO instead for performing handshakes between peers and " +
|
Usage: "This disables the beacon node from using NOISE and instead uses SECIO instead for performing handshakes between peers and " +
|
||||||
"securing transports between peers",
|
"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{
|
waitForSyncedFlag = &cli.BoolFlag{
|
||||||
Name: "wait-for-synced",
|
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",
|
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{
|
var BeaconChainFlags = append(deprecatedFlags, []cli.Flag{
|
||||||
devModeFlag,
|
devModeFlag,
|
||||||
writeSSZStateTransitionsFlag,
|
writeSSZStateTransitionsFlag,
|
||||||
disableForkChoiceUnsafeFlag,
|
|
||||||
disableDynamicCommitteeSubnets,
|
disableDynamicCommitteeSubnets,
|
||||||
kafkaBootstrapServersFlag,
|
kafkaBootstrapServersFlag,
|
||||||
enableBackupWebhookFlag,
|
enableBackupWebhookFlag,
|
||||||
cacheFilteredBlockTreeFlag,
|
|
||||||
disableUpdateHeadPerAttestation,
|
|
||||||
checkHeadState,
|
|
||||||
disableNoiseHandshake,
|
disableNoiseHandshake,
|
||||||
dontPruneStateStartUp,
|
|
||||||
disableBroadcastSlashingFlag,
|
disableBroadcastSlashingFlag,
|
||||||
waitForSyncedFlag,
|
waitForSyncedFlag,
|
||||||
disableGRPCConnectionLogging,
|
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.
|
// E2EBeaconChainFlags contains a list of the beacon chain feature flags to be tested in E2E.
|
||||||
var E2EBeaconChainFlags = []string{
|
var E2EBeaconChainFlags = []string{
|
||||||
"--cache-filtered-block-tree",
|
|
||||||
"--check-head-state",
|
|
||||||
"--attestation-aggregation-strategy=max_cover",
|
"--attestation-aggregation-strategy=max_cover",
|
||||||
"--dev",
|
"--dev",
|
||||||
"--enable-eth1-data-majority-vote",
|
"--enable-eth1-data-majority-vote",
|
||||||
|
Loading…
Reference in New Issue
Block a user