Documentation ¶
Index ¶
- Constants
- Variables
- func CheckAsteriscBaseFlags(ctx *cli.Context) error
- func CheckAsteriscFlags(ctx *cli.Context) error
- func CheckAsteriscKonaFlags(ctx *cli.Context) error
- func CheckCannonFlags(ctx *cli.Context) error
- func CheckRequired(ctx *cli.Context, traceTypes []types.TraceType) error
- func FactoryAddress(ctx *cli.Context) (common.Address, error)
- func NewConfigFromCLI(ctx *cli.Context, logger log.Logger) (*config.Config, error)
- type FlagCreator
- type VMFlag
Constants ¶
View Source
const EnvVarPrefix = "OP_CHALLENGER"
Variables ¶
View Source
var ( // Required Flags L1EthRpcFlag = &cli.StringFlag{ Name: "l1-eth-rpc", Usage: "HTTP provider URL for L1.", EnvVars: prefixEnvVars("L1_ETH_RPC"), } L1BeaconFlag = &cli.StringFlag{ Name: "l1-beacon", Usage: "Address of L1 Beacon API endpoint to use", EnvVars: prefixEnvVars("L1_BEACON"), } RollupRpcFlag = &cli.StringFlag{ Name: "rollup-rpc", Usage: "HTTP provider URL for the rollup node", EnvVars: prefixEnvVars("ROLLUP_RPC"), } NetworkFlag = flags.CLINetworkFlag(EnvVarPrefix, "") FactoryAddressFlag = &cli.StringFlag{ Name: "game-factory-address", Usage: "Address of the fault game factory contract.", EnvVars: prefixEnvVars("GAME_FACTORY_ADDRESS"), } GameAllowlistFlag = &cli.StringSliceFlag{ Name: "game-allowlist", Usage: "List of Fault Game contract addresses the challenger is allowed to play. " + "If empty, the challenger will play all games.", EnvVars: prefixEnvVars("GAME_ALLOWLIST"), } TraceTypeFlag = &cli.StringSliceFlag{ Name: "trace-type", Usage: "The trace types to support. Valid options: " + openum.EnumString(types.TraceTypes), EnvVars: prefixEnvVars("TRACE_TYPE"), Value: cli.NewStringSlice(types.TraceTypeCannon.String()), } DatadirFlag = &cli.StringFlag{ Name: "datadir", Usage: "Directory to store data generated as part of responding to games", EnvVars: prefixEnvVars("DATADIR"), } // Optional Flags MaxConcurrencyFlag = &cli.UintFlag{ Name: "max-concurrency", Usage: "Maximum number of threads to use when progressing games", EnvVars: prefixEnvVars("MAX_CONCURRENCY"), Value: uint(runtime.NumCPU()), } L2EthRpcFlag = &cli.StringFlag{ Name: "l2-eth-rpc", Usage: "L2 Address of L2 JSON-RPC endpoint to use (eth and debug namespace required) (cannon/asterisc trace type only)", EnvVars: prefixEnvVars("L2_ETH_RPC"), } MaxPendingTransactionsFlag = &cli.Uint64Flag{ Name: "max-pending-tx", Usage: "The maximum number of pending transactions. 0 for no limit.", Value: config.DefaultMaxPendingTx, EnvVars: prefixEnvVars("MAX_PENDING_TX"), } HTTPPollInterval = &cli.DurationFlag{ Name: "http-poll-interval", Usage: "Polling interval for latest-block subscription when using an HTTP RPC provider.", EnvVars: prefixEnvVars("HTTP_POLL_INTERVAL"), Value: config.DefaultPollInterval, } AdditionalBondClaimants = &cli.StringSliceFlag{ Name: "additional-bond-claimants", Usage: "List of addresses to claim bonds for, in addition to the configured transaction sender", EnvVars: prefixEnvVars("ADDITIONAL_BOND_CLAIMANTS"), } PreStatesURLFlag = NewVMFlag("prestates-url", EnvVarPrefix, faultDisputeVMs, func(name string, envVars []string, traceTypeInfo string) cli.Flag { return &cli.StringFlag{ Name: name, Usage: "Base URL to absolute prestates to use when generating trace data. " + "Prestates in this directory should be name as <commitment>.bin.gz <commitment>.json.gz or <commitment>.json " + traceTypeInfo, EnvVars: envVars, } }) CannonNetworkFlag = &cli.StringFlag{ Name: "cannon-network", Usage: fmt.Sprintf("Deprecated: Use %v instead", flags.NetworkFlagName), EnvVars: prefixEnvVars("CANNON_NETWORK"), } CannonRollupConfigFlag = &cli.StringFlag{ Name: "cannon-rollup-config", Usage: "Rollup chain parameters (cannon trace type only)", EnvVars: prefixEnvVars("CANNON_ROLLUP_CONFIG"), } CannonL2GenesisFlag = &cli.StringFlag{ Name: "cannon-l2-genesis", Usage: "Path to the op-geth genesis file (cannon trace type only)", EnvVars: prefixEnvVars("CANNON_L2_GENESIS"), } CannonBinFlag = &cli.StringFlag{ Name: "cannon-bin", Usage: "Path to cannon executable to use when generating trace data (cannon trace type only)", EnvVars: prefixEnvVars("CANNON_BIN"), } CannonServerFlag = &cli.StringFlag{ Name: "cannon-server", Usage: "Path to executable to use as pre-image oracle server when generating trace data (cannon trace type only)", EnvVars: prefixEnvVars("CANNON_SERVER"), } CannonPreStateFlag = &cli.StringFlag{ Name: "cannon-prestate", Usage: "Path to absolute prestate to use when generating trace data (cannon trace type only)", EnvVars: prefixEnvVars("CANNON_PRESTATE"), } CannonL2Flag = &cli.StringFlag{ Name: "cannon-l2", Usage: fmt.Sprintf("Deprecated: Use %v instead", L2EthRpcFlag.Name), EnvVars: prefixEnvVars("CANNON_L2"), } CannonSnapshotFreqFlag = &cli.UintFlag{ Name: "cannon-snapshot-freq", Usage: "Frequency of cannon snapshots to generate in VM steps (cannon trace type only)", EnvVars: prefixEnvVars("CANNON_SNAPSHOT_FREQ"), Value: config.DefaultCannonSnapshotFreq, } CannonInfoFreqFlag = &cli.UintFlag{ Name: "cannon-info-freq", Usage: "Frequency of cannon info log messages to generate in VM steps (cannon trace type only)", EnvVars: prefixEnvVars("CANNON_INFO_FREQ"), Value: config.DefaultCannonInfoFreq, } AsteriscNetworkFlag = &cli.StringFlag{ Name: "asterisc-network", Usage: fmt.Sprintf("Deprecated: Use %v instead", flags.NetworkFlagName), EnvVars: prefixEnvVars("ASTERISC_NETWORK"), } AsteriscRollupConfigFlag = &cli.StringFlag{ Name: "asterisc-rollup-config", Usage: "Rollup chain parameters (asterisc trace type only)", EnvVars: prefixEnvVars("ASTERISC_ROLLUP_CONFIG"), } AsteriscL2GenesisFlag = &cli.StringFlag{ Name: "asterisc-l2-genesis", Usage: "Path to the op-geth genesis file (asterisc trace type only)", EnvVars: prefixEnvVars("ASTERISC_L2_GENESIS"), } AsteriscBinFlag = &cli.StringFlag{ Name: "asterisc-bin", Usage: "Path to asterisc executable to use when generating trace data (asterisc trace type only)", EnvVars: prefixEnvVars("ASTERISC_BIN"), } AsteriscServerFlag = &cli.StringFlag{ Name: "asterisc-server", Usage: "Path to executable to use as pre-image oracle server when generating trace data (asterisc trace type only)", EnvVars: prefixEnvVars("ASTERISC_SERVER"), } AsteriscKonaServerFlag = &cli.StringFlag{ Name: "asterisc-kona-server", Usage: "Path to kona executable to use as pre-image oracle server when generating trace data (asterisc-kona trace type only)", EnvVars: prefixEnvVars("ASTERISC_KONA_SERVER"), } AsteriscPreStateFlag = &cli.StringFlag{ Name: "asterisc-prestate", Usage: "Path to absolute prestate to use when generating trace data (asterisc trace type only)", EnvVars: prefixEnvVars("ASTERISC_PRESTATE"), } AsteriscKonaPreStateFlag = &cli.StringFlag{ Name: "asterisc-kona-prestate", Usage: "Path to absolute prestate to use when generating trace data (asterisc-kona trace type only)", EnvVars: prefixEnvVars("ASTERISC_KONA_PRESTATE"), } AsteriscSnapshotFreqFlag = &cli.UintFlag{ Name: "asterisc-snapshot-freq", Usage: "Frequency of asterisc snapshots to generate in VM steps (asterisc trace type only)", EnvVars: prefixEnvVars("ASTERISC_SNAPSHOT_FREQ"), Value: config.DefaultAsteriscSnapshotFreq, } AsteriscInfoFreqFlag = &cli.UintFlag{ Name: "asterisc-info-freq", Usage: "Frequency of asterisc info log messages to generate in VM steps (asterisc trace type only)", EnvVars: prefixEnvVars("ASTERISC_INFO_FREQ"), Value: config.DefaultAsteriscInfoFreq, } GameWindowFlag = &cli.DurationFlag{ Name: "game-window", Usage: "The time window which the challenger will look for games to progress and claim bonds. " + "This should include a buffer for the challenger to claim bonds for games outside the maximum game duration.", EnvVars: prefixEnvVars("GAME_WINDOW"), Value: config.DefaultGameWindow, } SelectiveClaimResolutionFlag = &cli.BoolFlag{ Name: "selective-claim-resolution", Usage: "Only resolve claims for the configured claimants", EnvVars: prefixEnvVars("SELECTIVE_CLAIM_RESOLUTION"), } UnsafeAllowInvalidPrestate = &cli.BoolFlag{ Name: "unsafe-allow-invalid-prestate", Usage: "Allow responding to games where the absolute prestate is configured incorrectly. THIS IS UNSAFE!", EnvVars: prefixEnvVars("UNSAFE_ALLOW_INVALID_PRESTATE"), Hidden: true, } )
View Source
var Flags []cli.Flag
Flags contains the list of configuration options available to the binary.
Functions ¶
func CheckAsteriscBaseFlags ¶ added in v1.9.3
func CheckAsteriscBaseFlags(ctx *cli.Context) error
func CheckAsteriscFlags ¶ added in v1.7.4
func CheckAsteriscFlags(ctx *cli.Context) error
func CheckAsteriscKonaFlags ¶ added in v1.9.3
func CheckAsteriscKonaFlags(ctx *cli.Context) error
func CheckCannonFlags ¶ added in v1.1.6
func CheckCannonFlags(ctx *cli.Context) error
func CheckRequired ¶
func FactoryAddress ¶ added in v1.7.7
Types ¶
type FlagCreator ¶ added in v1.9.5
type VMFlag ¶ added in v1.9.5
type VMFlag struct {
// contains filtered or unexported fields
}
VMFlag defines a set of flags to set a VM specific option. Provides a flag to set the default plus flags to override the default on a per VM basis.
func (*VMFlag) DefaultName ¶ added in v1.9.5
func (*VMFlag) SourceFlagName ¶ added in v1.9.5
Click to show internal directories.
Click to hide internal directories.