challenger

package
v1.13.2 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2025 License: MIT Imports: 27 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FindMonorepoRoot added in v1.7.6

func FindMonorepoRoot(t *testing.T) string

FindMonorepoRoot finds the relative path to the monorepo root Different tests might be nested in subdirectories of the op-e2e dir.

func NewChallengerConfig

func NewChallengerConfig(t *testing.T, sys EndpointProvider, l2NodeName string, options ...Option) *config.Config

Types

type CapturingMetrics

type CapturingMetrics struct {
	metrics.NoopMetricsImpl

	HighestActedL1Block atomic.Uint64
}

func NewCapturingMetrics

func NewCapturingMetrics() *CapturingMetrics

func (*CapturingMetrics) RecordActedL1Block

func (c *CapturingMetrics) RecordActedL1Block(block uint64)

type EndpointProvider

type EndpointProvider interface {
	NodeEndpoint(name string) endpoint.RPC
	L2NodeEndpoints() []endpoint.RPC
	RollupEndpoint(name string) endpoint.RPC
	L1BeaconEndpoint() endpoint.RestHTTP
	SupervisorEndpoint() endpoint.RPC
	IsSupersystem() bool
}

type GameAddr

type GameAddr interface {
	Addr() common.Address
}

type Helper

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

func NewChallenger

func NewChallenger(t *testing.T, ctx context.Context, sys EndpointProvider, name string, options ...Option) *Helper

func NewHelper

func NewHelper(log log.Logger, t *testing.T, require *require.Assertions, dir string, chl cliapp.Lifecycle, m *CapturingMetrics) *Helper

func (*Helper) Close

func (h *Helper) Close() error

func (*Helper) VerifyGameDataExists

func (h *Helper) VerifyGameDataExists(games ...GameAddr)

func (*Helper) WaitForGameDataDeletion

func (h *Helper) WaitForGameDataDeletion(ctx context.Context, games ...GameAddr)

func (*Helper) WaitForHighestActedL1Block

func (h *Helper) WaitForHighestActedL1Block(ctx context.Context, head uint64)

func (*Helper) WaitL1HeadActedOn

func (h *Helper) WaitL1HeadActedOn(ctx context.Context, client *ethclient.Client)

type Option

type Option func(c *config.Config)

func WithAlphabet

func WithAlphabet() Option

func WithCannon

func WithCannon(t *testing.T, system System) Option

func WithDepset

func WithDepset(t *testing.T, ds *depset.StaticConfigDependencySet) Option

func WithFactoryAddress

func WithFactoryAddress(addr common.Address) Option

func WithFastGames

func WithFastGames() Option

func WithGameAddress

func WithGameAddress(addr common.Address) Option

func WithInvalidCannonPrestate

func WithInvalidCannonPrestate() Option

func WithPermissioned

func WithPermissioned(t *testing.T, system System) Option

func WithPollInterval

func WithPollInterval(pollInterval time.Duration) Option

func WithPrivKey

func WithPrivKey(key *ecdsa.PrivateKey) Option

func WithSuperCannon

func WithSuperCannon(t *testing.T, system System) Option

func WithSuperPermissioned added in v1.13.1

func WithSuperPermissioned(t *testing.T, system System) Option

func WithValidPrestateRequired

func WithValidPrestateRequired() Option

type PrestateVariant added in v1.12.0

type PrestateVariant string
const (
	STCannonVariant PrestateVariant = ""
	MTCannonVariant PrestateVariant = "mt64"
	InteropVariant  PrestateVariant = "interop"
)

type System

type System interface {
	RollupCfgs() []*rollup.Config
	L2Geneses() []*core.Genesis
	PrestateVariant() PrestateVariant
}

Jump to

Keyboard shortcuts

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