config

package
v1.1.4-rc.1 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2023 License: MIT Imports: 5 Imported by: 1

Documentation

Index

Constants

View Source
const DefaultCannonSnapshotFreq = uint(1_000_000_000)

Variables

View Source
var (
	ErrMissingTraceType              = errors.New("missing trace type")
	ErrMissingCannonDatadir          = errors.New("missing cannon datadir")
	ErrMissingCannonL2               = errors.New("missing cannon L2")
	ErrMissingCannonBin              = errors.New("missing cannon bin")
	ErrMissingCannonServer           = errors.New("missing cannon server")
	ErrMissingCannonAbsolutePreState = errors.New("missing cannon absolute pre-state")
	ErrMissingAlphabetTrace          = errors.New("missing alphabet trace")
	ErrMissingL1EthRPC               = errors.New("missing l1 eth rpc url")
	ErrMissingGameAddress            = errors.New("missing game address")
	ErrMissingCannonSnapshotFreq     = errors.New("missing cannon snapshot freq")
	ErrMissingCannonRollupConfig     = errors.New("missing cannon network or rollup config path")
	ErrMissingCannonL2Genesis        = errors.New("missing cannon network or l2 genesis path")
	ErrCannonNetworkAndRollupConfig  = errors.New("only specify one of network or rollup config path")
	ErrCannonNetworkAndL2Genesis     = errors.New("only specify one of network or l2 genesis path")
	ErrCannonNetworkUnknown          = errors.New("unknown cannon network")
)

Functions

func ValidTraceType added in v1.1.2

func ValidTraceType(value TraceType) bool

Types

type Config

type Config struct {
	L1EthRpc                string         // L1 RPC Url
	GameAddress             common.Address // Address of the fault game
	AgreeWithProposedOutput bool           // Temporary config if we agree or disagree with the posted output

	TraceType TraceType // Type of trace

	// Specific to the alphabet trace provider
	AlphabetTrace string // String for the AlphabetTraceProvider

	// Specific to the cannon trace provider
	CannonBin              string // Path to the cannon executable to run when generating trace data
	CannonServer           string // Path to the op-program executable that provides the pre-image oracle server
	CannonAbsolutePreState string // File to load the absolute pre-state for Cannon traces from
	CannonNetwork          string
	CannonRollupConfigPath string
	CannonL2GenesisPath    string
	CannonDatadir          string // Cannon Data Directory
	CannonL2               string // L2 RPC Url
	CannonSnapshotFreq     uint   // Frequency of snapshots to create when executing cannon (in VM instructions)

	TxMgrConfig txmgr.CLIConfig
}

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

func NewConfig

func NewConfig(
	l1EthRpc string,
	gameAddress common.Address,
	traceType TraceType,
	agreeWithProposedOutput bool,
) Config

func (Config) Check

func (c Config) Check() error

type TraceType added in v1.1.2

type TraceType string
const (
	TraceTypeAlphabet TraceType = "alphabet"
	TraceTypeCannon   TraceType = "cannon"
)

func (*TraceType) Set added in v1.1.2

func (t *TraceType) Set(value string) error

Set implements the Set method required by the [cli.Generic] interface.

func (TraceType) String added in v1.1.2

func (t TraceType) String() string

Jump to

Keyboard shortcuts

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