flags

package
v1.20.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 11, 2026 License: MIT Imports: 9 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	EnvVarPrefix            = "OP_INTEROP_FILTER"
	DefaultRPCConcurrency   = 100
	DefaultFetchConcurrency = 64
)

Variables

View Source
var (
	L2RPCsFlag = &cli.StringSliceFlag{
		Name:    "l2-rpcs",
		Usage:   "L2 RPC endpoints to connect to (chain ID is queried from each endpoint and matched to rollup configs)",
		EnvVars: prefixEnvVars("L2_RPCS"),
	}
	NetworksFlag = &cli.StringSliceFlag{
		Name:    "networks",
		Usage:   fmt.Sprintf("Predefined networks to load rollup configs from. Available: %s", strings.Join(chaincfg.AvailableNetworks(), ", ")),
		EnvVars: prefixEnvVars("NETWORKS"),
	}
	RollupConfigsFlag = &cli.StringSliceFlag{
		Name:    "rollup-configs",
		Usage:   "Paths to custom rollup config JSON files (for dev/test chains not in superchain registry)",
		EnvVars: prefixEnvVars("ROLLUP_CONFIGS"),
	}
	DataDirFlag = &cli.StringFlag{
		Name:    "data-dir",
		Usage:   "Directory for LogsDB storage. If empty, uses a temporary directory",
		EnvVars: prefixEnvVars("DATA_DIR"),
		Value:   "",
	}
	BackfillDurationFlag = &cli.DurationFlag{
		Name:    "backfill-duration",
		Usage:   "Duration to backfill on startup (e.g., 168h, 30m, 1h30m)",
		EnvVars: prefixEnvVars("BACKFILL_DURATION"),
		Value:   168 * time.Hour,
	}
	MessageExpiryWindowFlag = &cli.DurationFlag{
		Name:    "message-expiry-window",
		Usage:   "Message expiry window duration, at most 168h (7 days). Messages older than this are considered expired.",
		EnvVars: prefixEnvVars("MESSAGE_EXPIRY_WINDOW"),
		Value:   168 * time.Hour,
	}
	AssumeValidBeforeFlag = &cli.DurationFlag{
		Name:    "assume-valid-before",
		Usage:   "On startup, history older than this duration before now is assumed valid. Newer history is cross-validated before it counts as cross-unsafe (e.g., 1h, 30m)",
		EnvVars: prefixEnvVars("ASSUME_VALID_BEFORE"),
		Value:   30 * time.Minute,
	}
	JWTSecretFlag = &cli.StringFlag{
		Name: "admin.jwt-secret",
		Usage: "Path to JWT secret key for admin RPC authentication. " +
			"Keys are 32 bytes, hex encoded in a file. " +
			"A new key will be generated if the file is missing. " +
			"Required when admin.rpc.addr is set.",
		EnvVars:   prefixEnvVars("ADMIN_JWT_SECRET"),
		Value:     "",
		TakesFile: true,
	}
	AdminRPCAddrFlag = &cli.StringFlag{
		Name:    "admin.rpc.addr",
		Usage:   "Address to bind admin RPC server. If empty, admin RPC is disabled.",
		EnvVars: prefixEnvVars("ADMIN_RPC_ADDR"),
		Value:   "",
	}
	AdminRPCPortFlag = &cli.IntFlag{
		Name:    "admin.rpc.port",
		Usage:   "Port to bind admin RPC server.",
		EnvVars: prefixEnvVars("ADMIN_RPC_PORT"),
		Value:   8546,
	}
	RPCAddrFlag = &cli.StringFlag{
		Name:    "rpc.addr",
		Usage:   "RPC listening address",
		EnvVars: prefixEnvVars("RPC_ADDR"),
		Value:   "0.0.0.0",
	}
	RPCPortFlag = &cli.IntFlag{
		Name:    "rpc.port",
		Usage:   "RPC listening port",
		EnvVars: prefixEnvVars("RPC_PORT"),
		Value:   8545,
	}
	PollIntervalFlag = &cli.DurationFlag{
		Name:    "poll-interval",
		Usage:   "Interval for polling new blocks from L2 RPCs (e.g., 2s, 500ms)",
		EnvVars: prefixEnvVars("POLL_INTERVAL"),
		Value:   2 * time.Second,
	}
	ValidationIntervalFlag = &cli.DurationFlag{
		Name:    "validation-interval",
		Usage:   "Interval for cross-chain validation loop (e.g., 500ms, 1s)",
		EnvVars: prefixEnvVars("VALIDATION_INTERVAL"),
		Value:   500 * time.Millisecond,
	}
	ReorgRecoveryEnabledFlag = &cli.BoolFlag{
		Name:    "reorg-recovery-enabled",
		Usage:   "Automatically resolve reorg-triggered failsafe by rewinding logs DBs to finalized.",
		EnvVars: prefixEnvVars("REORG_RECOVERY_ENABLED"),
	}
	FailsafeEnabledFlag = &cli.BoolFlag{
		Name:    "failsafe-enabled",
		Usage:   "Enable the manual failsafe at start and ignore the stored failsafe state file. The admin RPC can clear it, but the next start enables it again.",
		EnvVars: prefixEnvVars("FAILSAFE_ENABLED"),
	}
	FailsafeLogIntervalFlag = &cli.DurationFlag{
		Name:    "failsafe-log-interval",
		Usage:   "Interval at which the active failsafe reason is re-logged while failsafe is enabled (e.g., 1m, 30s)",
		EnvVars: prefixEnvVars("FAILSAFE_LOG_INTERVAL"),
		Value:   time.Minute,
	}
	RPCConcurrencyFlag = &cli.IntFlag{
		Name:    "rpc-concurrency",
		Usage:   "Maximum number of concurrent RPC requests per chain",
		EnvVars: prefixEnvVars("RPC_CONCURRENCY"),
		Value:   DefaultRPCConcurrency,
	}
	FetchConcurrencyFlag = &cli.IntFlag{
		Name:    "fetch-concurrency",
		Usage:   "Number of blocks to fetch concurrently during ingestion. Must be <= rpc-concurrency.",
		EnvVars: prefixEnvVars("FETCH_CONCURRENCY"),
		Value:   DefaultFetchConcurrency,
	}
	SupportLegacyCheckAccessListFormatFlag = &cli.BoolFlag{
		Name:    "support-legacy-check-access-list-format",
		Usage:   "Support legacy interop_checkAccessList requests that omit executing chainID. DANGEROUS: intended only for compatibility with legacy clients; access-list source-chain validation still runs.",
		EnvVars: prefixEnvVars("SUPPORT_LEGACY_CHECK_ACCESS_LIST_FORMAT"),
	}
	DangerouslyEnablePassthroughFlag = &cli.BoolFlag{
		Name:    "dangerously-enable-passthrough",
		Usage:   "Allow all transactions through without interop filtering. DANGEROUS: disables all executing message validation.",
		EnvVars: prefixEnvVars("DANGEROUSLY_ENABLE_PASSTHROUGH"),
	}
)
View Source
var Flags []cli.Flag

Functions

func CheckRequired

func CheckRequired(ctx *cli.Context) error

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL