runner

package
v1.16.13 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2026 License: MIT Imports: 38 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ReasonIncorrectStatus = "incorrect_status"
	ReasonPanic           = "panic"
	ReasonTimeout         = "timeout"
)

Reason labels for vmFailuresTotal metric

View Source
const Namespace = "op_challenger_runner"

Variables

View Source
var (
	ErrUnexpectedStatusCode = errors.New("unexpected status code")
	ErrVMTimeout            = errors.New("VM execution timed out")
)

Functions

This section is empty.

Types

type HashPrestateFetcher

type HashPrestateFetcher struct {
	// contains filtered or unexported fields
}

type LocalPrestateFetcher

type LocalPrestateFetcher struct {
	// contains filtered or unexported fields
}

type Metricer

type Metricer interface {
	contractMetrics.ContractMetricer
	metrics.VmMetricer
	opmetrics.RPCMetricer

	RecordSetupFailure(vmType string)
	RecordVmFailure(vmType string, reason string)
	RecordSuccess(vmType string)
}

type Metrics

type Metrics struct {
	*contractMetrics.ContractMetrics
	*metrics.VmMetrics
	opmetrics.RPCMetrics
	// contains filtered or unexported fields
}

func NewMetrics

func NewMetrics(runConfigs []RunConfig) *Metrics

func (*Metrics) RecordSetupFailure

func (m *Metrics) RecordSetupFailure(vmType string)

func (*Metrics) RecordSuccess

func (m *Metrics) RecordSuccess(vmType string)

func (*Metrics) RecordUp

func (m *Metrics) RecordUp()

func (*Metrics) RecordVmExecutionTime

func (m *Metrics) RecordVmExecutionTime(vmType string, dur time.Duration)

func (*Metrics) RecordVmFailure

func (m *Metrics) RecordVmFailure(vmType string, reason string)

func (*Metrics) RecordVmMemoryUsed

func (m *Metrics) RecordVmMemoryUsed(vmType string, memoryUsed uint64)

func (*Metrics) Registry

func (m *Metrics) Registry() *prometheus.Registry

type NamedPrestateFetcher

type NamedPrestateFetcher struct {
	// contains filtered or unexported fields
}

NamedPrestateFetcher downloads a file with a specified name from the prestate base URL and uses it as the prestate. The file is re-downloaded on each run rather than being cached. This makes it possible to run the latest builds from develop.

type OnChainPrestateFetcher

type OnChainPrestateFetcher struct {
	// contains filtered or unexported fields
}

type RunConfig

type RunConfig struct {
	GameType         gameTypes.GameType
	Name             string
	Prestate         common.Hash
	PrestateFilename string
}

type Runner

type Runner struct {
	// contains filtered or unexported fields
}

func NewRunner

func NewRunner(logger log.Logger, cfg *config.Config, runConfigs []RunConfig, vmTimeout time.Duration) *Runner

func (*Runner) Start

func (r *Runner) Start(ctx context.Context) error

func (*Runner) Stop

func (r *Runner) Stop(ctx context.Context) error

func (*Runner) Stopped

func (r *Runner) Stopped() bool

type TraceProviderCreator

type TraceProviderCreator func(
	ctx context.Context,
	logger log.Logger,
	m trace.Metricer,
	cfg *config.Config,
	prestateSource prestateFetcher,
	gameType gameTypes.GameType,
	localInputs utils.LocalGameInputs,
	dir string,
) (types.TraceProvider, error)

Jump to

Keyboard shortcuts

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