config

package
v0.0.0-...-011bec4 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// DefaultGameWindow is the default maximum time duration in the past
	// to look for games to monitor. The default value is 28 days. The worst case duration
	// for a game is 16 days (due to clock extension), plus 7 days WETH withdrawal delay
	// leaving a 5 day buffer to monitor games after they should be fully resolved.
	DefaultGameWindow = 28 * 24 * time.Hour
	// DefaultMonitorInterval is the default interval at which the dispute
	// monitor will check for new games to monitor.
	DefaultMonitorInterval = time.Second * 30

	//DefaultMaxConcurrency is the default number of threads to use when fetching game data
	DefaultMaxConcurrency = uint(5)
)

Variables

View Source
var (
	ErrMissingL1EthRPC           = errors.New("missing l1 eth rpc url")
	ErrMissingGameFactoryAddress = errors.New("missing game factory address")
	ErrMissingRollupRpc          = errors.New("missing rollup rpc url")
	ErrMissingMaxConcurrency     = errors.New("missing max concurrency")
)

Functions

This section is empty.

Types

type Config

type Config struct {
	L1EthRpc           string         // L1 RPC Url
	GameFactoryAddress common.Address // Address of the dispute game factory

	HonestActors    []common.Address // List of honest actors to monitor claims for.
	RollupRpc       string           // The rollup node RPC URL.
	MonitorInterval time.Duration    // Frequency to check for new games to monitor.
	GameWindow      time.Duration    // Maximum window to look for games to monitor.
	IgnoredGames    []common.Address // Games to exclude from monitoring
	MaxConcurrency  uint             // Maximum number of threads to use when fetching game data

	MetricsConfig opmetrics.CLIConfig
	PprofConfig   oppprof.CLIConfig
}

Config is a well typed config that is parsed from the CLI params. It also contains config options for auxiliary services.

func NewConfig

func NewConfig(gameFactoryAddress common.Address, l1EthRpc string, rollupRpc string) Config

func (Config) Check

func (c Config) Check() error

Jump to

Keyboard shortcuts

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