2019-03-21 02:57:25 +00:00
|
|
|
package featureconfig
|
|
|
|
|
|
|
|
import (
|
2020-05-31 06:44:34 +00:00
|
|
|
"github.com/urfave/cli/v2"
|
2019-03-21 02:57:25 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
var (
|
2020-11-13 01:00:05 +00:00
|
|
|
// ToledoTestnet flag for the multiclient eth2 testnet.
|
|
|
|
ToledoTestnet = &cli.BoolFlag{
|
|
|
|
Name: "toledo",
|
|
|
|
Usage: "This defines the flag through which we can run on the Toledo Multiclient Testnet",
|
|
|
|
}
|
|
|
|
// PyrmontTestnet flag for the multiclient eth2 testnet.
|
|
|
|
PyrmontTestnet = &cli.BoolFlag{
|
|
|
|
Name: "pyrmont",
|
|
|
|
Usage: "This defines the flag through which we can run on the Pyrmont Multiclient Testnet",
|
|
|
|
}
|
2020-11-06 18:02:04 +00:00
|
|
|
// Mainnet flag for easier tooling, no-op
|
|
|
|
Mainnet = &cli.BoolFlag{
|
|
|
|
Value: true,
|
|
|
|
Name: "mainnet",
|
|
|
|
Usage: "Run on Ethereum 2.0 Main Net. This is the default and can be omitted.",
|
|
|
|
}
|
2020-04-20 17:27:24 +00:00
|
|
|
devModeFlag = &cli.BoolFlag{
|
|
|
|
Name: "dev",
|
|
|
|
Usage: "Enable experimental features still in development. These features may not be stable.",
|
|
|
|
}
|
2020-03-19 21:46:44 +00:00
|
|
|
writeSSZStateTransitionsFlag = &cli.BoolFlag{
|
2019-09-24 15:19:37 +00:00
|
|
|
Name: "interop-write-ssz-state-transitions",
|
2019-09-23 23:36:12 +00:00
|
|
|
Usage: "Write ssz states to disk after attempted state transition",
|
|
|
|
}
|
2020-03-19 21:46:44 +00:00
|
|
|
kafkaBootstrapServersFlag = &cli.StringFlag{
|
2019-12-06 02:05:58 +00:00
|
|
|
Name: "kafka-url",
|
|
|
|
Usage: "Stream attestations and blocks to specified kafka servers. This field is used for bootstrap.servers kafka config field.",
|
|
|
|
}
|
2020-05-20 15:23:22 +00:00
|
|
|
enableExternalSlasherProtectionFlag = &cli.BoolFlag{
|
|
|
|
Name: "enable-external-slasher-protection",
|
|
|
|
Usage: "Enables the validator to connect to external slasher to prevent it from " +
|
|
|
|
"transmitting a slashable offence over the network.",
|
|
|
|
}
|
2020-04-20 23:16:53 +00:00
|
|
|
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",
|
|
|
|
}
|
2020-05-09 02:07:37 +00:00
|
|
|
disableLookbackFlag = &cli.BoolFlag{
|
|
|
|
Name: "disable-lookback",
|
|
|
|
Usage: "Disables use of the lookback feature and updates attestation history for validators from head to epoch 0",
|
|
|
|
}
|
2020-06-12 20:41:05 +00:00
|
|
|
disableGRPCConnectionLogging = &cli.BoolFlag{
|
|
|
|
Name: "disable-grpc-connection-logging",
|
|
|
|
Usage: "Disables displaying logs for newly connected grpc clients",
|
|
|
|
}
|
2020-06-23 04:00:38 +00:00
|
|
|
attestationAggregationStrategy = &cli.StringFlag{
|
|
|
|
Name: "attestation-aggregation-strategy",
|
|
|
|
Usage: "Which strategy to use when aggregating attestations, one of: naive, max_cover.",
|
2020-08-11 12:42:08 +00:00
|
|
|
Value: "max_cover",
|
2020-06-23 04:00:38 +00:00
|
|
|
}
|
2020-11-13 15:25:05 +00:00
|
|
|
disableBlst = &cli.BoolFlag{
|
|
|
|
Name: "disable-blst",
|
|
|
|
Usage: "Disables the new BLS library, blst, from Supranational",
|
2020-09-16 13:28:28 +00:00
|
|
|
}
|
2020-10-26 17:36:47 +00:00
|
|
|
disableEth1DataMajorityVote = &cli.BoolFlag{
|
|
|
|
Name: "disable-eth1-data-majority-vote",
|
|
|
|
Usage: "Disables the Voting With The Majority algorithm when voting for eth1data.",
|
2020-07-28 20:29:12 +00:00
|
|
|
}
|
2020-07-30 21:00:02 +00:00
|
|
|
disableAccountsV2 = &cli.BoolFlag{
|
|
|
|
Name: "disable-accounts-v2",
|
|
|
|
Usage: "Disables usage of v2 for Prysm validator accounts",
|
|
|
|
}
|
2020-08-13 17:33:57 +00:00
|
|
|
enablePeerScorer = &cli.BoolFlag{
|
|
|
|
Name: "enable-peer-scorer",
|
|
|
|
Usage: "Enable experimental P2P peer scorer",
|
|
|
|
}
|
2020-09-24 15:03:35 +00:00
|
|
|
checkPtInfoCache = &cli.BoolFlag{
|
|
|
|
Name: "use-check-point-cache",
|
|
|
|
Usage: "Enables check point info caching",
|
2020-08-24 22:11:45 +00:00
|
|
|
}
|
2020-10-19 18:22:44 +00:00
|
|
|
disablePruningDepositProofs = &cli.BoolFlag{
|
|
|
|
Name: "disable-pruning-deposit-proofs",
|
|
|
|
Usage: "Disables pruning deposit proofs when they are no longer needed." +
|
|
|
|
"This will probably significantly increase the amount of memory taken up by deposits.",
|
2020-10-12 18:10:49 +00:00
|
|
|
}
|
2020-11-06 15:54:20 +00:00
|
|
|
enableSyncBacktracking = &cli.BoolFlag{
|
|
|
|
Name: "enable-sync-backtracking",
|
|
|
|
Usage: "Enable experimental fork exploration backtracking algorithm",
|
|
|
|
}
|
2019-03-21 02:57:25 +00:00
|
|
|
)
|
|
|
|
|
2020-04-20 17:27:24 +00:00
|
|
|
// devModeFlags holds list of flags that are set when development mode is on.
|
2020-06-16 18:06:32 +00:00
|
|
|
var devModeFlags = []cli.Flag{
|
2020-11-06 15:54:20 +00:00
|
|
|
enableSyncBacktracking,
|
2020-06-16 18:06:32 +00:00
|
|
|
}
|
2020-04-20 17:27:24 +00:00
|
|
|
|
2019-03-21 02:57:25 +00:00
|
|
|
// ValidatorFlags contains a list of all the feature flags that apply to the validator client.
|
2019-10-29 15:30:14 +00:00
|
|
|
var ValidatorFlags = append(deprecatedFlags, []cli.Flag{
|
2020-05-20 15:23:22 +00:00
|
|
|
enableExternalSlasherProtectionFlag,
|
2020-04-20 23:16:53 +00:00
|
|
|
waitForSyncedFlag,
|
2020-11-13 01:00:05 +00:00
|
|
|
ToledoTestnet,
|
|
|
|
PyrmontTestnet,
|
2020-11-06 18:02:04 +00:00
|
|
|
Mainnet,
|
2020-07-30 21:00:02 +00:00
|
|
|
disableAccountsV2,
|
2020-11-13 15:25:05 +00:00
|
|
|
disableBlst,
|
2019-10-29 15:30:14 +00:00
|
|
|
}...)
|
2019-03-21 02:57:25 +00:00
|
|
|
|
2020-04-22 15:53:09 +00:00
|
|
|
// SlasherFlags contains a list of all the feature flags that apply to the slasher client.
|
2020-05-06 22:17:36 +00:00
|
|
|
var SlasherFlags = append(deprecatedFlags, []cli.Flag{
|
2020-05-09 02:07:37 +00:00
|
|
|
disableLookbackFlag,
|
2020-11-13 01:00:05 +00:00
|
|
|
ToledoTestnet,
|
|
|
|
PyrmontTestnet,
|
2020-11-06 18:02:04 +00:00
|
|
|
Mainnet,
|
2020-05-06 22:17:36 +00:00
|
|
|
}...)
|
2020-04-22 15:53:09 +00:00
|
|
|
|
2020-01-27 02:42:10 +00:00
|
|
|
// E2EValidatorFlags contains a list of the validator feature flags to be tested in E2E.
|
|
|
|
var E2EValidatorFlags = []string{
|
2020-04-20 23:16:53 +00:00
|
|
|
"--wait-for-synced",
|
2020-01-27 02:42:10 +00:00
|
|
|
}
|
|
|
|
|
2019-03-21 02:57:25 +00:00
|
|
|
// BeaconChainFlags contains a list of all the feature flags that apply to the beacon-chain client.
|
2019-10-29 15:30:14 +00:00
|
|
|
var BeaconChainFlags = append(deprecatedFlags, []cli.Flag{
|
2020-04-20 17:27:24 +00:00
|
|
|
devModeFlag,
|
2019-09-23 23:36:12 +00:00
|
|
|
writeSSZStateTransitionsFlag,
|
2019-12-06 02:05:58 +00:00
|
|
|
kafkaBootstrapServersFlag,
|
2020-04-20 23:16:53 +00:00
|
|
|
waitForSyncedFlag,
|
2020-06-12 20:41:05 +00:00
|
|
|
disableGRPCConnectionLogging,
|
2020-06-23 04:00:38 +00:00
|
|
|
attestationAggregationStrategy,
|
2020-11-13 01:00:05 +00:00
|
|
|
ToledoTestnet,
|
|
|
|
PyrmontTestnet,
|
2020-11-06 18:02:04 +00:00
|
|
|
Mainnet,
|
2020-11-13 15:25:05 +00:00
|
|
|
disableBlst,
|
2020-10-26 17:36:47 +00:00
|
|
|
disableEth1DataMajorityVote,
|
2020-08-13 17:33:57 +00:00
|
|
|
enablePeerScorer,
|
2020-09-24 15:03:35 +00:00
|
|
|
checkPtInfoCache,
|
2020-10-19 18:22:44 +00:00
|
|
|
disablePruningDepositProofs,
|
2020-11-06 15:54:20 +00:00
|
|
|
enableSyncBacktracking,
|
2019-10-29 15:30:14 +00:00
|
|
|
}...)
|
2020-01-27 02:42:10 +00:00
|
|
|
|
|
|
|
// E2EBeaconChainFlags contains a list of the beacon chain feature flags to be tested in E2E.
|
|
|
|
var E2EBeaconChainFlags = []string{
|
2020-06-23 04:00:38 +00:00
|
|
|
"--attestation-aggregation-strategy=max_cover",
|
2020-06-16 18:06:32 +00:00
|
|
|
"--dev",
|
2020-08-24 22:11:45 +00:00
|
|
|
"--use-check-point-cache",
|
2020-01-27 02:42:10 +00:00
|
|
|
}
|