-
Notifications
You must be signed in to change notification settings - Fork 71
/
Copy pathflags.go
45 lines (40 loc) · 1.33 KB
/
flags.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
package flags
import (
opservice "github.com/ethereum-optimism/optimism/op-service"
oplog "github.com/ethereum-optimism/optimism/op-service/log"
"github.com/urfave/cli/v2"
)
const EnvVarPrefix = "BLOB_VALIDATOR"
var (
BeaconClientTimeoutFlag = &cli.StringFlag{
Name: "beacon-client-timeout",
Usage: "The timeout duration for the beacon client",
Value: "10s",
EnvVars: opservice.PrefixEnvVar(EnvVarPrefix, "CLIENT_TIMEOUT"),
}
L1BeaconClientUrlFlag = &cli.StringFlag{
Name: "l1-beacon-http",
Usage: "URL for a L1 Beacon-node API",
Required: true,
EnvVars: opservice.PrefixEnvVar(EnvVarPrefix, "L1_BEACON_HTTP"),
}
BlobApiClientUrlFlag = &cli.StringFlag{
Name: "blob-api-http",
Usage: "URL for a Blob API",
Required: true,
EnvVars: opservice.PrefixEnvVar(EnvVarPrefix, "BLOB_API_HTTP"),
}
NumBlocksClientFlag = &cli.IntFlag{
Name: "num-blocks",
Usage: "The number of blocks to read blob data for",
Value: 600,
Required: true,
EnvVars: opservice.PrefixEnvVar(EnvVarPrefix, "NUM_BLOCKS"),
}
)
func init() {
Flags = append(Flags, oplog.CLIFlags(EnvVarPrefix)...)
Flags = append(Flags, BeaconClientTimeoutFlag, L1BeaconClientUrlFlag, BlobApiClientUrlFlag, NumBlocksClientFlag)
}
// Flags contains the list of configuration options available to the binary.
var Flags []cli.Flag