challenger

package
v0.32.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

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 MinimalT

type MinimalT interface {
	require.TestingT
	TempDir() string
	Logf(format string, args ...interface{})
}

type Option

type Option func(c *config.Config)

func WithAlphabet

func WithAlphabet() Option

func WithCannon

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

func WithCannonKona

func WithCannonKona(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 WithResponseDelay

func WithResponseDelay(responseDelay time.Duration) Option

func WithResponseDelayAfter

func WithResponseDelayAfter(responseDelayAfter uint64) Option

func WithSuperCannon

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

func WithSuperCannonKona

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

func WithValidPrestateRequired

func WithValidPrestateRequired() Option

type System

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

Jump to

Keyboard shortcuts

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