mirror of
https://github.com/OffchainLabs/prysm.git
synced 2026-01-08 23:18:15 -05:00
Refactor validator client help. (#13401)
* Define `cli.App` without mutation. No functional change. * `usage.go`: Clean `appHelpTemplate`. No functional change is added. Modifications consist in adding prefix/suffix `-` to improve readability of the template without adding new lines in template inference. We now see some inconsistencies of the template: - `if .App.Version` is around the `AUTHOR` section. - `if .App.Copyright` is around both `COPYRIGHT` and `VERSION` sections. - `if len .App.Authors` is around nothing. * `usage.go`: Surround version and author correctly. * `usage.go`: `AUTHOR` ==> `AUTHORS` * `usage.go`: `GLOBAL` --> `global`. * `--grpc-max-msg-size`: Remove double default. * VC: Standardize help message. - Flags help begin with a capital letter and end with a period. - If a flag help begins with a verb, it is conjugated. - Expermitemtal, danger etc... mentions are between parenthesis. * VC help message: Wrap too long lines.
This commit is contained in:
@@ -14,7 +14,7 @@ var log = logrus.WithField("prefix", "db")
|
||||
var Commands = &cli.Command{
|
||||
Name: "db",
|
||||
Category: "db",
|
||||
Usage: "defines commands for interacting with the Ethereum Beacon Node database",
|
||||
Usage: "Defines commands for interacting with the Ethereum Beacon Node database",
|
||||
Subcommands: []*cli.Command{
|
||||
{
|
||||
Name: "restore",
|
||||
|
||||
@@ -80,7 +80,7 @@ var (
|
||||
// MonitoringPortFlag defines the http port used to serve prometheus metrics.
|
||||
MonitoringPortFlag = &cli.IntFlag{
|
||||
Name: "monitoring-port",
|
||||
Usage: "Port used to listening and respond metrics for prometheus.",
|
||||
Usage: "Port used to listening and respond metrics for Prometheus.",
|
||||
Value: 8080,
|
||||
}
|
||||
// CertFlag defines a flag for the node's TLS certificate.
|
||||
|
||||
51
cmd/flags.go
51
cmd/flags.go
@@ -15,12 +15,12 @@ var (
|
||||
// MinimalConfigFlag declares to use the minimal config for running Ethereum consensus.
|
||||
MinimalConfigFlag = &cli.BoolFlag{
|
||||
Name: "minimal-config",
|
||||
Usage: "Use minimal config with parameters as defined in the spec.",
|
||||
Usage: "Uses minimal config with parameters as defined in the spec.",
|
||||
}
|
||||
// E2EConfigFlag declares to use a testing specific config for running Ethereum consensus in end-to-end testing.
|
||||
E2EConfigFlag = &cli.BoolFlag{
|
||||
Name: "e2e-config",
|
||||
Usage: "Use the E2E testing config, only for use within end-to-end testing.",
|
||||
Usage: "Enables the E2E testing config, only for use within end-to-end testing.",
|
||||
}
|
||||
// RPCMaxPageSizeFlag defines the maximum numbers per page returned in RPC responses from this
|
||||
// beacon node (default: 500).
|
||||
@@ -31,34 +31,35 @@ var (
|
||||
// VerbosityFlag defines the logrus configuration.
|
||||
VerbosityFlag = &cli.StringFlag{
|
||||
Name: "verbosity",
|
||||
Usage: "Logging verbosity (trace, debug, info=default, warn, error, fatal, panic)",
|
||||
Usage: "Logging verbosity. (trace, debug, info, warn, error, fatal, panic)",
|
||||
Value: "info",
|
||||
}
|
||||
// DataDirFlag defines a path on disk where Prysm databases are stored.
|
||||
DataDirFlag = &cli.StringFlag{
|
||||
Name: "datadir",
|
||||
Usage: "Data directory for the databases",
|
||||
Usage: "Data directory for the databases.",
|
||||
Value: DefaultDataDir(),
|
||||
}
|
||||
// EnableBackupWebhookFlag for users to trigger db backups via an HTTP webhook.
|
||||
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.",
|
||||
Name: "enable-db-backup-webhook",
|
||||
Usage: `Serves HTTP handler to initiate database backups.
|
||||
The handler is served on the monitoring port at path /db/backup.`,
|
||||
}
|
||||
// BackupWebhookOutputDir to customize the output directory for db backups.
|
||||
BackupWebhookOutputDir = &cli.StringFlag{
|
||||
Name: "db-backup-output-dir",
|
||||
Usage: "Output directory for db backups",
|
||||
Usage: "Output directory for db backups.",
|
||||
}
|
||||
// EnableTracingFlag defines a flag to enable p2p message tracing.
|
||||
EnableTracingFlag = &cli.BoolFlag{
|
||||
Name: "enable-tracing",
|
||||
Usage: "Enable request tracing.",
|
||||
Usage: "Enables request tracing.",
|
||||
}
|
||||
// TracingProcessNameFlag defines a flag to specify a process name.
|
||||
TracingProcessNameFlag = &cli.StringFlag{
|
||||
Name: "tracing-process-name",
|
||||
Usage: "The name to apply to tracing tag \"process_name\"",
|
||||
Usage: "Name to apply to tracing tag `process_name`.",
|
||||
}
|
||||
// TracingEndpointFlag flag defines the http endpoint for serving traces to Jaeger.
|
||||
TracingEndpointFlag = &cli.StringFlag{
|
||||
@@ -70,7 +71,7 @@ var (
|
||||
// messages are sampled for tracing.
|
||||
TraceSampleFractionFlag = &cli.Float64Flag{
|
||||
Name: "trace-sample-fraction",
|
||||
Usage: "Indicate what fraction of p2p messages are sampled for tracing.",
|
||||
Usage: "Indicates what fraction of p2p messages are sampled for tracing.",
|
||||
Value: 0.20,
|
||||
}
|
||||
// MonitoringHostFlag defines the host used to serve prometheus metrics.
|
||||
@@ -82,13 +83,13 @@ var (
|
||||
// DisableMonitoringFlag defines a flag to disable the metrics collection.
|
||||
DisableMonitoringFlag = &cli.BoolFlag{
|
||||
Name: "disable-monitoring",
|
||||
Usage: "Disable monitoring service.",
|
||||
Usage: "Disables monitoring service.",
|
||||
}
|
||||
// NoDiscovery specifies whether we are running a local network and have no need for connecting
|
||||
// to the bootstrap nodes in the cloud
|
||||
NoDiscovery = &cli.BoolFlag{
|
||||
Name: "no-discovery",
|
||||
Usage: "Enable only local network p2p and do not connect to cloud bootstrap nodes.",
|
||||
Usage: "Enable only local network p2p and do not connect to cloud bootstrap nodes",
|
||||
}
|
||||
// StaticPeers specifies a set of peers to connect to explicitly.
|
||||
StaticPeers = &cli.StringSliceFlag{
|
||||
@@ -185,17 +186,17 @@ var (
|
||||
// ForceClearDB removes any previously stored data at the data directory.
|
||||
ForceClearDB = &cli.BoolFlag{
|
||||
Name: "force-clear-db",
|
||||
Usage: "Clear any previously stored data at the data directory",
|
||||
Usage: "Clears any previously stored data at the data directory.",
|
||||
}
|
||||
// ClearDB prompts user to see if they want to remove any previously stored data at the data directory.
|
||||
ClearDB = &cli.BoolFlag{
|
||||
Name: "clear-db",
|
||||
Usage: "Prompt for clearing any previously stored data at the data directory",
|
||||
Usage: "Prompt for clearing any previously stored data at the data directory.",
|
||||
}
|
||||
// LogFormat specifies the log output format.
|
||||
LogFormat = &cli.StringFlag{
|
||||
Name: "log-format",
|
||||
Usage: "Specify log formatting. Supports: text, json, fluentd, journald.",
|
||||
Usage: "Specifies log formatting. Supports: text, json, fluentd, journald.",
|
||||
Value: "text",
|
||||
}
|
||||
// MaxGoroutines specifies the maximum amount of goroutines tolerated, before a status check fails.
|
||||
@@ -207,7 +208,7 @@ var (
|
||||
// LogFileName specifies the log output file name.
|
||||
LogFileName = &cli.StringFlag{
|
||||
Name: "log-file",
|
||||
Usage: "Specify log file name, relative or absolute",
|
||||
Usage: "Specifies log file name, relative or absolute.",
|
||||
}
|
||||
// EnableUPnPFlag specifies if UPnP should be enabled or not. The default value is false.
|
||||
EnableUPnPFlag = &cli.BoolFlag{
|
||||
@@ -217,27 +218,27 @@ var (
|
||||
// ConfigFileFlag specifies the filepath to load flag values.
|
||||
ConfigFileFlag = &cli.StringFlag{
|
||||
Name: "config-file",
|
||||
Usage: "The filepath to a yaml file with flag values",
|
||||
Usage: "Filepath to a yaml file with flag values.",
|
||||
}
|
||||
// ChainConfigFileFlag specifies the filepath to load flag values.
|
||||
ChainConfigFileFlag = &cli.StringFlag{
|
||||
Name: "chain-config-file",
|
||||
Usage: "The path to a YAML file with chain config values",
|
||||
Usage: "Path to a YAML file with chain config values.",
|
||||
}
|
||||
// GrpcMaxCallRecvMsgSizeFlag defines the max call message size for GRPC
|
||||
GrpcMaxCallRecvMsgSizeFlag = &cli.IntFlag{
|
||||
Name: "grpc-max-msg-size",
|
||||
Usage: "Integer to define max receive message call size. If serving a public gRPC server, " +
|
||||
"set this to a more reasonable size to avoid resource exhaustion from large messages. " +
|
||||
"Validators with as many as 10000 keys can be run with a max message size of less than " +
|
||||
"50Mb. The default here is set to a very high value for local users. " +
|
||||
"(default: 2147483647 (2Gi)).",
|
||||
Usage: `Integer to define max receive message call size (in bytes).
|
||||
If serving a public gRPC server, set this to a more reasonable size to avoid
|
||||
resource exhaustion from large messages.
|
||||
Validators with as many as 10000 keys can be run with a max message size of less than
|
||||
50Mb. The default here is set to a very high value for local users.`,
|
||||
Value: math.MaxInt32,
|
||||
}
|
||||
// AcceptTosFlag specifies user acceptance of ToS for non-interactive environments.
|
||||
AcceptTosFlag = &cli.BoolFlag{
|
||||
Name: "accept-terms-of-use",
|
||||
Usage: "Accept Terms and Conditions (for non-interactive environments)",
|
||||
Usage: "Accepts Terms and Conditions (for non-interactive environments).",
|
||||
}
|
||||
// ValidatorMonitorIndicesFlag specifies a list of validator indices to
|
||||
// track for performance updates
|
||||
@@ -261,7 +262,7 @@ var (
|
||||
// ApiTimeoutFlag specifies the timeout value for API requests in seconds. A timeout of zero means no timeout.
|
||||
ApiTimeoutFlag = &cli.IntFlag{
|
||||
Name: "api-timeout",
|
||||
Usage: "Specifies the timeout value for API requests in seconds",
|
||||
Usage: "Specifies the timeout value for API requests in seconds.",
|
||||
Value: 120,
|
||||
}
|
||||
// JwtOutputFileFlag specifies the JWT file path that gets generated into when invoked by generate-jwt-secret.
|
||||
|
||||
@@ -17,7 +17,7 @@ var log = logrus.WithField("prefix", "accounts")
|
||||
var Commands = &cli.Command{
|
||||
Name: "accounts",
|
||||
Category: "accounts",
|
||||
Usage: "defines commands for interacting with Ethereum validator accounts",
|
||||
Usage: "Defines commands for interacting with Ethereum validator accounts.",
|
||||
Subcommands: []*cli.Command{
|
||||
{
|
||||
Name: "delete",
|
||||
|
||||
@@ -14,7 +14,7 @@ var log = logrus.WithField("prefix", "db")
|
||||
var Commands = &cli.Command{
|
||||
Name: "db",
|
||||
Category: "db",
|
||||
Usage: "defines commands for interacting with the Prysm validator database",
|
||||
Usage: "Defines commands for interacting with the Prysm validator database.",
|
||||
Subcommands: []*cli.Command{
|
||||
{
|
||||
Name: "restore",
|
||||
|
||||
@@ -24,26 +24,26 @@ var (
|
||||
// DisableAccountMetricsFlag disables the prometheus metrics for validator accounts, default false.
|
||||
DisableAccountMetricsFlag = &cli.BoolFlag{
|
||||
Name: "disable-account-metrics",
|
||||
Usage: "Disable prometheus metrics for validator accounts. Operators with high volumes " +
|
||||
"of validating keys may wish to disable granular prometheus metrics as it increases " +
|
||||
"the data cardinality.",
|
||||
Usage: `Disables prometheus metrics for validator accounts. Operators with high volumes
|
||||
of validating keys may wish to disable granular prometheus metrics as it increases
|
||||
the data cardinality.`,
|
||||
}
|
||||
// BeaconRPCProviderFlag defines a beacon node RPC endpoint.
|
||||
BeaconRPCProviderFlag = &cli.StringFlag{
|
||||
Name: "beacon-rpc-provider",
|
||||
Usage: "Beacon node RPC provider endpoint",
|
||||
Usage: "Beacon node RPC provider endpoint.",
|
||||
Value: "127.0.0.1:4000",
|
||||
}
|
||||
// BeaconRPCGatewayProviderFlag defines a beacon node JSON-RPC endpoint.
|
||||
BeaconRPCGatewayProviderFlag = &cli.StringFlag{
|
||||
Name: "beacon-rpc-gateway-provider",
|
||||
Usage: "Beacon node RPC gateway provider endpoint",
|
||||
Usage: "Beacon node RPC gateway provider endpoint.",
|
||||
Value: "127.0.0.1:3500",
|
||||
}
|
||||
// BeaconRESTApiProviderFlag defines a beacon node REST API endpoint.
|
||||
BeaconRESTApiProviderFlag = &cli.StringFlag{
|
||||
Name: "beacon-rest-api-provider",
|
||||
Usage: "Beacon node REST API provider endpoint",
|
||||
Usage: "Beacon node REST API provider endpoint.",
|
||||
Value: "http://127.0.0.1:3500",
|
||||
}
|
||||
// CertFlag defines a flag for the node's TLS certificate.
|
||||
@@ -54,25 +54,25 @@ var (
|
||||
// EnableRPCFlag enables controlling the validator client via gRPC (without web UI).
|
||||
EnableRPCFlag = &cli.BoolFlag{
|
||||
Name: "rpc",
|
||||
Usage: "Enables the RPC server for the validator client (without Web UI)",
|
||||
Usage: "Enables the RPC server for the validator client (without Web UI).",
|
||||
Value: false,
|
||||
}
|
||||
// RPCHost defines the host on which the RPC server should listen.
|
||||
RPCHost = &cli.StringFlag{
|
||||
Name: "rpc-host",
|
||||
Usage: "Host on which the RPC server should listen",
|
||||
Usage: "Host on which the RPC server should listen.",
|
||||
Value: "127.0.0.1",
|
||||
}
|
||||
// RPCPort defines a validator client RPC port to open.
|
||||
RPCPort = &cli.IntFlag{
|
||||
Name: "rpc-port",
|
||||
Usage: "RPC port exposed by a validator client",
|
||||
Usage: "RPC port exposed by a validator client.",
|
||||
Value: 7000,
|
||||
}
|
||||
// SlasherRPCProviderFlag defines a slasher node RPC endpoint.
|
||||
SlasherRPCProviderFlag = &cli.StringFlag{
|
||||
Name: "slasher-rpc-provider",
|
||||
Usage: "Slasher node RPC provider endpoint",
|
||||
Usage: "Slasher node RPC provider endpoint.",
|
||||
Value: "127.0.0.1:4002",
|
||||
}
|
||||
// SlasherCertFlag defines a flag for the slasher node's TLS certificate.
|
||||
@@ -83,85 +83,86 @@ var (
|
||||
// DisablePenaltyRewardLogFlag defines the ability to not log reward/penalty information during deployment
|
||||
DisablePenaltyRewardLogFlag = &cli.BoolFlag{
|
||||
Name: "disable-rewards-penalties-logging",
|
||||
Usage: "Disable reward/penalty logging during cluster deployment",
|
||||
Usage: "Disables reward/penalty logging during cluster deployment.",
|
||||
}
|
||||
// GraffitiFlag defines the graffiti value included in proposed blocks
|
||||
GraffitiFlag = &cli.StringFlag{
|
||||
Name: "graffiti",
|
||||
Usage: "String to include in proposed blocks",
|
||||
Usage: "String to include in proposed blocks.",
|
||||
}
|
||||
// GrpcRetriesFlag defines the number of times to retry a failed gRPC request.
|
||||
GrpcRetriesFlag = &cli.UintFlag{
|
||||
Name: "grpc-retries",
|
||||
Usage: "Number of attempts to retry gRPC requests",
|
||||
Usage: "Number of attempts to retry gRPC requests.",
|
||||
Value: 5,
|
||||
}
|
||||
// GrpcRetryDelayFlag defines the interval to retry a failed gRPC request.
|
||||
GrpcRetryDelayFlag = &cli.DurationFlag{
|
||||
Name: "grpc-retry-delay",
|
||||
Usage: "The amount of time between gRPC retry requests.",
|
||||
Usage: "Amount of time between gRPC retry requests.",
|
||||
Value: 1 * time.Second,
|
||||
}
|
||||
// GrpcHeadersFlag defines a list of headers to send with all gRPC requests.
|
||||
GrpcHeadersFlag = &cli.StringFlag{
|
||||
Name: "grpc-headers",
|
||||
Usage: "A comma separated list of key value pairs to pass as gRPC headers for all gRPC " +
|
||||
"calls. Example: --grpc-headers=key=value",
|
||||
Usage: `Comma separated list of key value pairs to pass as gRPC headers for all gRPC calls.
|
||||
Example: --grpc-headers=key=value`,
|
||||
}
|
||||
// GRPCGatewayHost specifies a gRPC gateway host for the validator client.
|
||||
GRPCGatewayHost = &cli.StringFlag{
|
||||
Name: "grpc-gateway-host",
|
||||
Usage: "The host on which the gateway server runs on",
|
||||
Usage: "Host on which the gateway server runs on.",
|
||||
Value: DefaultGatewayHost,
|
||||
}
|
||||
// GRPCGatewayPort enables a gRPC gateway to be exposed for the validator client.
|
||||
GRPCGatewayPort = &cli.IntFlag{
|
||||
Name: "grpc-gateway-port",
|
||||
Usage: "Enable gRPC gateway for JSON requests",
|
||||
Usage: "Enables gRPC gateway for JSON requests.",
|
||||
Value: 7500,
|
||||
}
|
||||
// GPRCGatewayCorsDomain serves preflight requests when serving gRPC JSON gateway.
|
||||
GPRCGatewayCorsDomain = &cli.StringFlag{
|
||||
Name: "grpc-gateway-corsdomain",
|
||||
Usage: "Comma separated list of domains from which to accept cross origin requests " +
|
||||
"(browser enforced). This flag has no effect if not used with --grpc-gateway-port.",
|
||||
Usage: `Comma separated list of domains from which to accept cross origin requests (browser enforced).
|
||||
This flag has no effect if not used with --grpc-gateway-port.
|
||||
`,
|
||||
Value: "http://localhost:7500,http://127.0.0.1:7500,http://0.0.0.0:7500,http://localhost:4242,http://127.0.0.1:4242,http://localhost:4200,http://0.0.0.0:4242,http://127.0.0.1:4200,http://0.0.0.0:4200,http://localhost:3000,http://0.0.0.0:3000,http://127.0.0.1:3000"}
|
||||
// MonitoringPortFlag defines the http port used to serve prometheus metrics.
|
||||
MonitoringPortFlag = &cli.IntFlag{
|
||||
Name: "monitoring-port",
|
||||
Usage: "Port used to listening and respond metrics for prometheus.",
|
||||
Usage: "Port used to listening and respond metrics for Prometheus.",
|
||||
Value: 8081,
|
||||
}
|
||||
// WalletDirFlag defines the path to a wallet directory for Prysm accounts.
|
||||
WalletDirFlag = &cli.StringFlag{
|
||||
Name: "wallet-dir",
|
||||
Usage: "Path to a wallet directory on-disk for Prysm validator accounts",
|
||||
Usage: "Path to a wallet directory on-disk for Prysm validator accounts.",
|
||||
Value: filepath.Join(DefaultValidatorDir(), WalletDefaultDirName),
|
||||
}
|
||||
// AccountPasswordFileFlag is path to a file containing a password for a validator account.
|
||||
AccountPasswordFileFlag = &cli.StringFlag{
|
||||
Name: "account-password-file",
|
||||
Usage: "Path to a plain-text, .txt file containing a password for a validator account",
|
||||
Usage: "Path to a plain-text, .txt file containing a password for a validator account.",
|
||||
}
|
||||
// WalletPasswordFileFlag is the path to a file containing your wallet password.
|
||||
WalletPasswordFileFlag = &cli.StringFlag{
|
||||
Name: "wallet-password-file",
|
||||
Usage: "Path to a plain-text, .txt file containing your wallet password",
|
||||
Usage: "Path to a plain-text, .txt file containing your wallet password.",
|
||||
}
|
||||
// Mnemonic25thWordFileFlag defines a path to a file containing a "25th" word mnemonic passphrase for advanced users.
|
||||
Mnemonic25thWordFileFlag = &cli.StringFlag{
|
||||
Name: "mnemonic-25th-word-file",
|
||||
Usage: "(Advanced) Path to a plain-text, .txt file containing a 25th word passphrase for your mnemonic for HD wallets",
|
||||
Usage: "(Advanced) Path to a plain-text, `.txt` file containing a 25th word passphrase for your mnemonic for HD wallets.",
|
||||
}
|
||||
// SkipMnemonic25thWordCheckFlag allows for skipping a check for mnemonic 25th word passphrases for HD wallets.
|
||||
SkipMnemonic25thWordCheckFlag = &cli.StringFlag{
|
||||
Name: "skip-mnemonic-25th-word-check",
|
||||
Usage: "Allows for skipping the check for a mnemonic 25th word passphrase for HD wallets",
|
||||
Usage: "Allows for skipping the check for a mnemonic 25th word passphrase for HD wallets.",
|
||||
}
|
||||
// ImportPrivateKeyFileFlag allows for directly importing a private key hex string as an account.
|
||||
ImportPrivateKeyFileFlag = &cli.StringFlag{
|
||||
Name: "import-private-key-file",
|
||||
Usage: "Path to a plain-text, .txt file containing a hex string representation of a private key to import",
|
||||
Usage: "Path to a plain-text, .txt file containing a hex string representation of a private key to import.",
|
||||
}
|
||||
// MnemonicFileFlag is used to enter a file to mnemonic phrase for new wallet creation, non-interactively.
|
||||
MnemonicFileFlag = &cli.StringFlag{
|
||||
@@ -171,113 +172,113 @@ var (
|
||||
// MnemonicLanguageFlag is used to specify the language of the mnemonic.
|
||||
MnemonicLanguageFlag = &cli.StringFlag{
|
||||
Name: "mnemonic-language",
|
||||
Usage: "Allows specifying mnemonic language. Supported languages are: english|chinese_traditional|chinese_simplified|czech|french|japanese|korean|italian|spanish",
|
||||
Usage: "Allows specifying mnemonic language. Supported languages are: english|chinese_traditional|chinese_simplified|czech|french|japanese|korean|italian|spanish.",
|
||||
}
|
||||
// ShowDepositDataFlag for accounts.
|
||||
ShowDepositDataFlag = &cli.BoolFlag{
|
||||
Name: "show-deposit-data",
|
||||
Usage: "Display raw eth1 tx deposit data for validator accounts",
|
||||
Usage: "Displays raw eth1 tx deposit data for validator accounts.",
|
||||
Value: false,
|
||||
}
|
||||
// ShowPrivateKeysFlag for accounts.
|
||||
ShowPrivateKeysFlag = &cli.BoolFlag{
|
||||
Name: "show-private-keys",
|
||||
Usage: "Display the private keys for validator accounts",
|
||||
Usage: "Displays the private keys for validator accounts.",
|
||||
Value: false,
|
||||
}
|
||||
// ListValidatorIndices for accounts.
|
||||
ListValidatorIndices = &cli.BoolFlag{
|
||||
Name: "list-validator-indices",
|
||||
Usage: "List validator indices",
|
||||
Usage: "Lists validator indices.",
|
||||
Value: false,
|
||||
}
|
||||
// NumAccountsFlag defines the amount of accounts to generate for derived wallets.
|
||||
NumAccountsFlag = &cli.IntFlag{
|
||||
Name: "num-accounts",
|
||||
Usage: "Number of accounts to generate for derived wallets",
|
||||
Usage: "Number of accounts to generate for derived wallets.",
|
||||
Value: 1,
|
||||
}
|
||||
// DeletePublicKeysFlag defines a comma-separated list of hex string public keys
|
||||
// for accounts which a user desires to delete from their wallet.
|
||||
DeletePublicKeysFlag = &cli.StringFlag{
|
||||
Name: "delete-public-keys",
|
||||
Usage: "Comma-separated list of public key hex strings to specify which validator accounts to delete",
|
||||
Usage: "Comma separated list of public key hex strings to specify which validator accounts to delete.",
|
||||
Value: "",
|
||||
}
|
||||
// BackupPublicKeysFlag defines a comma-separated list of hex string public keys
|
||||
// for accounts which a user desires to backup from their wallet.
|
||||
BackupPublicKeysFlag = &cli.StringFlag{
|
||||
Name: "backup-public-keys",
|
||||
Usage: "Comma-separated list of public key hex strings to specify which validator accounts to backup",
|
||||
Usage: "Comma separated list of public key hex strings to specify which validator accounts to backup.",
|
||||
Value: "",
|
||||
}
|
||||
// VoluntaryExitPublicKeysFlag defines a comma-separated list of hex string public keys
|
||||
// for accounts on which a user wants to perform a voluntary exit.
|
||||
VoluntaryExitPublicKeysFlag = &cli.StringFlag{
|
||||
Name: "public-keys",
|
||||
Usage: "Comma-separated list of public key hex strings to specify on which validator accounts to perform " +
|
||||
"a voluntary exit",
|
||||
Usage: "Comma separated list of public key hex strings to specify on which validator accounts to perform " +
|
||||
"a voluntary exit.",
|
||||
Value: "",
|
||||
}
|
||||
// ExitAllFlag allows stakers to select all validating keys for exit. This will still require the staker
|
||||
// to confirm a userprompt for this action given it is a dangerous one.
|
||||
ExitAllFlag = &cli.BoolFlag{
|
||||
Name: "exit-all",
|
||||
Usage: "Exit all validators. This will still require the staker to confirm a userprompt for the action",
|
||||
Usage: "Exits all validators. This will still require the staker to confirm a userprompt for the action.",
|
||||
}
|
||||
// ForceExitFlag to exit without displaying the confirmation prompt.
|
||||
ForceExitFlag = &cli.BoolFlag{
|
||||
Name: "force-exit",
|
||||
Usage: "Exit without displaying the confirmation prompt",
|
||||
Usage: "Exits without displaying the confirmation prompt.",
|
||||
}
|
||||
VoluntaryExitJSONOutputPath = &cli.StringFlag{
|
||||
Name: "exit-json-output-dir",
|
||||
Usage: "The output directory to write voluntary exits as individual unencrypted JSON " +
|
||||
Usage: "Output directory to write voluntary exits as individual unencrypted JSON " +
|
||||
"files. If this flag is provided, voluntary exits will be written to the provided " +
|
||||
"directory and will not be broadcasted.",
|
||||
}
|
||||
// BackupPasswordFile for encrypting accounts a user wishes to back up.
|
||||
BackupPasswordFile = &cli.StringFlag{
|
||||
Name: "backup-password-file",
|
||||
Usage: "Path to a plain-text, .txt file containing the desired password for your backed up accounts",
|
||||
Usage: "Path to a plain-text, .txt file containing the desired password for your backed up accounts.",
|
||||
Value: "",
|
||||
}
|
||||
// BackupDirFlag defines the path for the zip backup of the wallet will be created.
|
||||
BackupDirFlag = &cli.StringFlag{
|
||||
Name: "backup-dir",
|
||||
Usage: "Path to a directory where accounts will be backed up into a zip file",
|
||||
Usage: "Path to a directory where accounts will be backed up into a zip file.",
|
||||
Value: DefaultValidatorDir(),
|
||||
}
|
||||
// SlashingProtectionJSONFileFlag is used to enter the file path of the slashing protection JSON.
|
||||
SlashingProtectionJSONFileFlag = &cli.StringFlag{
|
||||
Name: "slashing-protection-json-file",
|
||||
Usage: "Path to an EIP-3076 compliant JSON file containing a user's slashing protection history",
|
||||
Usage: "Path to an EIP-3076 compliant JSON file containing a user's slashing protection history.",
|
||||
}
|
||||
// KeysDirFlag defines the path for a directory where keystores to be imported at stored.
|
||||
KeysDirFlag = &cli.StringFlag{
|
||||
Name: "keys-dir",
|
||||
Usage: "Path to a directory where keystores to be imported are stored",
|
||||
Usage: "Path to a directory where keystores to be imported are stored.",
|
||||
}
|
||||
|
||||
// RemoteSignerCertPathFlag defines the path to a client.crt file for a wallet to connect to
|
||||
// a secure signer via TLS and gRPC.
|
||||
RemoteSignerCertPathFlag = &cli.StringFlag{
|
||||
Name: "remote-signer-crt-path",
|
||||
Usage: "/path/to/client.crt for establishing a secure, TLS gRPC connection to a remote signer server",
|
||||
Usage: "/path/to/client.crt for establishing a secure, TLS gRPC connection to a remote signer server.",
|
||||
Value: "",
|
||||
}
|
||||
// RemoteSignerKeyPathFlag defines the path to a client.key file for a wallet to connect to
|
||||
// a secure signer via TLS and gRPC.
|
||||
RemoteSignerKeyPathFlag = &cli.StringFlag{
|
||||
Name: "remote-signer-key-path",
|
||||
Usage: "/path/to/client.key for establishing a secure, TLS gRPC connection to a remote signer server",
|
||||
Usage: "/path/to/client.key for establishing a secure, TLS gRPC connection to a remote signer server.",
|
||||
Value: "",
|
||||
}
|
||||
// RemoteSignerCACertPathFlag defines the path to a ca.crt file for a wallet to connect to
|
||||
// a secure signer via TLS and gRPC.
|
||||
RemoteSignerCACertPathFlag = &cli.StringFlag{
|
||||
Name: "remote-signer-ca-crt-path",
|
||||
Usage: "/path/to/ca.crt for establishing a secure, TLS gRPC connection to a remote signer server",
|
||||
Usage: "/path/to/ca.crt for establishing a secure, TLS gRPC connection to a remote signer server.",
|
||||
Value: "",
|
||||
}
|
||||
// Web3SignerURLFlag defines the URL for a web3signer to connect to.
|
||||
@@ -285,7 +286,7 @@ var (
|
||||
// web3signer documentation can be found in Consensys' web3signer project docs
|
||||
Web3SignerURLFlag = &cli.StringFlag{
|
||||
Name: "validators-external-signer-url",
|
||||
Usage: "URL for consensys' web3signer software to use with the Prysm validator client",
|
||||
Usage: "URL for consensys' web3signer software to use with the Prysm validator client.",
|
||||
Value: "",
|
||||
}
|
||||
|
||||
@@ -295,65 +296,70 @@ var (
|
||||
// web3signer documentation can be found in Consensys' web3signer project docs```
|
||||
Web3SignerPublicValidatorKeysFlag = &cli.StringSliceFlag{
|
||||
Name: "validators-external-signer-public-keys",
|
||||
Usage: "comma separated list of public keys OR an external url endpoint for the validator to retrieve public keys from for usage with web3signer",
|
||||
Usage: "Comma separated list of public keys OR an external url endpoint for the validator to retrieve public keys from for usage with web3signer.",
|
||||
}
|
||||
|
||||
// KeymanagerKindFlag defines the kind of keymanager desired by a user during wallet creation.
|
||||
KeymanagerKindFlag = &cli.StringFlag{
|
||||
Name: "keymanager-kind",
|
||||
Usage: "Kind of keymanager, either imported, derived, or remote, specified during wallet creation",
|
||||
Usage: "Kind of keymanager, either imported, derived, or remote, specified during wallet creation.",
|
||||
Value: "",
|
||||
}
|
||||
// SkipDepositConfirmationFlag skips the y/n confirmation userprompt for sending a deposit to the deposit contract.
|
||||
SkipDepositConfirmationFlag = &cli.BoolFlag{
|
||||
Name: "skip-deposit-confirmation",
|
||||
Usage: "Skips the y/n confirmation userprompt for sending a deposit to the deposit contract",
|
||||
Usage: "Skips the y/n confirmation userprompt for sending a deposit to the deposit contract.",
|
||||
Value: false,
|
||||
}
|
||||
// EnableWebFlag enables controlling the validator client via the Prysm web ui. This is a work in progress.
|
||||
EnableWebFlag = &cli.BoolFlag{
|
||||
Name: "web",
|
||||
Usage: "Enables the web portal for the validator client (work in progress)",
|
||||
Usage: "(Work in progress): Enables the web portal for the validator client.",
|
||||
Value: false,
|
||||
}
|
||||
// SlashingProtectionExportDirFlag allows specifying the outpt directory
|
||||
// for a validator's slashing protection history.
|
||||
SlashingProtectionExportDirFlag = &cli.StringFlag{
|
||||
Name: "slashing-protection-export-dir",
|
||||
Usage: "Allows users to specify the output directory to export their slashing protection EIP-3076 standard JSON File",
|
||||
Usage: "Allows users to specify the output directory to export their slashing protection EIP-3076 standard JSON File.",
|
||||
Value: "",
|
||||
}
|
||||
// GraffitiFileFlag specifies the file path to load graffiti values.
|
||||
GraffitiFileFlag = &cli.StringFlag{
|
||||
Name: "graffiti-file",
|
||||
Usage: "The path to a YAML file with graffiti values",
|
||||
Usage: "Path to a YAML file with graffiti values.",
|
||||
}
|
||||
// ProposerSettingsFlag defines the path or URL to a file with proposer config.
|
||||
ProposerSettingsFlag = &cli.StringFlag{
|
||||
Name: "proposer-settings-file",
|
||||
Usage: "Set path to a YAML or JSON file containing validator settings used when proposing blocks such as (fee recipient and gas limit) (i.e. --proposer-settings-file=/path/to/proposer.json). File format found in docs",
|
||||
Name: "proposer-settings-file",
|
||||
Usage: `Sets path to a YAML or JSON file containing validator settings used when proposing blocks such as
|
||||
fee recipient and gas limit. File format found in docs.`,
|
||||
Value: "",
|
||||
}
|
||||
// ProposerSettingsURLFlag defines the path or URL to a file with proposer config.
|
||||
ProposerSettingsURLFlag = &cli.StringFlag{
|
||||
Name: "proposer-settings-url",
|
||||
Usage: "Set URL to a REST endpoint containing validator settings used when proposing blocks such as (fee recipient) (i.e. --proposer-settings-url=https://example.com/api/getConfig). File format found in docs",
|
||||
Name: "proposer-settings-url",
|
||||
Usage: `Sets URL to a REST endpoint containing validator settings used when proposing blocks such as
|
||||
fee recipient and gas limit. File format found in docs`,
|
||||
Value: "",
|
||||
}
|
||||
|
||||
// SuggestedFeeRecipientFlag defines the address of the fee recipient.
|
||||
SuggestedFeeRecipientFlag = &cli.StringFlag{
|
||||
Name: "suggested-fee-recipient",
|
||||
Usage: "Sets ALL validators' mapping to a suggested eth address to receive gas fees when proposing a block." +
|
||||
" note that this is only a suggestion when integrating with a Builder API, which may choose to specify a different fee recipient as payment for the blocks it builds." +
|
||||
" For additional setting overrides use the --" + ProposerSettingsFlag.Name + " or --" + ProposerSettingsURLFlag.Name + " flags. ",
|
||||
Usage: `Sets ALL validators' mapping to a suggested eth address to receive gas fees when proposing a block.
|
||||
Note that this is only a suggestion when integrating with a Builder API, which may choose to specify
|
||||
a different fee recipient as payment for the blocks it builds.For additional setting overrides use the
|
||||
--` + ProposerSettingsFlag.Name + " or --" + ProposerSettingsURLFlag.Name + " flags.",
|
||||
Value: params.BeaconConfig().EthBurnAddressHex,
|
||||
}
|
||||
|
||||
// EnableBuilderFlag enables the periodic validator registration API calls that will update the custom builder with validator settings.
|
||||
EnableBuilderFlag = &cli.BoolFlag{
|
||||
Name: "enable-builder",
|
||||
Usage: "Enables Builder validator registration APIs for the validator client to update settings such as fee recipient and gas limit. Note* this flag is not required if using proposer settings config file",
|
||||
Name: "enable-builder",
|
||||
Usage: `Enables builder validator registration APIs for the validator client to update settings
|
||||
such as fee recipient and gas limit. This flag is not required if using proposer
|
||||
settings config file.`,
|
||||
Value: false,
|
||||
Aliases: []string{"enable-validator-registration"},
|
||||
}
|
||||
@@ -361,7 +367,7 @@ var (
|
||||
// BuilderGasLimitFlag defines the gas limit for the builder to use for constructing a payload.
|
||||
BuilderGasLimitFlag = &cli.StringFlag{
|
||||
Name: "suggested-gas-limit",
|
||||
Usage: "Sets gas limit for the builder to use for constructing a payload for all the validators",
|
||||
Usage: "Sets gas limit for the builder to use for constructing a payload for all the validators.",
|
||||
Value: fmt.Sprint(params.BeaconConfig().DefaultBuilderGasLimit),
|
||||
}
|
||||
|
||||
|
||||
@@ -8,14 +8,12 @@ import (
|
||||
var (
|
||||
InteropStartIndex = &cli.Uint64Flag{
|
||||
Name: "interop-start-index",
|
||||
Usage: "The start index to deterministically generate validator keys when used in combination with " +
|
||||
"--interop-num-validators. Example: --interop-start-index=5 --interop-num-validators=3 would generate " +
|
||||
"keys from index 5 to 7.",
|
||||
Usage: `Start index to deterministically generate validator keys when used in combination with --interop-num-validators.
|
||||
Example: --interop-start-index=5 --interop-num-validators=3 would generate keys from index 5 to 7.`,
|
||||
}
|
||||
InteropNumValidators = &cli.Uint64Flag{
|
||||
Name: "interop-num-validators",
|
||||
Usage: "The number of validators to deterministically generate. " +
|
||||
"Example: --interop-start-index=5 --interop-num-validators=3 would generate " +
|
||||
"keys from index 5 to 7.",
|
||||
Usage: `Number of validators to deterministically generate.
|
||||
Example: --interop-start-index=5 --interop-num-validators=3 would generate keys from index 5 to 7.`,
|
||||
}
|
||||
)
|
||||
|
||||
@@ -117,81 +117,79 @@ func init() {
|
||||
}
|
||||
|
||||
func main() {
|
||||
app := cli.App{}
|
||||
app.Name = "validator"
|
||||
app.Usage = `launches an Ethereum validator client that interacts with a beacon chain, starts proposer and attester services, p2p connections, and more`
|
||||
app.Version = version.Version()
|
||||
app.Action = func(ctx *cli.Context) error {
|
||||
if err := startNode(ctx); err != nil {
|
||||
return cli.Exit(err.Error(), 1)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
app.Commands = []*cli.Command{
|
||||
walletcommands.Commands,
|
||||
accountcommands.Commands,
|
||||
slashingprotectioncommands.Commands,
|
||||
dbcommands.Commands,
|
||||
web.Commands,
|
||||
}
|
||||
|
||||
app.Flags = appFlags
|
||||
|
||||
app.Before = func(ctx *cli.Context) error {
|
||||
// Load flags from config file, if specified.
|
||||
if err := cmd.LoadFlagsFromConfig(ctx, app.Flags); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
format := ctx.String(cmd.LogFormat.Name)
|
||||
switch format {
|
||||
case "text":
|
||||
formatter := new(prefixed.TextFormatter)
|
||||
formatter.TimestampFormat = "2006-01-02 15:04:05"
|
||||
formatter.FullTimestamp = true
|
||||
// If persistent log files are written - we disable the log messages coloring because
|
||||
// the colors are ANSI codes and seen as Gibberish in the log files.
|
||||
formatter.DisableColors = ctx.String(cmd.LogFileName.Name) != ""
|
||||
logrus.SetFormatter(formatter)
|
||||
case "fluentd":
|
||||
f := joonix.NewFormatter()
|
||||
if err := joonix.DisableTimestampFormat(f); err != nil {
|
||||
panic(err)
|
||||
app := cli.App{
|
||||
Name: "validator",
|
||||
Usage: "Launches an Ethereum validator client that interacts with a beacon chain, starts proposer and attester services, p2p connections, and more.",
|
||||
Version: version.Version(),
|
||||
Action: func(ctx *cli.Context) error {
|
||||
if err := startNode(ctx); err != nil {
|
||||
return cli.Exit(err.Error(), 1)
|
||||
}
|
||||
logrus.SetFormatter(f)
|
||||
case "json":
|
||||
logrus.SetFormatter(&logrus.JSONFormatter{})
|
||||
case "journald":
|
||||
if err := journald.Enable(); err != nil {
|
||||
return nil
|
||||
},
|
||||
Commands: []*cli.Command{
|
||||
walletcommands.Commands,
|
||||
accountcommands.Commands,
|
||||
slashingprotectioncommands.Commands,
|
||||
dbcommands.Commands,
|
||||
web.Commands,
|
||||
},
|
||||
Flags: appFlags,
|
||||
Before: func(ctx *cli.Context) error {
|
||||
// Load flags from config file, if specified.
|
||||
if err := cmd.LoadFlagsFromConfig(ctx, appFlags); err != nil {
|
||||
return err
|
||||
}
|
||||
default:
|
||||
return fmt.Errorf("unknown log format %s", format)
|
||||
}
|
||||
|
||||
logFileName := ctx.String(cmd.LogFileName.Name)
|
||||
if logFileName != "" {
|
||||
if err := logs.ConfigurePersistentLogging(logFileName); err != nil {
|
||||
log.WithError(err).Error("Failed to configuring logging to disk.")
|
||||
format := ctx.String(cmd.LogFormat.Name)
|
||||
switch format {
|
||||
case "text":
|
||||
formatter := new(prefixed.TextFormatter)
|
||||
formatter.TimestampFormat = "2006-01-02 15:04:05"
|
||||
formatter.FullTimestamp = true
|
||||
// If persistent log files are written - we disable the log messages coloring because
|
||||
// the colors are ANSI codes and seen as Gibberish in the log files.
|
||||
formatter.DisableColors = ctx.String(cmd.LogFileName.Name) != ""
|
||||
logrus.SetFormatter(formatter)
|
||||
case "fluentd":
|
||||
f := joonix.NewFormatter()
|
||||
if err := joonix.DisableTimestampFormat(f); err != nil {
|
||||
panic(err)
|
||||
}
|
||||
logrus.SetFormatter(f)
|
||||
case "json":
|
||||
logrus.SetFormatter(&logrus.JSONFormatter{})
|
||||
case "journald":
|
||||
if err := journald.Enable(); err != nil {
|
||||
return err
|
||||
}
|
||||
default:
|
||||
return fmt.Errorf("unknown log format %s", format)
|
||||
}
|
||||
}
|
||||
|
||||
// Fix data dir for Windows users.
|
||||
outdatedDataDir := filepath.Join(file.HomeDir(), "AppData", "Roaming", "Eth2Validators")
|
||||
currentDataDir := flags.DefaultValidatorDir()
|
||||
if err := cmd.FixDefaultDataDir(outdatedDataDir, currentDataDir); err != nil {
|
||||
log.WithError(err).Error("Cannot update data directory")
|
||||
}
|
||||
logFileName := ctx.String(cmd.LogFileName.Name)
|
||||
if logFileName != "" {
|
||||
if err := logs.ConfigurePersistentLogging(logFileName); err != nil {
|
||||
log.WithError(err).Error("Failed to configuring logging to disk.")
|
||||
}
|
||||
}
|
||||
|
||||
if err := debug.Setup(ctx); err != nil {
|
||||
return err
|
||||
}
|
||||
return cmd.ValidateNoArgs(ctx)
|
||||
}
|
||||
// Fix data dir for Windows users.
|
||||
outdatedDataDir := filepath.Join(file.HomeDir(), "AppData", "Roaming", "Eth2Validators")
|
||||
currentDataDir := flags.DefaultValidatorDir()
|
||||
if err := cmd.FixDefaultDataDir(outdatedDataDir, currentDataDir); err != nil {
|
||||
log.WithError(err).Error("Cannot update data directory")
|
||||
}
|
||||
|
||||
app.After = func(ctx *cli.Context) error {
|
||||
debug.Exit(ctx)
|
||||
return nil
|
||||
if err := debug.Setup(ctx); err != nil {
|
||||
return err
|
||||
}
|
||||
return cmd.ValidateNoArgs(ctx)
|
||||
},
|
||||
After: func(ctx *cli.Context) error {
|
||||
debug.Exit(ctx)
|
||||
return nil
|
||||
},
|
||||
}
|
||||
|
||||
defer func() {
|
||||
|
||||
@@ -13,7 +13,7 @@ import (
|
||||
var Commands = &cli.Command{
|
||||
Name: "slashing-protection-history",
|
||||
Category: "slashing-protection-history",
|
||||
Usage: "defines commands for interacting your validator's slashing protection history",
|
||||
Usage: "Defines commands for interacting your validator's slashing protection history.",
|
||||
Subcommands: []*cli.Command{
|
||||
{
|
||||
Name: "export",
|
||||
|
||||
@@ -14,25 +14,33 @@ import (
|
||||
|
||||
var appHelpTemplate = `NAME:
|
||||
{{.App.Name}} - {{.App.Usage}}
|
||||
|
||||
USAGE:
|
||||
{{.App.HelpName}} [options]{{if .App.Commands}} command [command options]{{end}} {{if .App.ArgsUsage}}{{.App.ArgsUsage}}{{else}}[arguments...]{{end}}
|
||||
{{if .App.Version}}
|
||||
AUTHOR:
|
||||
{{range .App.Authors}}{{ . }}{{end}}
|
||||
{{end}}{{if .App.Commands}}
|
||||
GLOBAL OPTIONS:
|
||||
{{if .App.Version}}
|
||||
VERSION:
|
||||
{{.App.Version}}
|
||||
{{end -}}
|
||||
{{if len .App.Authors}}
|
||||
AUTHORS:
|
||||
{{range .App.Authors}}{{ . }}
|
||||
{{end -}}
|
||||
{{end -}}
|
||||
{{if .App.Commands}}
|
||||
global OPTIONS:
|
||||
{{range .App.Commands}}{{join .Names ", "}}{{ "\t" }}{{.Usage}}
|
||||
{{end}}{{end}}{{if .FlagGroups}}
|
||||
{{end -}}
|
||||
{{end -}}
|
||||
{{if .FlagGroups}}
|
||||
{{range .FlagGroups}}{{.Name}} OPTIONS:
|
||||
{{range .Flags}}{{.}}
|
||||
{{end}}
|
||||
{{end}}{{end}}{{if .App.Copyright }}
|
||||
{{end -}}
|
||||
{{end -}}
|
||||
{{if .App.Copyright }}
|
||||
COPYRIGHT:
|
||||
{{.App.Copyright}}
|
||||
VERSION:
|
||||
{{.App.Version}}
|
||||
{{end}}{{if len .App.Authors}}
|
||||
{{end}}
|
||||
{{end -}}
|
||||
`
|
||||
|
||||
type flagGroup struct {
|
||||
|
||||
@@ -15,7 +15,7 @@ var log = logrus.WithField("prefix", "wallet")
|
||||
var Commands = &cli.Command{
|
||||
Name: "wallet",
|
||||
Category: "wallet",
|
||||
Usage: "defines commands for interacting with Ethereum validator wallets",
|
||||
Usage: "Defines commands for interacting with Ethereum validator wallets.",
|
||||
Subcommands: []*cli.Command{
|
||||
{
|
||||
Name: "create",
|
||||
|
||||
@@ -15,7 +15,7 @@ import (
|
||||
var Commands = &cli.Command{
|
||||
Name: "web",
|
||||
Category: "web",
|
||||
Usage: "defines commands for interacting with the Prysm web interface",
|
||||
Usage: "Defines commands for interacting with the Prysm web interface.",
|
||||
Subcommands: []*cli.Command{
|
||||
{
|
||||
Name: "generate-auth-token",
|
||||
|
||||
@@ -10,44 +10,44 @@ var (
|
||||
// PraterTestnet flag for the multiclient Ethereum consensus testnet.
|
||||
PraterTestnet = &cli.BoolFlag{
|
||||
Name: "prater",
|
||||
Usage: "Run Prysm configured for the Prater / Goerli test network",
|
||||
Usage: "Runs Prysm configured for the Prater / Goerli test network.",
|
||||
Aliases: []string{"goerli"},
|
||||
}
|
||||
// SepoliaTestnet flag for the multiclient Ethereum consensus testnet.
|
||||
SepoliaTestnet = &cli.BoolFlag{
|
||||
Name: "sepolia",
|
||||
Usage: "Run Prysm configured for the Sepolia beacon chain test network",
|
||||
Usage: "Runs Prysm configured for the Sepolia test network.",
|
||||
}
|
||||
// HoleskyTestnet flag for the multiclient Ethereum consensus testnet.
|
||||
HoleskyTestnet = &cli.BoolFlag{
|
||||
Name: "holesky",
|
||||
Usage: "Run Prysm configured for the Holesky beacon chain test network",
|
||||
Usage: "Runs Prysm configured for the Holesky test network.",
|
||||
}
|
||||
// Mainnet flag for easier tooling, no-op
|
||||
Mainnet = &cli.BoolFlag{
|
||||
Value: true,
|
||||
Name: "mainnet",
|
||||
Usage: "Run on Ethereum Beacon Chain Main Net. This is the default and can be omitted.",
|
||||
Usage: "Runs on Ethereum main network. This is the default and can be omitted.",
|
||||
}
|
||||
devModeFlag = &cli.BoolFlag{
|
||||
Name: "dev",
|
||||
Usage: "Enable experimental features still in development. These features may not be stable.",
|
||||
Usage: "Enables experimental features still in development. These features may not be stable.",
|
||||
}
|
||||
enableExperimentalState = &cli.BoolFlag{
|
||||
Name: "enable-experimental-state",
|
||||
Usage: "Turn on the latest and greatest (but potentially unstable) changes to the beacon state",
|
||||
Usage: "Turns on the latest and greatest (but potentially unstable) changes to the beacon state.",
|
||||
}
|
||||
writeSSZStateTransitionsFlag = &cli.BoolFlag{
|
||||
Name: "interop-write-ssz-state-transitions",
|
||||
Usage: "Write ssz states to disk after attempted state transition",
|
||||
Usage: "Writes SSZ states to disk after attempted state transitio.",
|
||||
}
|
||||
disableGRPCConnectionLogging = &cli.BoolFlag{
|
||||
Name: "disable-grpc-connection-logging",
|
||||
Usage: "Disables displaying logs for newly connected grpc clients",
|
||||
Usage: "Disables displaying logs for newly connected grpc clients.",
|
||||
}
|
||||
disableReorgLateBlocks = &cli.BoolFlag{
|
||||
Name: "disable-reorg-late-blocks",
|
||||
Usage: "Disables reorgs of late blocks",
|
||||
Usage: "Disables reorgs of late blocks.",
|
||||
}
|
||||
disablePeerScorer = &cli.BoolFlag{
|
||||
Name: "disable-peer-scorer",
|
||||
@@ -55,31 +55,31 @@ var (
|
||||
}
|
||||
writeWalletPasswordOnWebOnboarding = &cli.BoolFlag{
|
||||
Name: "write-wallet-password-on-web-onboarding",
|
||||
Usage: "(Danger): Writes the wallet password to the wallet directory on completing Prysm web onboarding. " +
|
||||
"We recommend against this flag unless you are an advanced user.",
|
||||
Usage: `(Danger): Writes the wallet password to the wallet directory on completing Prysm web onboarding.
|
||||
We recommend against this flag unless you are an advanced user.`,
|
||||
}
|
||||
aggregateFirstInterval = &cli.DurationFlag{
|
||||
Name: "aggregate-first-interval",
|
||||
Usage: "(Advanced): Specifies the first interval in which attestations are aggregated in the slot (typically unnaggregated attestations are aggregated in this interval)",
|
||||
Usage: "(Advanced): Specifies the first interval in which attestations are aggregated in the slot (typically unnaggregated attestations are aggregated in this interval).",
|
||||
Value: 7000 * time.Millisecond,
|
||||
Hidden: true,
|
||||
}
|
||||
aggregateSecondInterval = &cli.DurationFlag{
|
||||
Name: "aggregate-second-interval",
|
||||
Usage: "(Advanced): Specifies the second interval in which attestations are aggregated in the slot",
|
||||
Usage: "(Advanced): Specifies the second interval in which attestations are aggregated in the slot.",
|
||||
Value: 9500 * time.Millisecond,
|
||||
Hidden: true,
|
||||
}
|
||||
aggregateThirdInterval = &cli.DurationFlag{
|
||||
Name: "aggregate-third-interval",
|
||||
Usage: "(Advanced): Specifies the third interval in which attestations are aggregated in the slot",
|
||||
Usage: "(Advanced): Specifies the third interval in which attestations are aggregated in the slot.",
|
||||
Value: 11800 * time.Millisecond,
|
||||
Hidden: true,
|
||||
}
|
||||
dynamicKeyReloadDebounceInterval = &cli.DurationFlag{
|
||||
Name: "dynamic-key-reload-debounce-interval",
|
||||
Usage: "(Advanced): Specifies the time duration the validator waits to reload new keys if they have " +
|
||||
"changed on disk. Default 1s, can be any type of duration such as 1.5s, 1000ms, 1m.",
|
||||
Usage: `(Advanced): Specifies the time duration the validator waits to reload new keys if they have changed on disk.
|
||||
Can be any type of duration such as 1.5s, 1000ms, 1m.`,
|
||||
Value: time.Second,
|
||||
}
|
||||
disableBroadcastSlashingFlag = &cli.BoolFlag{
|
||||
@@ -88,25 +88,25 @@ var (
|
||||
}
|
||||
attestTimely = &cli.BoolFlag{
|
||||
Name: "attest-timely",
|
||||
Usage: "Fixes validator can attest timely after current block processes. See #8185 for more details",
|
||||
Usage: "Fixes validator can attest timely after current block processes. See #8185 for more details.",
|
||||
}
|
||||
enableSlasherFlag = &cli.BoolFlag{
|
||||
Name: "slasher",
|
||||
Usage: "Enables a slasher in the beacon node for detecting slashable offenses",
|
||||
Usage: "Enables a slasher in the beacon node for detecting slashable offenses.",
|
||||
}
|
||||
enableSlashingProtectionPruning = &cli.BoolFlag{
|
||||
Name: "enable-slashing-protection-history-pruning",
|
||||
Usage: "Enables the pruning of the validator client's slashing protection database",
|
||||
Usage: "Enables the pruning of the validator client's slashing protection database.",
|
||||
}
|
||||
enableDoppelGangerProtection = &cli.BoolFlag{
|
||||
Name: "enable-doppelganger",
|
||||
Usage: "Enables the validator to perform a doppelganger check. (Warning): This is not " +
|
||||
"a foolproof method to find duplicate instances in the network. Your validator will still be" +
|
||||
" vulnerable if it is being run in unsafe configurations.",
|
||||
Usage: `Enables the validator to perform a doppelganger check.
|
||||
This is not "a foolproof method to find duplicate instances in the network.
|
||||
Your validator will still be vulnerable if it is being run in unsafe configurations.`,
|
||||
}
|
||||
disableStakinContractCheck = &cli.BoolFlag{
|
||||
Name: "disable-staking-contract-check",
|
||||
Usage: "Disables checking of staking contract deposits when proposing blocks, useful for devnets",
|
||||
Usage: "Disables checking of staking contract deposits when proposing blocks, useful for devnets.",
|
||||
}
|
||||
enableHistoricalSpaceRepresentation = &cli.BoolFlag{
|
||||
Name: "enable-historical-state-representation",
|
||||
@@ -116,52 +116,52 @@ var (
|
||||
}
|
||||
enableStartupOptimistic = &cli.BoolFlag{
|
||||
Name: "startup-optimistic",
|
||||
Usage: "Treats every block as optimistically synced at launch. Use with caution",
|
||||
Usage: "Treats every block as optimistically synced at launch. Use with caution.",
|
||||
Value: false,
|
||||
Hidden: true,
|
||||
}
|
||||
enableFullSSZDataLogging = &cli.BoolFlag{
|
||||
Name: "enable-full-ssz-data-logging",
|
||||
Usage: "Enables displaying logs for full ssz data on rejected gossip messages",
|
||||
Usage: "Enables displaying logs for full ssz data on rejected gossip messages.",
|
||||
}
|
||||
SaveFullExecutionPayloads = &cli.BoolFlag{
|
||||
Name: "save-full-execution-payloads",
|
||||
Usage: "Saves beacon blocks with full execution payloads instead of execution payload headers in the database",
|
||||
Usage: "Saves beacon blocks with full execution payloads instead of execution payload headers in the database.",
|
||||
}
|
||||
EnableBeaconRESTApi = &cli.BoolFlag{
|
||||
Name: "enable-beacon-rest-api",
|
||||
Usage: "Experimental enable of the beacon REST API when querying a beacon node",
|
||||
Usage: "(Experimental): Enables of the beacon REST API when querying a beacon node.",
|
||||
}
|
||||
enableVerboseSigVerification = &cli.BoolFlag{
|
||||
Name: "enable-verbose-sig-verification",
|
||||
Usage: "Enables identifying invalid signatures if batch verification fails when processing block",
|
||||
Usage: "Enables identifying invalid signatures if batch verification fails when processing block.",
|
||||
}
|
||||
disableOptionalEngineMethods = &cli.BoolFlag{
|
||||
Name: "disable-optional-engine-methods",
|
||||
Usage: "Disables the optional engine methods",
|
||||
Usage: "Disables the optional engine methods.",
|
||||
}
|
||||
prepareAllPayloads = &cli.BoolFlag{
|
||||
Name: "prepare-all-payloads",
|
||||
Usage: "Informs the engine to prepare all local payloads. Useful for relayers and builders",
|
||||
Usage: "Informs the engine to prepare all local payloads. Useful for relayers and builders.",
|
||||
}
|
||||
EnableEIP4881 = &cli.BoolFlag{
|
||||
Name: "enable-eip-4881",
|
||||
Usage: "Enables the deposit tree specified in EIP4881",
|
||||
Usage: "Enables the deposit tree specified in EIP-4881.",
|
||||
}
|
||||
disableResourceManager = &cli.BoolFlag{
|
||||
Name: "disable-resource-manager",
|
||||
Usage: "Disables running the libp2p resource manager",
|
||||
Usage: "Disables running the libp2p resource manager.",
|
||||
}
|
||||
|
||||
// DisableRegistrationCache a flag for disabling the validator registration cache and use db instead.
|
||||
DisableRegistrationCache = &cli.BoolFlag{
|
||||
Name: "disable-registration-cache",
|
||||
Usage: "A temporary flag for disabling the validator registration cache instead of using the db. note: registrations do not clear on restart while using the db",
|
||||
Usage: "Temporary flag for disabling the validator registration cache instead of using the DB. Note: registrations do not clear on restart while using the DB.",
|
||||
}
|
||||
|
||||
disableAggregateParallel = &cli.BoolFlag{
|
||||
Name: "disable-aggregate-parallel",
|
||||
Usage: "Disables parallel aggregation of attestations",
|
||||
Usage: "Disables parallel aggregation of attestations.",
|
||||
}
|
||||
)
|
||||
|
||||
|
||||
@@ -51,45 +51,45 @@ var (
|
||||
// PProfFlag to enable pprof HTTP server.
|
||||
PProfFlag = &cli.BoolFlag{
|
||||
Name: "pprof",
|
||||
Usage: "Enable the pprof HTTP server",
|
||||
Usage: "Enables the pprof HTTP server.",
|
||||
}
|
||||
// PProfPortFlag to specify HTTP server listening port.
|
||||
PProfPortFlag = &cli.IntFlag{
|
||||
Name: "pprofport",
|
||||
Usage: "pprof HTTP server listening port",
|
||||
Usage: "pprof HTTP server listening port.",
|
||||
Value: 6060,
|
||||
}
|
||||
// PProfAddrFlag to specify HTTP server address.
|
||||
PProfAddrFlag = &cli.StringFlag{
|
||||
Name: "pprofaddr",
|
||||
Usage: "pprof HTTP server listening interface",
|
||||
Usage: "pprof HTTP server listening interface.",
|
||||
Value: "127.0.0.1",
|
||||
}
|
||||
// MemProfileRateFlag to specify the mem profiling rate.
|
||||
MemProfileRateFlag = &cli.IntFlag{
|
||||
Name: "memprofilerate",
|
||||
Usage: "Turn on memory profiling with the given rate",
|
||||
Usage: "Turns on memory profiling with the given rate.",
|
||||
Value: runtime.MemProfileRate,
|
||||
}
|
||||
// MutexProfileFractionFlag to specify the mutex profiling rate.
|
||||
MutexProfileFractionFlag = &cli.IntFlag{
|
||||
Name: "mutexprofilefraction",
|
||||
Usage: "Turn on mutex profiling with the given rate",
|
||||
Usage: "Turns on mutex profiling with the given rate.",
|
||||
}
|
||||
// BlockProfileRateFlag to specify the block profiling rate.
|
||||
BlockProfileRateFlag = &cli.IntFlag{
|
||||
Name: "blockprofilerate",
|
||||
Usage: "Turn on block profiling with the given rate",
|
||||
Usage: "Turns on block profiling with the given rate.",
|
||||
}
|
||||
// CPUProfileFlag to specify where to write the CPU profile.
|
||||
CPUProfileFlag = &cli.StringFlag{
|
||||
Name: "cpuprofile",
|
||||
Usage: "Write CPU profile to the given file",
|
||||
Usage: "Writes CPU profile to the given file.",
|
||||
}
|
||||
// TraceFlag to specify where to write the trace execution profile.
|
||||
TraceFlag = &cli.StringFlag{
|
||||
Name: "trace",
|
||||
Usage: "Write execution trace to the given file",
|
||||
Usage: "Writes execution trace to the given file.",
|
||||
}
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user