2020-04-29 21:32:39 +00:00
|
|
|
// Package flags contains all configuration runtime flags for
|
|
|
|
// the validator service.
|
2019-07-23 13:58:20 +00:00
|
|
|
package flags
|
2015-07-28 22:16:16 +00:00
|
|
|
|
|
|
|
import (
|
2020-05-31 06:44:34 +00:00
|
|
|
"github.com/urfave/cli/v2"
|
2018-01-13 22:31:28 +00:00
|
|
|
)
|
|
|
|
|
2015-07-28 22:16:16 +00:00
|
|
|
var (
|
2020-05-19 13:44:54 +00:00
|
|
|
// DisableAccountMetricsFlag defines the graffiti value included in proposed blocks, default false.
|
|
|
|
DisableAccountMetricsFlag = &cli.BoolFlag{
|
2020-05-20 15:23:22 +00:00
|
|
|
Name: "disable-account-metrics",
|
2020-05-19 13:44:54 +00:00
|
|
|
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.",
|
2020-04-19 08:36:19 +00:00
|
|
|
}
|
2018-08-01 22:08:44 +00:00
|
|
|
// BeaconRPCProviderFlag defines a beacon node RPC endpoint.
|
2020-03-19 21:46:44 +00:00
|
|
|
BeaconRPCProviderFlag = &cli.StringFlag{
|
2018-08-01 22:08:44 +00:00
|
|
|
Name: "beacon-rpc-provider",
|
|
|
|
Usage: "Beacon node RPC provider endpoint",
|
2019-01-30 12:28:53 +00:00
|
|
|
Value: "localhost:4000",
|
2018-08-01 22:08:44 +00:00
|
|
|
}
|
2018-08-08 22:43:25 +00:00
|
|
|
// CertFlag defines a flag for the node's TLS certificate.
|
2020-03-19 21:46:44 +00:00
|
|
|
CertFlag = &cli.StringFlag{
|
2018-08-08 22:43:25 +00:00
|
|
|
Name: "tls-cert",
|
|
|
|
Usage: "Certificate for secure gRPC. Pass this and the tls-key flag in order to use gRPC securely.",
|
|
|
|
}
|
2020-05-20 15:23:22 +00:00
|
|
|
// SlasherRPCProviderFlag defines a slasher node RPC endpoint.
|
|
|
|
SlasherRPCProviderFlag = &cli.StringFlag{
|
|
|
|
Name: "slasher-rpc-provider",
|
|
|
|
Usage: "Slasher node RPC provider endpoint",
|
|
|
|
Value: "localhost:4002",
|
|
|
|
}
|
|
|
|
// SlasherCertFlag defines a flag for the slasher node's TLS certificate.
|
|
|
|
SlasherCertFlag = &cli.StringFlag{
|
|
|
|
Name: "slasher-tls-cert",
|
|
|
|
Usage: "Certificate for secure slasher gRPC. Pass this and the tls-key flag in order to use gRPC securely.",
|
|
|
|
}
|
2019-04-27 03:56:11 +00:00
|
|
|
// DisablePenaltyRewardLogFlag defines the ability to not log reward/penalty information during deployment
|
2020-03-19 21:46:44 +00:00
|
|
|
DisablePenaltyRewardLogFlag = &cli.BoolFlag{
|
2019-04-27 03:56:11 +00:00
|
|
|
Name: "disable-rewards-penalties-logging",
|
|
|
|
Usage: "Disable reward/penalty logging during cluster deployment",
|
|
|
|
}
|
2019-12-07 19:13:56 +00:00
|
|
|
// GraffitiFlag defines the graffiti value included in proposed blocks
|
2020-03-19 21:46:44 +00:00
|
|
|
GraffitiFlag = &cli.StringFlag{
|
2019-12-09 14:31:53 +00:00
|
|
|
Name: "graffiti",
|
2019-12-07 19:13:56 +00:00
|
|
|
Usage: "String to include in proposed blocks",
|
|
|
|
}
|
2020-02-24 18:00:22 +00:00
|
|
|
// GrpcRetriesFlag defines the number of times to retry a failed gRPC request.
|
2020-03-19 21:46:44 +00:00
|
|
|
GrpcRetriesFlag = &cli.UintFlag{
|
2020-02-24 18:00:22 +00:00
|
|
|
Name: "grpc-retries",
|
|
|
|
Usage: "Number of attempts to retry gRPC requests",
|
|
|
|
Value: 5,
|
|
|
|
}
|
2020-03-25 16:29:04 +00:00
|
|
|
// 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",
|
|
|
|
}
|
2020-04-19 08:36:19 +00:00
|
|
|
// KeyManager specifies the key manager to use.
|
|
|
|
KeyManager = &cli.StringFlag{
|
|
|
|
Name: "keymanager",
|
|
|
|
Usage: "The keymanger to use (unencrypted, interop, keystore, wallet)",
|
|
|
|
Value: "",
|
|
|
|
}
|
|
|
|
// KeyManagerOpts specifies the key manager options.
|
|
|
|
KeyManagerOpts = &cli.StringFlag{
|
|
|
|
Name: "keymanageropts",
|
|
|
|
Usage: "The options for the keymanger, either a JSON string or path to same",
|
|
|
|
Value: "",
|
|
|
|
}
|
|
|
|
// KeystorePathFlag defines the location of the keystore directory for a validator's account.
|
|
|
|
KeystorePathFlag = &cli.StringFlag{
|
|
|
|
Name: "keystore-path",
|
|
|
|
Usage: "Path to the desired keystore directory",
|
|
|
|
}
|
2020-05-25 16:20:35 +00:00
|
|
|
// MergeSourceDirectories defines the locations of source validator databases that will be merged.
|
|
|
|
MergeSourceDirectories = &cli.StringFlag{
|
2020-05-26 11:13:12 +00:00
|
|
|
Name: "source-dirs",
|
2020-05-25 16:20:35 +00:00
|
|
|
Usage: "A comma-separated list of directories containing validator databases that will be merged.",
|
|
|
|
}
|
|
|
|
// MergeTargetDirectory defines the locations where the merged database will be stored.
|
|
|
|
MergeTargetDirectory = &cli.StringFlag{
|
2020-05-26 11:13:12 +00:00
|
|
|
Name: "target-dir",
|
2020-05-25 16:20:35 +00:00
|
|
|
Usage: "The directory where the merged database will be stored.",
|
|
|
|
}
|
2020-04-19 08:36:19 +00:00
|
|
|
// MonitoringPortFlag defines the http port used to serve prometheus metrics.
|
|
|
|
MonitoringPortFlag = &cli.Int64Flag{
|
|
|
|
Name: "monitoring-port",
|
|
|
|
Usage: "Port used to listening and respond metrics for prometheus.",
|
|
|
|
Value: 8081,
|
|
|
|
}
|
2020-05-31 22:47:15 +00:00
|
|
|
|
2020-04-19 08:36:19 +00:00
|
|
|
// PasswordFlag defines the password value for storing and retrieving validator private keys from the keystore.
|
|
|
|
PasswordFlag = &cli.StringFlag{
|
|
|
|
Name: "password",
|
|
|
|
Usage: "String value of the password for your validator private keys",
|
|
|
|
}
|
|
|
|
// UnencryptedKeysFlag specifies a file path of a JSON file of unencrypted validator keys as an
|
|
|
|
// alternative from launching the validator client from decrypting a keystore directory.
|
|
|
|
UnencryptedKeysFlag = &cli.StringFlag{
|
|
|
|
Name: "unencrypted-keys",
|
|
|
|
Usage: "Filepath to a JSON file of unencrypted validator keys for easier launching of the validator client",
|
|
|
|
Value: "",
|
2020-02-05 17:49:27 +00:00
|
|
|
}
|
2015-07-28 22:16:16 +00:00
|
|
|
)
|