github.com/prysmaticlabs/prysm@v1.4.4/cmd/slasher/flags/flags.go (about)

     1  // Package flags contains all configuration runtime flags for
     2  // the slasher service.
     3  package flags
     4  
     5  import (
     6  	"github.com/urfave/cli/v2"
     7  )
     8  
     9  var (
    10  	// BeaconCertFlag defines a flag for the beacon api certificate.
    11  	BeaconCertFlag = &cli.StringFlag{
    12  		Name:  "beacon-tls-cert",
    13  		Usage: "Certificate for secure beacon gRPC connection. Pass this in order to use beacon gRPC securely.",
    14  	}
    15  	// BeaconRPCProviderFlag defines a flag for the beacon host ip or address.
    16  	BeaconRPCProviderFlag = &cli.StringFlag{
    17  		Name:  "beacon-rpc-provider",
    18  		Usage: "Beacon node RPC provider endpoint",
    19  		Value: "localhost:4000",
    20  	}
    21  	// CertFlag defines a flag for the node's TLS certificate.
    22  	CertFlag = &cli.StringFlag{
    23  		Name:  "tls-cert",
    24  		Usage: "Certificate for secure gRPC. Pass this and the tls-key flag in order to use gRPC securely.",
    25  	}
    26  	// KeyFlag defines a flag for the node's TLS key.
    27  	KeyFlag = &cli.StringFlag{
    28  		Name:  "tls-key",
    29  		Usage: "Key for secure gRPC. Pass this and the tls-cert flag in order to use gRPC securely.",
    30  	}
    31  	// MonitoringPortFlag defines the http port used to serve prometheus metrics.
    32  	MonitoringPortFlag = &cli.IntFlag{
    33  		Name:  "monitoring-port",
    34  		Usage: "Port used to listening and respond metrics for prometheus.",
    35  		Value: 8082,
    36  	}
    37  	// RPCHost defines the host on which the RPC server should listen.
    38  	RPCHost = &cli.StringFlag{
    39  		Name:  "rpc-host",
    40  		Usage: "Host on which the RPC server should listen",
    41  		Value: "127.0.0.1",
    42  	}
    43  	// RPCPort defines a slasher node RPC port to open.
    44  	RPCPort = &cli.IntFlag{
    45  		Name:  "rpc-port",
    46  		Usage: "RPC port exposed by the slasher",
    47  		Value: 4002,
    48  	}
    49  	// EnableHistoricalDetectionFlag is a flag to enable historical detection for the slasher. Requires --historical-slasher-node on the beacon node.
    50  	EnableHistoricalDetectionFlag = &cli.BoolFlag{
    51  		Name:  "enable-historical-detection",
    52  		Usage: "Enables historical attestation detection for the slasher. Requires --historical-slasher-node on the beacon node.",
    53  	}
    54  	// SpanCacheSize is a flag that sets the size of span cache.
    55  	SpanCacheSize = &cli.IntFlag{
    56  		Name:  "spans-cache-size",
    57  		Usage: "Sets the span cache size.",
    58  		Value: 1500,
    59  	}
    60  	// HighestAttCacheSize is a flag that sets the size of highest attestation cache.
    61  	HighestAttCacheSize = &cli.IntFlag{
    62  		Name:  "highest-att-cache-size",
    63  		Usage: "Sets the highest attestation cache size.",
    64  		Value: 3000,
    65  	}
    66  )