stack

package
v1.16.7 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2026 License: MIT Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ApplyOptionLifecycle

func ApplyOptionLifecycle[O Orchestrator](opt Option[O], orch O)

ApplyOptionLifecycle applies all option lifecycle stages to the given orchestrator

func ChainIDFromContext added in v1.13.4

func ChainIDFromContext(ctx context.Context) eth.ChainID

ChainIDFromContext extracts the chain ID from the context.

func ChainIDSelector added in v1.13.4

func ChainIDSelector(chainID eth.ChainID) logfilter.Selector

ChainIDSelector creates a log-filter that applies the given inner log-filter only if it matches the given chainID. This can be composed with logfilter package utils like logfilter.MuteAll or logfilter.Level to adjust logging for a specific chain ID.

func ContextWithChainID added in v1.13.4

func ContextWithChainID(ctx context.Context, chainID eth.ChainID) context.Context

ContextWithChainID annotates the context with the given chainID of service

func ContextWithID added in v1.13.4

func ContextWithID(ctx context.Context, id slog.LogValuer) context.Context

ContextWithID attaches a component ID to the context. This also automatically attaches the chain ID and component kind to the context, if available from the ID.

func ContextWithKind added in v1.13.4

func ContextWithKind(ctx context.Context, kind Kind) context.Context

ContextWithKind annotates the context with the given kind of service

func IDFromContext added in v1.13.4

func IDFromContext[T slog.LogValuer](ctx context.Context) T

func IDSelector added in v1.13.4

func IDSelector(id slog.LogValuer) logfilter.Selector

IDSelector creates a log-filter that applies the given inner log-filter only if it matches the given ID. This can be composed with logfilter package utils like logfilter.MuteAll or logfilter.Level to adjust logging for a specific chain ID.

func KindSelector added in v1.13.4

func KindSelector(kind Kind) logfilter.Selector

KindSelector creates a log-filter that applies the given inner log-filter only if it matches the given kind. For logs of the specified kind, it applies the inner filter. For logs of other kinds, it returns false (filters them out).

Types

type ChainIDProvider added in v1.13.4

type ChainIDProvider interface {
	ChainID() eth.ChainID
}

ChainIDProvider presents a type that provides a relevant ChainID.

type Cluster

type Cluster interface {
	Common
	ID() ClusterID

	DependencySet() depset.DependencySet
}

Cluster represents a set of chains that interop with each other. This may include L1 chains (although potentially not two-way interop due to consensus-layer limitations).

func SortClusters

func SortClusters(elems []Cluster) []Cluster

type ClusterID

type ClusterID genericID

ClusterID identifies a Cluster by name, is type-safe, and can be value-copied and used as map key.

func SortClusterIDs

func SortClusterIDs(ids []ClusterID) []ClusterID

func (ClusterID) Kind added in v1.13.4

func (id ClusterID) Kind() Kind

func (ClusterID) LogValue added in v1.13.4

func (id ClusterID) LogValue() slog.Value

func (ClusterID) MarshalText

func (id ClusterID) MarshalText() ([]byte, error)

func (ClusterID) Match

func (id ClusterID) Match(elems []Cluster) []Cluster

func (ClusterID) String

func (id ClusterID) String() string

func (*ClusterID) UnmarshalText

func (id *ClusterID) UnmarshalText(data []byte) error

type ClusterID2 added in v1.16.7

type ClusterID2 = ID[ClusterMarker]

Type-safe ID type aliases using marker types. These maintain backward compatibility with existing code.

func ConvertClusterID added in v1.16.7

func ConvertClusterID(old ClusterID) ClusterID2

ConvertClusterID converts an old ClusterID to the new system.

func NewClusterID2 added in v1.16.7

func NewClusterID2(key string) ClusterID2

type ClusterMarker added in v1.16.7

type ClusterMarker struct{}

Marker types for each component kind. Each marker implements KindMarker to associate it with the correct ComponentKind.

type ClusterMatcher

type ClusterMatcher = Matcher[ClusterID, Cluster]

type CombinedOption

type CombinedOption[O Orchestrator] []Option[O]

CombinedOption is a list of options. For each option lifecycle stage, all options are applied, left to right.

func Combine

func Combine[O Orchestrator](opts ...Option[O]) CombinedOption[O]

Combine is a method to define a CombinedOption, more readable than a slice definition.

func (*CombinedOption[O]) Add

func (c *CombinedOption[O]) Add(other ...Option[O])

Add changes the option into a new Option that that first applies the receiver, and then the other options. This is a convenience for bundling options together.

func (CombinedOption[O]) AfterDeploy

func (c CombinedOption[O]) AfterDeploy(orch O)

func (CombinedOption[O]) BeforeDeploy

func (c CombinedOption[O]) BeforeDeploy(orch O)

func (CombinedOption[O]) Deploy

func (c CombinedOption[O]) Deploy(orch O)

func (CombinedOption[O]) Finally

func (c CombinedOption[O]) Finally(orch O)

func (CombinedOption[O]) PostHydrate

func (c CombinedOption[O]) PostHydrate(sys System)

func (CombinedOption[O]) PreHydrate added in v1.13.4

func (c CombinedOption[O]) PreHydrate(sys System)

type Common

type Common interface {
	T() devtest.T
	Logger() log.Logger

	// Label retrieves a label by key.
	// If the label does not exist, it returns an empty string.
	Label(key string) string

	// SetLabel sets a label by key.
	// Note that labels added by tests are not visible to other tests against the same backend.
	SetLabel(key, value string)
}

type CommonOption

type CommonOption = Option[Orchestrator]

func MakeCommon

func MakeCommon[O Orchestrator](opt Option[O]) CommonOption

MakeCommon makes the type-specific option a common option. If the result runs with a different orchestrator type than expected the actual typed option will not run. This can be used to mix in customizations. Later common options should verify the orchestrator has the properties it needs to have.

type ComponentID added in v1.16.7

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

ComponentID is the unified identifier for all components. It contains all possible fields; the shape determines which are used.

func NewComponentID added in v1.16.7

func NewComponentID(kind ComponentKind, key string, chainID eth.ChainID) ComponentID

NewComponentID creates a new ComponentID with key and chainID.

func NewComponentIDChainOnly added in v1.16.7

func NewComponentIDChainOnly(kind ComponentKind, chainID eth.ChainID) ComponentID

NewComponentIDChainOnly creates a new ComponentID with only a chainID.

func NewComponentIDKeyOnly added in v1.16.7

func NewComponentIDKeyOnly(kind ComponentKind, key string) ComponentID

NewComponentIDKeyOnly creates a new ComponentID with only a key.

func (ComponentID) ChainID added in v1.16.7

func (id ComponentID) ChainID() eth.ChainID

func (ComponentID) Key added in v1.16.7

func (id ComponentID) Key() string

func (ComponentID) Kind added in v1.16.7

func (id ComponentID) Kind() ComponentKind

func (ComponentID) Less added in v1.16.7

func (id ComponentID) Less(other ComponentID) bool

Less compares two ComponentIDs for sorting.

func (ComponentID) LogValue added in v1.16.7

func (id ComponentID) LogValue() slog.Value

func (ComponentID) MarshalText added in v1.16.7

func (id ComponentID) MarshalText() ([]byte, error)

func (ComponentID) Shape added in v1.16.7

func (id ComponentID) Shape() IDShape

func (ComponentID) String added in v1.16.7

func (id ComponentID) String() string

func (*ComponentID) UnmarshalText added in v1.16.7

func (id *ComponentID) UnmarshalText(data []byte) error

type ComponentKind added in v1.16.7

type ComponentKind string

ComponentKind identifies the type of component. This is used in serialization to make each ID unique and type-safe.

const (
	KindL1ELNode          ComponentKind = "L1ELNode"
	KindL1CLNode          ComponentKind = "L1CLNode"
	KindL1Network         ComponentKind = "L1Network"
	KindL2ELNode          ComponentKind = "L2ELNode"
	KindL2CLNode          ComponentKind = "L2CLNode"
	KindL2Network         ComponentKind = "L2Network"
	KindL2Batcher         ComponentKind = "L2Batcher"
	KindL2Proposer        ComponentKind = "L2Proposer"
	KindL2Challenger      ComponentKind = "L2Challenger"
	KindRollupBoostNode   ComponentKind = "RollupBoostNode"
	KindOPRBuilderNode    ComponentKind = "OPRBuilderNode"
	KindFaucet            ComponentKind = "Faucet"
	KindSyncTester        ComponentKind = "SyncTester"
	KindSupervisor        ComponentKind = "Supervisor"
	KindConductor         ComponentKind = "Conductor"
	KindCluster           ComponentKind = "Cluster"
	KindSuperchain        ComponentKind = "Superchain"
	KindSupernode         ComponentKind = "Supernode"
	KindTestSequencer     ComponentKind = "TestSequencer"
	KindFlashblocksClient ComponentKind = "FlashblocksWSClient"
)

All component kinds. These values are used in serialization and must remain stable.

type Conductor added in v1.13.4

type Conductor interface {
	Common
	ID() ConductorID

	RpcAPI() conductorRpc.API
}

func SortConductors added in v1.13.4

func SortConductors(elems []Conductor) []Conductor

type ConductorID added in v1.13.4

type ConductorID genericID

func SortConductorIDs added in v1.13.4

func SortConductorIDs(ids []ConductorID) []ConductorID

func (ConductorID) MarshalText added in v1.13.4

func (id ConductorID) MarshalText() ([]byte, error)

func (ConductorID) Match added in v1.13.4

func (id ConductorID) Match(elems []Conductor) []Conductor

func (ConductorID) String added in v1.13.4

func (id ConductorID) String() string

func (*ConductorID) UnmarshalText added in v1.13.4

func (id *ConductorID) UnmarshalText(data []byte) error

type ConductorID2 added in v1.16.7

type ConductorID2 = ID[ConductorMarker]

Type-safe ID type aliases using marker types. These maintain backward compatibility with existing code.

func ConvertConductorID added in v1.16.7

func ConvertConductorID(old ConductorID) ConductorID2

ConvertConductorID converts an old ConductorID to the new system.

func NewConductorID2 added in v1.16.7

func NewConductorID2(key string) ConductorID2

type ConductorMarker added in v1.16.7

type ConductorMarker struct{}

Marker types for each component kind. Each marker implements KindMarker to associate it with the correct ComponentKind.

type ConductorMatcher added in v1.13.4

type ConductorMatcher = Matcher[ConductorID, Conductor]

type ControlAction

type ControlAction int
const (
	Start ControlAction = iota
	Stop
)

type ControlPlane

type ControlPlane interface {
	SupervisorState(id SupervisorID, action ControlAction)
	L2CLNodeState(id L2CLNodeID, action ControlAction)
	L2ELNodeState(id L2ELNodeID, action ControlAction)
	FakePoSState(id L1CLNodeID, action ControlAction)
	RollupBoostNodeState(id RollupBoostNodeID, action ControlAction)
	OPRBuilderNodeState(id OPRBuilderNodeID, action ControlAction)
}

ControlPlane is the interface for the orchestrators to control components of the system.

type ELNode

type ELNode interface {
	Common
	ChainID() eth.ChainID
	EthClient() apis.EthClient
	TransactionTimeout() time.Duration
}

type ExtNetworkConfig added in v1.13.7

type ExtNetworkConfig struct {
	L2NetworkName      string
	L1ChainID          eth.ChainID
	L2ELEndpoint       string
	L1CLBeaconEndpoint string
	L1ELEndpoint       string
}

type ExtensibleL1Network

type ExtensibleL1Network interface {
	ExtensibleNetwork
	L1Network
	AddL1ELNode(v L1ELNode)
	AddL1CLNode(v L1CLNode)
}

type ExtensibleL2Network

type ExtensibleL2Network interface {
	ExtensibleNetwork
	L2Network
	AddL2Batcher(v L2Batcher)
	AddL2Proposer(v L2Proposer)
	AddL2Challenger(v L2Challenger)
	AddL2CLNode(v L2CLNode)
	AddL2ELNode(v L2ELNode)
	AddConductor(v Conductor)
	AddRollupBoostNode(v RollupBoostNode)
	AddOPRBuilderNode(v OPRBuilderNode)
}

ExtensibleL2Network is an optional extension interface for L2Network, for adding new components to the chain. Used during test-setup, not generally during test execution.

type ExtensibleNetwork

type ExtensibleNetwork interface {
	Network

	AddFaucet(f Faucet)
	AddSyncTester(st SyncTester)
}

type ExtensibleSystem

type ExtensibleSystem interface {
	System
	AddSuperchain(v Superchain)
	AddCluster(v Cluster)
	AddL1Network(v L1Network)
	AddL2Network(v L2Network)
	AddSupervisor(v Supervisor)
	AddSupernode(v Supernode)
	AddTestSequencer(v TestSequencer)
	AddSyncTester(v SyncTester)
}

ExtensibleSystem is an extension-interface to add new components to the system. Regular tests should not be modifying the system. Test gates may use this to remediate any shortcomings of an existing system.

type Faucet

type Faucet interface {
	Common
	ID() FaucetID
	API() apis.Faucet
}

func SortFaucets

func SortFaucets(elems []Faucet) []Faucet

type FaucetID

type FaucetID idWithChain

FaucetID identifies a Faucet by name and chainID, is type-safe, and can be value-copied and used as map key.

func NewFaucetID added in v1.13.4

func NewFaucetID(key string, chainID eth.ChainID) FaucetID

func SortFaucetIDs

func SortFaucetIDs(ids []FaucetID) []FaucetID

func (FaucetID) ChainID added in v1.13.4

func (id FaucetID) ChainID() eth.ChainID

func (FaucetID) Key added in v1.13.4

func (id FaucetID) Key() string

func (FaucetID) Kind added in v1.13.4

func (id FaucetID) Kind() Kind

func (FaucetID) LogValue added in v1.13.4

func (id FaucetID) LogValue() slog.Value

func (FaucetID) MarshalText

func (id FaucetID) MarshalText() ([]byte, error)

func (FaucetID) Match

func (id FaucetID) Match(elems []Faucet) []Faucet

func (FaucetID) String

func (id FaucetID) String() string

func (*FaucetID) UnmarshalText

func (id *FaucetID) UnmarshalText(data []byte) error

type FaucetID2 added in v1.16.7

type FaucetID2 = ID[FaucetMarker]

Type-safe ID type aliases using marker types. These maintain backward compatibility with existing code.

func ConvertFaucetID added in v1.16.7

func ConvertFaucetID(old FaucetID) FaucetID2

ConvertFaucetID converts an old FaucetID to the new system.

func NewFaucetID2 added in v1.16.7

func NewFaucetID2(key string, chainID eth.ChainID) FaucetID2

type FaucetMarker added in v1.16.7

type FaucetMarker struct{}

Marker types for each component kind. Each marker implements KindMarker to associate it with the correct ComponentKind.

type FaucetMatcher

type FaucetMatcher = Matcher[FaucetID, Faucet]

type FlashblocksClientID2 added in v1.16.7

type FlashblocksClientID2 = ID[FlashblocksClientMarker]

Type-safe ID type aliases using marker types. These maintain backward compatibility with existing code.

func ConvertFlashblocksClientID added in v1.16.7

func ConvertFlashblocksClientID(old FlashblocksWSClientID) FlashblocksClientID2

ConvertFlashblocksClientID converts an old FlashblocksWSClientID to the new system.

func NewFlashblocksClientID2 added in v1.16.7

func NewFlashblocksClientID2(key string, chainID eth.ChainID) FlashblocksClientID2

type FlashblocksClientMarker added in v1.16.7

type FlashblocksClientMarker struct{}

Marker types for each component kind. Each marker implements KindMarker to associate it with the correct ComponentKind.

type FlashblocksWSClient added in v1.16.3

type FlashblocksWSClient interface {
	Common
	ChainID() eth.ChainID
	ID() FlashblocksWSClientID
	WsUrl() string
	WsHeaders() http.Header
}

func SortFlashblocksWSClients added in v1.16.3

func SortFlashblocksWSClients(elems []FlashblocksWSClient) []FlashblocksWSClient

type FlashblocksWSClientID added in v1.16.3

type FlashblocksWSClientID idWithChain

func NewFlashblocksWSClientID added in v1.16.3

func NewFlashblocksWSClientID(key string, chainID eth.ChainID) FlashblocksWSClientID

func SortFlashblocksWSClientIDs added in v1.16.3

func SortFlashblocksWSClientIDs(ids []FlashblocksWSClientID) []FlashblocksWSClientID

func (FlashblocksWSClientID) ChainID added in v1.16.3

func (id FlashblocksWSClientID) ChainID() eth.ChainID

func (FlashblocksWSClientID) LogValue added in v1.16.3

func (id FlashblocksWSClientID) LogValue() slog.Value

func (FlashblocksWSClientID) MarshalText added in v1.16.3

func (id FlashblocksWSClientID) MarshalText() ([]byte, error)

func (FlashblocksWSClientID) Match added in v1.16.3

func (FlashblocksWSClientID) String added in v1.16.3

func (id FlashblocksWSClientID) String() string

func (*FlashblocksWSClientID) UnmarshalText added in v1.16.3

func (id *FlashblocksWSClientID) UnmarshalText(data []byte) error

type FnOption

type FnOption[O Orchestrator] struct {
	BeforeDeployFn func(orch O)
	DeployFn       func(orch O)
	AfterDeployFn  func(orch O)
	FinallyFn      func(orch O)
	PreHydrateFn   func(sys System)
	PostHydrateFn  func(sys System)
}

FnOption defines an option with more flexible function instances per option lifecycle stage. Each nil attribute is simply a no-op when not set.

func (FnOption[O]) AfterDeploy

func (f FnOption[O]) AfterDeploy(orch O)

func (FnOption[O]) BeforeDeploy

func (f FnOption[O]) BeforeDeploy(orch O)

func (FnOption[O]) Deploy

func (f FnOption[O]) Deploy(orch O)

func (FnOption[O]) Finally

func (f FnOption[O]) Finally(orch O)

func (FnOption[O]) PostHydrate

func (f FnOption[O]) PostHydrate(sys System)

func (FnOption[O]) PreHydrate added in v1.13.4

func (f FnOption[O]) PreHydrate(sys System)

type GenericID added in v1.13.4

type GenericID interface {
	slog.LogValuer
	KindProvider
}

Defined types based on genericID should implement this interface so they may be used as logging attributes.

type ID added in v1.16.7

type ID[T KindMarker] struct {
	ComponentID
}

ID is a type-safe wrapper around ComponentID. The type parameter T must implement KindMarker to enable unmarshaling. This prevents accidentally mixing up different ID types (e.g., L2BatcherID vs L2ELNodeID).

func SortIDs added in v1.16.7

func SortIDs[T KindMarker](ids []ID[T]) []ID[T]

SortIDs sorts a slice of IDs of any type.

func (ID[T]) AsComponentID added in v1.16.7

func (id ID[T]) AsComponentID() ComponentID

AsComponentID returns the underlying ComponentID. This is useful when you need to work with IDs in a type-erased context.

func (ID[T]) Kind added in v1.16.7

func (id ID[T]) Kind() ComponentKind

Kind returns the ComponentKind for this ID type. Unlike ComponentID.Kind(), this works even on zero values.

func (ID[T]) Less added in v1.16.7

func (id ID[T]) Less(other ID[T]) bool

Less compares two IDs of the same type for sorting.

func (ID[T]) LogValue added in v1.16.7

func (id ID[T]) LogValue() slog.Value

func (ID[T]) MarshalText added in v1.16.7

func (id ID[T]) MarshalText() ([]byte, error)

func (ID[T]) String added in v1.16.7

func (id ID[T]) String() string

func (*ID[T]) UnmarshalText added in v1.16.7

func (id *ID[T]) UnmarshalText(data []byte) error

type IDOnlyChainID added in v1.13.4

type IDOnlyChainID interface {
	slog.LogValuer
	ChainIDProvider
	KindProvider
}

Defined types based on idOnlyChainID should implement this interface so they may be used as logging attributes.

type IDShape added in v1.16.7

type IDShape uint8

IDShape defines which fields an ID uses.

const (
	// IDShapeKeyAndChain indicates the ID has both a key and chainID (e.g., L2Batcher-mynode-420)
	IDShapeKeyAndChain IDShape = iota
	// IDShapeChainOnly indicates the ID has only a chainID (e.g., L1Network-1)
	IDShapeChainOnly
	// IDShapeKeyOnly indicates the ID has only a key (e.g., Supervisor-mysupervisor)
	IDShapeKeyOnly
)

type IDWithChain added in v1.13.4

type IDWithChain interface {
	slog.LogValuer
	ChainIDProvider
	KindProvider
	Keyed
}

Defined types based on idWithChain should implement this interface so they may be used as logging attributes.

type Identifiable

type Identifiable[I comparable] interface {
	ID() I
}

type InteropTestControl added in v1.16.7

type InteropTestControl interface {
	// PauseInteropActivity pauses the interop activity at the given timestamp.
	// When the interop activity attempts to process this timestamp, it returns early.
	// This function is for integration test control only.
	PauseInteropActivity(ts uint64)

	// ResumeInteropActivity clears any pause on the interop activity, allowing normal processing.
	// This function is for integration test control only.
	ResumeInteropActivity()
}

InteropTestControl provides integration test control methods for the interop activity. This interface is for integration test control only.

type Keyed added in v1.13.4

type Keyed interface {
	Key() string
}

Keyed presents a type that provides a relevant string key. E.g. a named superchain.

type Keys

type Keys interface {
	Secret(key devkeys.Key) *ecdsa.PrivateKey
	Address(key devkeys.Key) common.Address
}

type Kind

type Kind string

Kind represents a kind of component, this is used to make each ID unique, even when encoded as text.

const ClusterKind Kind = "Cluster"
const ConductorKind Kind = "Conductor"
const FaucetKind Kind = "Faucet"
const FlashblocksWSClientKind Kind = "FlashblocksWSClient"
const L1CLNodeKind Kind = "L1CLNode"
const L1ELNodeKind Kind = "L1ELNode"
const L1NetworkKind Kind = "L1Network"
const L2BatcherKind Kind = "L2Batcher"
const L2CLNodeKind Kind = "L2CLNode"
const L2ChallengerKind Kind = "L2Challenger"
const L2ELNodeKind Kind = "L2ELNode"
const L2NetworkKind Kind = "L2Network"
const L2ProposerKind Kind = "L2Proposer"
const OPRBuilderNodeKind Kind = "OPRBuilderNode"
const RollupBoostNodeKind Kind = "RollupBoostNode"
const SuperchainKind Kind = "Superchain"
const SupernodeKind Kind = "Supernode"
const SupervisorKind Kind = "Supervisor"
const SyncTesterKind Kind = "SyncTester"
const TestSequencerKind Kind = "TestSequencer"

func KindFromContext added in v1.13.4

func KindFromContext(ctx context.Context) Kind

KindFromContext extracts the kind from the context.

func (Kind) LogValue added in v1.13.4

func (k Kind) LogValue() slog.Value

func (Kind) MarshalText

func (k Kind) MarshalText() ([]byte, error)

func (Kind) String

func (k Kind) String() string

func (*Kind) UnmarshalText

func (k *Kind) UnmarshalText(data []byte) error

type KindMarker added in v1.16.7

type KindMarker interface {
	// contains filtered or unexported methods
}

KindMarker is implemented by marker types to associate them with their ComponentKind. This enables type-safe unmarshaling of ID[T] types.

type KindProvider added in v1.13.4

type KindProvider interface {
	Kind() Kind
}

KindProvider presents a type that provides a relevant Kind. E.g. an L2BatcherKind.

type L1CLMatcher

type L1CLMatcher = Matcher[L1CLNodeID, L1CLNode]

type L1CLNode

type L1CLNode interface {
	Common
	ID() L1CLNodeID

	BeaconClient() apis.BeaconClient
}

L1CLNode is a L1 ethereum consensus-layer node, aka Beacon node. This node may not be a full beacon node, and instead run a mock L1 consensus node.

func SortL1CLNodes

func SortL1CLNodes(elems []L1CLNode) []L1CLNode

type L1CLNodeID

type L1CLNodeID idWithChain

L1CLNodeID identifies a L1CLNode by name and chainID, is type-safe, and can be value-copied and used as map key.

func NewL1CLNodeID added in v1.13.4

func NewL1CLNodeID(key string, chainID eth.ChainID) L1CLNodeID

func SortL1CLNodeIDs

func SortL1CLNodeIDs(ids []L1CLNodeID) []L1CLNodeID

func (L1CLNodeID) ChainID added in v1.13.4

func (id L1CLNodeID) ChainID() eth.ChainID

func (L1CLNodeID) Key added in v1.13.4

func (id L1CLNodeID) Key() string

func (L1CLNodeID) Kind added in v1.13.4

func (id L1CLNodeID) Kind() Kind

func (L1CLNodeID) LogValue added in v1.13.4

func (id L1CLNodeID) LogValue() slog.Value

func (L1CLNodeID) MarshalText

func (id L1CLNodeID) MarshalText() ([]byte, error)

func (L1CLNodeID) Match

func (id L1CLNodeID) Match(elems []L1CLNode) []L1CLNode

func (L1CLNodeID) String

func (id L1CLNodeID) String() string

func (*L1CLNodeID) UnmarshalText

func (id *L1CLNodeID) UnmarshalText(data []byte) error

type L1CLNodeID2 added in v1.16.7

type L1CLNodeID2 = ID[L1CLNodeMarker]

Type-safe ID type aliases using marker types. These maintain backward compatibility with existing code.

func ConvertL1CLNodeID added in v1.16.7

func ConvertL1CLNodeID(old L1CLNodeID) L1CLNodeID2

ConvertL1CLNodeID converts an old L1CLNodeID to the new system.

func NewL1CLNodeID2 added in v1.16.7

func NewL1CLNodeID2(key string, chainID eth.ChainID) L1CLNodeID2

type L1CLNodeMarker added in v1.16.7

type L1CLNodeMarker struct{}

Marker types for each component kind. Each marker implements KindMarker to associate it with the correct ComponentKind.

type L1ELMatcher

type L1ELMatcher = Matcher[L1ELNodeID, L1ELNode]

type L1ELNode

type L1ELNode interface {
	ID() L1ELNodeID

	ELNode
}

L1ELNode is a L1 ethereum execution-layer node

func SortL1ELNodes

func SortL1ELNodes(elems []L1ELNode) []L1ELNode

type L1ELNodeID

type L1ELNodeID idWithChain

L1ELNodeID identifies a L1ELNode by name and chainID, is type-safe, and can be value-copied and used as map key.

func NewL1ELNodeID added in v1.13.4

func NewL1ELNodeID(key string, chainID eth.ChainID) L1ELNodeID

func SortL1ELNodeIDs

func SortL1ELNodeIDs(ids []L1ELNodeID) []L1ELNodeID

func (L1ELNodeID) ChainID added in v1.13.4

func (id L1ELNodeID) ChainID() eth.ChainID

func (L1ELNodeID) Key added in v1.13.4

func (id L1ELNodeID) Key() string

func (L1ELNodeID) Kind added in v1.13.4

func (id L1ELNodeID) Kind() Kind

func (L1ELNodeID) LogValue added in v1.13.4

func (id L1ELNodeID) LogValue() slog.Value

func (L1ELNodeID) MarshalText

func (id L1ELNodeID) MarshalText() ([]byte, error)

func (L1ELNodeID) Match

func (id L1ELNodeID) Match(elems []L1ELNode) []L1ELNode

func (L1ELNodeID) String

func (id L1ELNodeID) String() string

func (*L1ELNodeID) UnmarshalText

func (id *L1ELNodeID) UnmarshalText(data []byte) error

type L1ELNodeID2 added in v1.16.7

type L1ELNodeID2 = ID[L1ELNodeMarker]

Type-safe ID type aliases using marker types. These maintain backward compatibility with existing code.

func ConvertL1ELNodeID added in v1.16.7

func ConvertL1ELNodeID(old L1ELNodeID) L1ELNodeID2

ConvertL1ELNodeID converts an old L1ELNodeID to the new system.

func NewL1ELNodeID2 added in v1.16.7

func NewL1ELNodeID2(key string, chainID eth.ChainID) L1ELNodeID2

type L1ELNodeMarker added in v1.16.7

type L1ELNodeMarker struct{}

Marker types for each component kind. Each marker implements KindMarker to associate it with the correct ComponentKind.

type L1Network

type L1Network interface {
	Network
	ID() L1NetworkID

	L1ELNode(m L1ELMatcher) L1ELNode
	L1CLNode(m L1CLMatcher) L1CLNode

	L1ELNodeIDs() []L1ELNodeID
	L1CLNodeIDs() []L1CLNodeID

	L1ELNodes() []L1ELNode
	L1CLNodes() []L1CLNode
}

L1Network represents a L1 chain, a collection of configuration and node resources.

func SortL1Networks

func SortL1Networks(elems []L1Network) []L1Network

type L1NetworkID

type L1NetworkID idOnlyChainID

L1NetworkID identifies a L1Network by name and chainID, is type-safe, and can be value-copied and used as map key.

func SortL1NetworkIDs

func SortL1NetworkIDs(ids []L1NetworkID) []L1NetworkID

func (L1NetworkID) ChainID

func (id L1NetworkID) ChainID() eth.ChainID

func (L1NetworkID) Kind added in v1.13.4

func (id L1NetworkID) Kind() Kind

func (L1NetworkID) LogValue added in v1.13.4

func (id L1NetworkID) LogValue() slog.Value

func (L1NetworkID) MarshalText

func (id L1NetworkID) MarshalText() ([]byte, error)

func (L1NetworkID) Match

func (id L1NetworkID) Match(elems []L1Network) []L1Network

func (L1NetworkID) String

func (id L1NetworkID) String() string

func (*L1NetworkID) UnmarshalText

func (id *L1NetworkID) UnmarshalText(data []byte) error

type L1NetworkID2 added in v1.16.7

type L1NetworkID2 = ID[L1NetworkMarker]

Type-safe ID type aliases using marker types. These maintain backward compatibility with existing code.

func ConvertL1NetworkID added in v1.16.7

func ConvertL1NetworkID(old L1NetworkID) L1NetworkID2

ConvertL1NetworkID converts an old L1NetworkID to the new system.

func NewL1NetworkID2 added in v1.16.7

func NewL1NetworkID2(chainID eth.ChainID) L1NetworkID2

type L1NetworkMarker added in v1.16.7

type L1NetworkMarker struct{}

Marker types for each component kind. Each marker implements KindMarker to associate it with the correct ComponentKind.

type L1NetworkMatcher

type L1NetworkMatcher = Matcher[L1NetworkID, L1Network]

type L2Batcher

type L2Batcher interface {
	Common
	ID() L2BatcherID
	ActivityAPI() apis.BatcherActivity
}

L2Batcher represents an L2 batch-submission service, posting L2 data of an L2 to L1.

func SortL2Batchers

func SortL2Batchers(elems []L2Batcher) []L2Batcher

type L2BatcherID

type L2BatcherID idWithChain

L2BatcherID identifies a L2Batcher by name and chainID, is type-safe, and can be value-copied and used as map key.

func NewL2BatcherID added in v1.13.4

func NewL2BatcherID(key string, chainID eth.ChainID) L2BatcherID

func SortL2BatcherIDs

func SortL2BatcherIDs(ids []L2BatcherID) []L2BatcherID

func (L2BatcherID) ChainID added in v1.13.4

func (id L2BatcherID) ChainID() eth.ChainID

func (L2BatcherID) Key added in v1.13.4

func (id L2BatcherID) Key() string

func (L2BatcherID) Kind added in v1.13.4

func (id L2BatcherID) Kind() Kind

func (L2BatcherID) LogValue added in v1.13.4

func (id L2BatcherID) LogValue() slog.Value

func (L2BatcherID) MarshalText

func (id L2BatcherID) MarshalText() ([]byte, error)

func (L2BatcherID) Match

func (id L2BatcherID) Match(elems []L2Batcher) []L2Batcher

func (L2BatcherID) String

func (id L2BatcherID) String() string

func (*L2BatcherID) UnmarshalText

func (id *L2BatcherID) UnmarshalText(data []byte) error

type L2BatcherID2 added in v1.16.7

type L2BatcherID2 = ID[L2BatcherMarker]

Type-safe ID type aliases using marker types. These maintain backward compatibility with existing code.

func ConvertL2BatcherID added in v1.16.7

func ConvertL2BatcherID(old L2BatcherID) L2BatcherID2

ConvertL2BatcherID converts an old L2BatcherID to the new system.

func NewL2BatcherID2 added in v1.16.7

func NewL2BatcherID2(key string, chainID eth.ChainID) L2BatcherID2

type L2BatcherMarker added in v1.16.7

type L2BatcherMarker struct{}

Marker types for each component kind. Each marker implements KindMarker to associate it with the correct ComponentKind.

type L2BatcherMatcher

type L2BatcherMatcher = Matcher[L2BatcherID, L2Batcher]

type L2CLMatcher

type L2CLMatcher = Matcher[L2CLNodeID, L2CLNode]

type L2CLNode

type L2CLNode interface {
	Common
	ID() L2CLNodeID

	ClientRPC() client.RPC
	RollupAPI() apis.RollupClient
	P2PAPI() apis.P2PClient
	InteropRPC() (endpoint string, jwtSecret eth.Bytes32)
	UserRPC() string

	// ELs returns the engine(s) that this L2CLNode is connected to.
	// This may be empty, if the L2CL is not connected to any.
	ELs() []L2ELNode
	RollupBoostNodes() []RollupBoostNode
	OPRBuilderNodes() []OPRBuilderNode

	ELClient() apis.EthClient
}

L2CLNode is a L2 ethereum consensus-layer node

func SortL2CLNodes

func SortL2CLNodes(elems []L2CLNode) []L2CLNode

type L2CLNodeID

type L2CLNodeID idWithChain

L2CLNodeID identifies a L2CLNode by name and chainID, is type-safe, and can be value-copied and used as map key.

func NewL2CLNodeID added in v1.13.4

func NewL2CLNodeID(key string, chainID eth.ChainID) L2CLNodeID

func SortL2CLNodeIDs

func SortL2CLNodeIDs(ids []L2CLNodeID) []L2CLNodeID

func (L2CLNodeID) ChainID added in v1.13.4

func (id L2CLNodeID) ChainID() eth.ChainID

func (L2CLNodeID) Key added in v1.13.4

func (id L2CLNodeID) Key() string

func (L2CLNodeID) Kind added in v1.13.4

func (id L2CLNodeID) Kind() Kind

func (L2CLNodeID) LogValue added in v1.13.4

func (id L2CLNodeID) LogValue() slog.Value

func (L2CLNodeID) MarshalText

func (id L2CLNodeID) MarshalText() ([]byte, error)

func (L2CLNodeID) Match

func (id L2CLNodeID) Match(elems []L2CLNode) []L2CLNode

func (L2CLNodeID) String

func (id L2CLNodeID) String() string

func (*L2CLNodeID) UnmarshalText

func (id *L2CLNodeID) UnmarshalText(data []byte) error

type L2CLNodeID2 added in v1.16.7

type L2CLNodeID2 = ID[L2CLNodeMarker]

Type-safe ID type aliases using marker types. These maintain backward compatibility with existing code.

func ConvertL2CLNodeID added in v1.16.7

func ConvertL2CLNodeID(old L2CLNodeID) L2CLNodeID2

ConvertL2CLNodeID converts an old L2CLNodeID to the new system.

func NewL2CLNodeID2 added in v1.16.7

func NewL2CLNodeID2(key string, chainID eth.ChainID) L2CLNodeID2

type L2CLNodeMarker added in v1.16.7

type L2CLNodeMarker struct{}

Marker types for each component kind. Each marker implements KindMarker to associate it with the correct ComponentKind.

type L2Challenger

type L2Challenger interface {
	Common
	ID() L2ChallengerID
	Config() *config.Config
}

func SortL2Challengers

func SortL2Challengers(elems []L2Challenger) []L2Challenger

type L2ChallengerID

type L2ChallengerID idWithChain

L2ChallengerID identifies a L2Challenger by name and chainID, is type-safe, and can be value-copied and used as map key.

func NewL2ChallengerID added in v1.13.4

func NewL2ChallengerID(key string, chainID eth.ChainID) L2ChallengerID

func SortL2ChallengerIDs

func SortL2ChallengerIDs(ids []L2ChallengerID) []L2ChallengerID

func (L2ChallengerID) ChainID added in v1.13.4

func (id L2ChallengerID) ChainID() eth.ChainID

func (L2ChallengerID) Key added in v1.13.4

func (id L2ChallengerID) Key() string

func (L2ChallengerID) Kind added in v1.13.4

func (id L2ChallengerID) Kind() Kind

func (L2ChallengerID) LogValue added in v1.13.4

func (id L2ChallengerID) LogValue() slog.Value

func (L2ChallengerID) MarshalText

func (id L2ChallengerID) MarshalText() ([]byte, error)

func (L2ChallengerID) Match

func (id L2ChallengerID) Match(elems []L2Challenger) []L2Challenger

func (L2ChallengerID) String

func (id L2ChallengerID) String() string

func (*L2ChallengerID) UnmarshalText

func (id *L2ChallengerID) UnmarshalText(data []byte) error

type L2ChallengerID2 added in v1.16.7

type L2ChallengerID2 = ID[L2ChallengerMarker]

Type-safe ID type aliases using marker types. These maintain backward compatibility with existing code.

func ConvertL2ChallengerID added in v1.16.7

func ConvertL2ChallengerID(old L2ChallengerID) L2ChallengerID2

ConvertL2ChallengerID converts an old L2ChallengerID to the new system.

func NewL2ChallengerID2 added in v1.16.7

func NewL2ChallengerID2(key string, chainID eth.ChainID) L2ChallengerID2

type L2ChallengerMarker added in v1.16.7

type L2ChallengerMarker struct{}

Marker types for each component kind. Each marker implements KindMarker to associate it with the correct ComponentKind.

type L2ChallengerMatcher

type L2ChallengerMatcher = Matcher[L2ChallengerID, L2Challenger]

type L2Deployment

type L2Deployment interface {
	SystemConfigProxyAddr() common.Address
	DisputeGameFactoryProxyAddr() common.Address
	L1StandardBridgeProxyAddr() common.Address
}

type L2ELMatcher

type L2ELMatcher = Matcher[L2ELNodeID, L2ELNode]

type L2ELNode

type L2ELNode interface {
	ID() L2ELNodeID
	L2EthClient() apis.L2EthClient
	L2EngineClient() apis.EngineClient

	ELNode
}

L2ELNode is a L2 ethereum execution-layer node

func SortL2ELNodes

func SortL2ELNodes(elems []L2ELNode) []L2ELNode

type L2ELNodeID

type L2ELNodeID idWithChain

L2ELNodeID identifies a L2ELNode by name and chainID, is type-safe, and can be value-copied and used as map key.

func NewL2ELNodeID added in v1.13.4

func NewL2ELNodeID(key string, chainID eth.ChainID) L2ELNodeID

func SortL2ELNodeIDs

func SortL2ELNodeIDs(ids []L2ELNodeID) []L2ELNodeID

func (L2ELNodeID) ChainID added in v1.13.4

func (id L2ELNodeID) ChainID() eth.ChainID

func (L2ELNodeID) Key added in v1.13.4

func (id L2ELNodeID) Key() string

func (L2ELNodeID) Kind added in v1.13.4

func (id L2ELNodeID) Kind() Kind

func (L2ELNodeID) LogValue added in v1.13.4

func (id L2ELNodeID) LogValue() slog.Value

func (L2ELNodeID) MarshalText

func (id L2ELNodeID) MarshalText() ([]byte, error)

func (L2ELNodeID) Match

func (id L2ELNodeID) Match(elems []L2ELNode) []L2ELNode

func (L2ELNodeID) String

func (id L2ELNodeID) String() string

func (*L2ELNodeID) UnmarshalText

func (id *L2ELNodeID) UnmarshalText(data []byte) error

type L2ELNodeID2 added in v1.16.7

type L2ELNodeID2 = ID[L2ELNodeMarker]

Type-safe ID type aliases using marker types. These maintain backward compatibility with existing code.

func ConvertL2ELNodeID added in v1.16.7

func ConvertL2ELNodeID(old L2ELNodeID) L2ELNodeID2

ConvertL2ELNodeID converts an old L2ELNodeID to the new system.

func NewL2ELNodeID2 added in v1.16.7

func NewL2ELNodeID2(key string, chainID eth.ChainID) L2ELNodeID2

type L2ELNodeMarker added in v1.16.7

type L2ELNodeMarker struct{}

Marker types for each component kind. Each marker implements KindMarker to associate it with the correct ComponentKind.

type L2Network

type L2Network interface {
	Network
	ID() L2NetworkID
	RollupConfig() *rollup.Config
	Deployment() L2Deployment
	Keys() Keys

	Superchain() Superchain
	L1() L1Network
	Cluster() Cluster

	L2Batcher(m L2BatcherMatcher) L2Batcher
	L2Proposer(m L2ProposerMatcher) L2Proposer
	L2Challenger(m L2ChallengerMatcher) L2Challenger
	L2CLNode(m L2CLMatcher) L2CLNode
	L2ELNode(m L2ELMatcher) L2ELNode
	Conductor(m ConductorMatcher) Conductor
	RollupBoostNode(m RollupBoostNodeMatcher) RollupBoostNode
	OPRBuilderNode(m OPRBuilderNodeMatcher) OPRBuilderNode

	L2BatcherIDs() []L2BatcherID
	L2ProposerIDs() []L2ProposerID
	L2ChallengerIDs() []L2ChallengerID
	L2CLNodeIDs() []L2CLNodeID
	L2ELNodeIDs() []L2ELNodeID

	L2Batchers() []L2Batcher
	L2Proposers() []L2Proposer
	L2Challengers() []L2Challenger
	L2CLNodes() []L2CLNode
	L2ELNodes() []L2ELNode
	Conductors() []Conductor
	RollupBoostNodes() []RollupBoostNode
	OPRBuilderNodes() []OPRBuilderNode
}

L2Network represents a L2 chain, a collection of configuration and node resources. There is an extension-interface ExtensibleL2Network for adding new components to the chain.

func SortL2Networks

func SortL2Networks(elems []L2Network) []L2Network

type L2NetworkID

type L2NetworkID idOnlyChainID

L2NetworkID identifies a L2Network by name and chainID, is type-safe, and can be value-copied and used as map key.

func SortL2NetworkIDs

func SortL2NetworkIDs(ids []L2NetworkID) []L2NetworkID

func (L2NetworkID) ChainID

func (id L2NetworkID) ChainID() eth.ChainID

func (L2NetworkID) Kind added in v1.13.4

func (id L2NetworkID) Kind() Kind

func (L2NetworkID) LogValue added in v1.13.4

func (id L2NetworkID) LogValue() slog.Value

func (L2NetworkID) MarshalText

func (id L2NetworkID) MarshalText() ([]byte, error)

func (L2NetworkID) Match

func (id L2NetworkID) Match(elems []L2Network) []L2Network

func (L2NetworkID) String

func (id L2NetworkID) String() string

func (*L2NetworkID) UnmarshalText

func (id *L2NetworkID) UnmarshalText(data []byte) error

type L2NetworkID2 added in v1.16.7

type L2NetworkID2 = ID[L2NetworkMarker]

Type-safe ID type aliases using marker types. These maintain backward compatibility with existing code.

func ConvertL2NetworkID added in v1.16.7

func ConvertL2NetworkID(old L2NetworkID) L2NetworkID2

ConvertL2NetworkID converts an old L2NetworkID to the new system.

func NewL2NetworkID2 added in v1.16.7

func NewL2NetworkID2(chainID eth.ChainID) L2NetworkID2

type L2NetworkMarker added in v1.16.7

type L2NetworkMarker struct{}

Marker types for each component kind. Each marker implements KindMarker to associate it with the correct ComponentKind.

type L2NetworkMatcher

type L2NetworkMatcher = Matcher[L2NetworkID, L2Network]

type L2Proposer

type L2Proposer interface {
	Common
	ID() L2ProposerID
}

L2Proposer is a L2 output proposer, posting claims of L2 state to L1.

func SortL2Proposers

func SortL2Proposers(elems []L2Proposer) []L2Proposer

type L2ProposerID

type L2ProposerID idWithChain

L2ProposerID identifies a L2Proposer by name and chainID, is type-safe, and can be value-copied and used as map key.

func NewL2ProposerID added in v1.13.4

func NewL2ProposerID(key string, chainID eth.ChainID) L2ProposerID

func SortL2ProposerIDs

func SortL2ProposerIDs(ids []L2ProposerID) []L2ProposerID

func (L2ProposerID) ChainID added in v1.13.4

func (id L2ProposerID) ChainID() eth.ChainID

func (L2ProposerID) Key added in v1.13.4

func (id L2ProposerID) Key() string

func (L2ProposerID) Kind added in v1.13.4

func (id L2ProposerID) Kind() Kind

func (L2ProposerID) LogValue added in v1.13.4

func (id L2ProposerID) LogValue() slog.Value

func (L2ProposerID) MarshalText

func (id L2ProposerID) MarshalText() ([]byte, error)

func (L2ProposerID) Match

func (id L2ProposerID) Match(elems []L2Proposer) []L2Proposer

func (L2ProposerID) String

func (id L2ProposerID) String() string

func (*L2ProposerID) UnmarshalText

func (id *L2ProposerID) UnmarshalText(data []byte) error

type L2ProposerID2 added in v1.16.7

type L2ProposerID2 = ID[L2ProposerMarker]

Type-safe ID type aliases using marker types. These maintain backward compatibility with existing code.

func ConvertL2ProposerID added in v1.16.7

func ConvertL2ProposerID(old L2ProposerID) L2ProposerID2

ConvertL2ProposerID converts an old L2ProposerID to the new system.

func NewL2ProposerID2 added in v1.16.7

func NewL2ProposerID2(key string, chainID eth.ChainID) L2ProposerID2

type L2ProposerMarker added in v1.16.7

type L2ProposerMarker struct{}

Marker types for each component kind. Each marker implements KindMarker to associate it with the correct ComponentKind.

type L2ProposerMatcher

type L2ProposerMatcher = Matcher[L2ProposerID, L2Proposer]

type Lifecycle

type Lifecycle interface {
	Start()
	Stop()
}

Lifecycle represents a controllable component by ControlPlane

type LinkableL2CLNode

type LinkableL2CLNode interface {
	// Links the nodes. Does not make any backend changes, just registers the EL as connected to this CL.
	LinkEL(el L2ELNode)
	LinkRollupBoostNode(rollupBoostNode RollupBoostNode)
	LinkOPRBuilderNode(oprb OPRBuilderNode)
}

type Matcher

type Matcher[I comparable, E Identifiable[I]] interface {
	// Match finds the elements that pass the matcher.
	// If no element passes, it returns an empty slice.
	// Callers should guarantee a stable order of ids, to ensure a deterministic match.
	Match(elems []E) []E

	// String must describe the matcher for debugging purposes.
	// This does not get used for matching.
	String() string
}

Matcher abstracts what can be used as getter-method argument. All ID types implement this interface, and lookup functions check if the argument is an ID before searching for a match. This enables lookups such as getting a component by labels, by its state, by its relation to other components, etc.

type Network

type Network interface {
	Common

	ChainID() eth.ChainID

	ChainConfig() *params.ChainConfig

	Faucet(m FaucetMatcher) Faucet
	Faucets() []Faucet
	FaucetIDs() []FaucetID

	SyncTester(m SyncTesterMatcher) SyncTester
	SyncTesters() []SyncTester
	SyncTesterIDs() []SyncTesterID
}

Network is an interface to an ethereum chain and its resources, with common properties between L1 and L2. For L1 or L2 specifics, see L1Network and L2Network extensions. A network hosts configuration resources and tracks participating nodes.

type OPRBuilderNode added in v1.16.3

type OPRBuilderNode interface {
	ID() OPRBuilderNodeID
	L2EthClient() apis.L2EthClient
	L2EngineClient() apis.EngineClient
	FlashblocksClient() *client.WSClient

	ELNode
}

L2ELNode is a L2 ethereum execution-layer node

func SortOPRBuilderNodes added in v1.16.3

func SortOPRBuilderNodes(elems []OPRBuilderNode) []OPRBuilderNode

type OPRBuilderNodeID added in v1.16.3

type OPRBuilderNodeID idWithChain

OPRBuilderNodeID identifies a L2ELNode by name and chainID, is type-safe, and can be value-copied and used as map key.

func NewOPRBuilderNodeID added in v1.16.3

func NewOPRBuilderNodeID(key string, chainID eth.ChainID) OPRBuilderNodeID

func SortOPRBuilderIDs added in v1.16.3

func SortOPRBuilderIDs(ids []OPRBuilderNodeID) []OPRBuilderNodeID

func (OPRBuilderNodeID) ChainID added in v1.16.3

func (id OPRBuilderNodeID) ChainID() eth.ChainID

func (OPRBuilderNodeID) Key added in v1.16.3

func (id OPRBuilderNodeID) Key() string

func (OPRBuilderNodeID) Kind added in v1.16.3

func (id OPRBuilderNodeID) Kind() Kind

func (OPRBuilderNodeID) LogValue added in v1.16.3

func (id OPRBuilderNodeID) LogValue() slog.Value

func (OPRBuilderNodeID) MarshalText added in v1.16.3

func (id OPRBuilderNodeID) MarshalText() ([]byte, error)

func (OPRBuilderNodeID) Match added in v1.16.3

func (id OPRBuilderNodeID) Match(elems []OPRBuilderNode) []OPRBuilderNode

func (OPRBuilderNodeID) String added in v1.16.3

func (id OPRBuilderNodeID) String() string

func (*OPRBuilderNodeID) UnmarshalText added in v1.16.3

func (id *OPRBuilderNodeID) UnmarshalText(data []byte) error

type OPRBuilderNodeID2 added in v1.16.7

type OPRBuilderNodeID2 = ID[OPRBuilderNodeMarker]

Type-safe ID type aliases using marker types. These maintain backward compatibility with existing code.

func ConvertOPRBuilderNodeID added in v1.16.7

func ConvertOPRBuilderNodeID(old OPRBuilderNodeID) OPRBuilderNodeID2

ConvertOPRBuilderNodeID converts an old OPRBuilderNodeID to the new system.

func NewOPRBuilderNodeID2 added in v1.16.7

func NewOPRBuilderNodeID2(key string, chainID eth.ChainID) OPRBuilderNodeID2

type OPRBuilderNodeMarker added in v1.16.7

type OPRBuilderNodeMarker struct{}

Marker types for each component kind. Each marker implements KindMarker to associate it with the correct ComponentKind.

type OPRBuilderNodeMatcher added in v1.16.3

type OPRBuilderNodeMatcher = Matcher[OPRBuilderNodeID, OPRBuilderNode]

type Option

type Option[O Orchestrator] interface {
	// BeforeDeploy runs before any chain is created/deployed
	BeforeDeploy(orch O)
	// Deploy runs the deployment
	Deploy(orch O)
	// AfterDeploy runs after chains are created/deployed
	AfterDeploy(orch O)
	// Finally runs at the very end of orchestrator setup,
	// but before any test-scope is created.
	Finally(orch O)
	// SystemHook is embedded: Options may expose system hooks, to run in test-scope.
	SystemHook
}

Option is used to define a change that inspects and/or changes a System during the lifecycle.

func AfterDeploy

func AfterDeploy[O Orchestrator](fn func(orch O)) Option[O]

AfterDeploy registers a function to run after the deployment stage of the orchestrator. This may be used to customize the orchestrator, after having deployment configuration in place.

func BeforeDeploy

func BeforeDeploy[O Orchestrator](fn func(orch O)) Option[O]

BeforeDeploy registers a function to run before the deployment stage of the orchestrator. This may be used to customize deployment settings.

func Deploy

func Deploy[O Orchestrator](fn func(orch O)) Option[O]

Deploy registers a function to run during the deployment stage of the orchestrator. This may be used to perform deployments.

func Finally

func Finally[O Orchestrator](fn func(orch O)) Option[O]

Finally registers a function to run at the end of orchestrator setup. This may be used for any orchestrator post-validation, or to export any of the now ready orchestrator resources.

func PostHydrate

func PostHydrate[O Orchestrator](fn func(sys System)) Option[O]

PostHydrate hooks up an option callback to run when a new System has been hydrated by the Orchestrator. This is essentially a test-case preamble, to globally configure checks or gates that should run on the test-scope level. Test post-checks can be configured with sys.T().Cleanup(...).

func PreHydrate added in v1.13.4

func PreHydrate[O Orchestrator](fn func(sys System)) Option[O]

PreHydrate hooks up an option callback to run before a new System has been hydrated by the Orchestrator.

type Orchestrator

type Orchestrator interface {
	// P is the test-handle of the orchestrator.
	// This may not be a Go-test handle.
	// Orchestrators may be instantiated by dev-tools or test-package TestMain functions.
	P() devtest.P

	// Hydrate adds all services that the orchestrator is aware of to the given system.
	// An orchestrator may be asked to hydrate different systems, one for each test.
	Hydrate(sys ExtensibleSystem)

	ControlPlane() ControlPlane

	Type() compat.Type
}

Orchestrator is the base interface for all system orchestrators. It imposes some common things across all orchestrators, but may also have optional extensions, that not every type of backend might support.

type RollupBoostNode added in v1.16.3

type RollupBoostNode interface {
	ID() RollupBoostNodeID
	L2EthClient() apis.L2EthClient
	L2EngineClient() apis.EngineClient
	FlashblocksClient() *client.WSClient

	ELNode
}

RollupBoostNode is a shim service between an L2 consensus-layer node and an L2 ethereum execution-layer node

func SortRollupBoostNodes added in v1.16.3

func SortRollupBoostNodes(elems []RollupBoostNode) []RollupBoostNode

type RollupBoostNodeID added in v1.16.3

type RollupBoostNodeID L2ELNodeID

RollupBoostNodeID identifies a RollupBoost node by name and chainID, is type-safe, and can be value-copied and used as map key.

func NewRollupBoostNodeID added in v1.16.3

func NewRollupBoostNodeID(key string, chainID eth.ChainID) RollupBoostNodeID

func SortRollupBoostIDs added in v1.16.3

func SortRollupBoostIDs(ids []RollupBoostNodeID) []RollupBoostNodeID

func (RollupBoostNodeID) ChainID added in v1.16.3

func (id RollupBoostNodeID) ChainID() eth.ChainID

func (RollupBoostNodeID) Key added in v1.16.3

func (id RollupBoostNodeID) Key() string

func (RollupBoostNodeID) Kind added in v1.16.3

func (id RollupBoostNodeID) Kind() Kind

func (RollupBoostNodeID) LogValue added in v1.16.3

func (id RollupBoostNodeID) LogValue() slog.Value

func (RollupBoostNodeID) MarshalText added in v1.16.3

func (id RollupBoostNodeID) MarshalText() ([]byte, error)

func (RollupBoostNodeID) Match added in v1.16.3

func (RollupBoostNodeID) String added in v1.16.3

func (id RollupBoostNodeID) String() string

func (*RollupBoostNodeID) UnmarshalText added in v1.16.3

func (id *RollupBoostNodeID) UnmarshalText(data []byte) error

type RollupBoostNodeID2 added in v1.16.7

type RollupBoostNodeID2 = ID[RollupBoostNodeMarker]

Type-safe ID type aliases using marker types. These maintain backward compatibility with existing code.

func ConvertRollupBoostNodeID added in v1.16.7

func ConvertRollupBoostNodeID(old RollupBoostNodeID) RollupBoostNodeID2

ConvertRollupBoostNodeID converts an old RollupBoostNodeID to the new system.

func NewRollupBoostNodeID2 added in v1.16.7

func NewRollupBoostNodeID2(key string, chainID eth.ChainID) RollupBoostNodeID2

type RollupBoostNodeMarker added in v1.16.7

type RollupBoostNodeMarker struct{}

Marker types for each component kind. Each marker implements KindMarker to associate it with the correct ComponentKind.

type RollupBoostNodeMatcher added in v1.16.3

type RollupBoostNodeMatcher = Matcher[RollupBoostNodeID, RollupBoostNode]

type Superchain

type Superchain interface {
	Common
	ID() SuperchainID

	Deployment() SuperchainDeployment
}

Superchain is a collection of L2 chains with common rules and shared configuration on L1

func SortSuperchains

func SortSuperchains(elems []Superchain) []Superchain

type SuperchainDeployment

type SuperchainDeployment interface {
	ProtocolVersionsAddr() common.Address
	SuperchainConfigAddr() common.Address
}

type SuperchainID

type SuperchainID genericID

SuperchainID identifies a Superchain by name, is type-safe, and can be value-copied and used as map key.

func SortSuperchainIDs

func SortSuperchainIDs(ids []SuperchainID) []SuperchainID

func (SuperchainID) Kind added in v1.13.4

func (id SuperchainID) Kind() Kind

func (SuperchainID) LogValue added in v1.13.4

func (id SuperchainID) LogValue() slog.Value

func (SuperchainID) MarshalText

func (id SuperchainID) MarshalText() ([]byte, error)

func (SuperchainID) Match

func (id SuperchainID) Match(elems []Superchain) []Superchain

func (SuperchainID) String

func (id SuperchainID) String() string

func (*SuperchainID) UnmarshalText

func (id *SuperchainID) UnmarshalText(data []byte) error

type SuperchainID2 added in v1.16.7

type SuperchainID2 = ID[SuperchainMarker]

Type-safe ID type aliases using marker types. These maintain backward compatibility with existing code.

func ConvertSuperchainID added in v1.16.7

func ConvertSuperchainID(old SuperchainID) SuperchainID2

ConvertSuperchainID converts an old SuperchainID to the new system.

func NewSuperchainID2 added in v1.16.7

func NewSuperchainID2(key string) SuperchainID2

type SuperchainMarker added in v1.16.7

type SuperchainMarker struct{}

Marker types for each component kind. Each marker implements KindMarker to associate it with the correct ComponentKind.

type SuperchainMatcher

type SuperchainMatcher = Matcher[SuperchainID, Superchain]

type Supernode added in v1.16.7

type Supernode interface {
	Common
	ID() SupernodeID
	QueryAPI() apis.SupernodeQueryAPI
}

func SortSupernodes added in v1.16.7

func SortSupernodes(elems []Supernode) []Supernode

type SupernodeID added in v1.16.7

type SupernodeID genericID

SupernodeID identifies a Supernode by name, is type-safe, and can be value-copied and used as map key.

func NewSupernodeID added in v1.16.7

func NewSupernodeID(key string, chains ...eth.ChainID) SupernodeID

func SortSupernodeIDs added in v1.16.7

func SortSupernodeIDs(ids []SupernodeID) []SupernodeID

func (SupernodeID) Kind added in v1.16.7

func (id SupernodeID) Kind() Kind

func (SupernodeID) LogValue added in v1.16.7

func (id SupernodeID) LogValue() slog.Value

func (SupernodeID) MarshalText added in v1.16.7

func (id SupernodeID) MarshalText() ([]byte, error)

func (SupernodeID) Match added in v1.16.7

func (id SupernodeID) Match(elems []Supernode) []Supernode

func (SupernodeID) String added in v1.16.7

func (id SupernodeID) String() string

func (*SupernodeID) UnmarshalText added in v1.16.7

func (id *SupernodeID) UnmarshalText(data []byte) error

type SupernodeMatcher added in v1.16.7

type SupernodeMatcher = Matcher[SupernodeID, Supernode]

type Supervisor

type Supervisor interface {
	Common
	ID() SupervisorID

	AdminAPI() apis.SupervisorAdminAPI
	QueryAPI() apis.SupervisorQueryAPI
}

Supervisor is an interop service, used to cross-verify messages between chains.

func SortSupervisors

func SortSupervisors(elems []Supervisor) []Supervisor

type SupervisorID

type SupervisorID genericID

SupervisorID identifies a Supervisor by name and chainID, is type-safe, and can be value-copied and used as map key.

func SortSupervisorIDs

func SortSupervisorIDs(ids []SupervisorID) []SupervisorID

func (SupervisorID) Kind added in v1.13.4

func (id SupervisorID) Kind() Kind

func (SupervisorID) LogValue added in v1.13.4

func (id SupervisorID) LogValue() slog.Value

func (SupervisorID) MarshalText

func (id SupervisorID) MarshalText() ([]byte, error)

func (SupervisorID) Match

func (id SupervisorID) Match(elems []Supervisor) []Supervisor

func (SupervisorID) String

func (id SupervisorID) String() string

func (*SupervisorID) UnmarshalText

func (id *SupervisorID) UnmarshalText(data []byte) error

type SupervisorID2 added in v1.16.7

type SupervisorID2 = ID[SupervisorMarker]

Type-safe ID type aliases using marker types. These maintain backward compatibility with existing code.

func ConvertSupervisorID added in v1.16.7

func ConvertSupervisorID(old SupervisorID) SupervisorID2

ConvertSupervisorID converts an old SupervisorID to the new system.

func NewSupervisorID2 added in v1.16.7

func NewSupervisorID2(key string) SupervisorID2

type SupervisorMarker added in v1.16.7

type SupervisorMarker struct{}

Marker types for each component kind. Each marker implements KindMarker to associate it with the correct ComponentKind.

type SupervisorMatcher

type SupervisorMatcher = Matcher[SupervisorID, Supervisor]

type SyncTester added in v1.13.6

type SyncTester interface {
	Common
	ID() SyncTesterID
	API() apis.SyncTester

	APIWithSession(sessionID string) apis.SyncTester
}

func SortSyncTesters added in v1.13.6

func SortSyncTesters(elems []SyncTester) []SyncTester

type SyncTesterID added in v1.13.6

type SyncTesterID idWithChain

SyncTesterID identifies a syncTester by name and chainID, is type-safe, and can be value-copied and used as map key.

func NewSyncTesterID added in v1.13.6

func NewSyncTesterID(key string, chainID eth.ChainID) SyncTesterID

func SortSyncTesterIDs added in v1.13.6

func SortSyncTesterIDs(ids []SyncTesterID) []SyncTesterID

func (SyncTesterID) ChainID added in v1.13.6

func (id SyncTesterID) ChainID() eth.ChainID

func (SyncTesterID) Key added in v1.13.6

func (id SyncTesterID) Key() string

func (SyncTesterID) Kind added in v1.13.6

func (id SyncTesterID) Kind() Kind

func (SyncTesterID) LogValue added in v1.13.6

func (id SyncTesterID) LogValue() slog.Value

func (SyncTesterID) MarshalText added in v1.13.6

func (id SyncTesterID) MarshalText() ([]byte, error)

func (SyncTesterID) Match added in v1.13.6

func (id SyncTesterID) Match(elems []SyncTester) []SyncTester

func (SyncTesterID) String added in v1.13.6

func (id SyncTesterID) String() string

func (*SyncTesterID) UnmarshalText added in v1.13.6

func (id *SyncTesterID) UnmarshalText(data []byte) error

type SyncTesterID2 added in v1.16.7

type SyncTesterID2 = ID[SyncTesterMarker]

Type-safe ID type aliases using marker types. These maintain backward compatibility with existing code.

func ConvertSyncTesterID added in v1.16.7

func ConvertSyncTesterID(old SyncTesterID) SyncTesterID2

ConvertSyncTesterID converts an old SyncTesterID to the new system.

func NewSyncTesterID2 added in v1.16.7

func NewSyncTesterID2(key string, chainID eth.ChainID) SyncTesterID2

type SyncTesterMarker added in v1.16.7

type SyncTesterMarker struct{}

Marker types for each component kind. Each marker implements KindMarker to associate it with the correct ComponentKind.

type SyncTesterMatcher added in v1.13.6

type SyncTesterMatcher = Matcher[SyncTesterID, SyncTester]

type System

type System interface {
	Common

	Superchain(m SuperchainMatcher) Superchain
	Cluster(m ClusterMatcher) Cluster
	L1Network(m L1NetworkMatcher) L1Network
	L2Network(m L2NetworkMatcher) L2Network

	Network(id eth.ChainID) Network

	Supervisor(m SupervisorMatcher) Supervisor
	Supernode(m SupernodeMatcher) Supernode
	TestSequencer(id TestSequencerMatcher) TestSequencer

	SuperchainIDs() []SuperchainID
	ClusterIDs() []ClusterID
	L1NetworkIDs() []L1NetworkID
	L2NetworkIDs() []L2NetworkID
	SupervisorIDs() []SupervisorID

	Superchains() []Superchain
	Clusters() []Cluster
	L1Networks() []L1Network
	L2Networks() []L2Network
	Supervisors() []Supervisor
	Supernodes() []Supernode
	TestSequencers() []TestSequencer
}

System represents a collection of L1 and L2 chains, any superchains or clusters, and any peripherals.

type SystemHook

type SystemHook interface {
	// PreHydrate runs before a system is hydrated,
	// to prepare settings on the system like logging, or inspect test-scope
	PreHydrate(sys System)

	// PostHydrate runs after a system is hydrated, to run any checks.
	// This may register validation that runs at the end of the test, using the sys.T().Cleanup function.
	PostHydrate(sys System)
}

type TestSequencer added in v1.13.4

type TestSequencer interface {
	Common
	ID() TestSequencerID

	AdminAPI() apis.TestSequencerAdminAPI
	BuildAPI() apis.TestSequencerBuildAPI
	ControlAPI(chainID eth.ChainID) apis.TestSequencerControlAPI
}

TestSequencer

func SortTestSequencers added in v1.13.4

func SortTestSequencers(elems []TestSequencer) []TestSequencer

type TestSequencerID added in v1.13.4

type TestSequencerID genericID

TestSequencerID identifies a TestSequencer by name and chainID, is type-safe, and can be value-copied and used as map key.

func SortTestSequencerIDs added in v1.13.4

func SortTestSequencerIDs(ids []TestSequencerID) []TestSequencerID

func (TestSequencerID) Kind added in v1.13.4

func (id TestSequencerID) Kind() Kind

func (TestSequencerID) LogValue added in v1.13.4

func (id TestSequencerID) LogValue() slog.Value

func (TestSequencerID) MarshalText added in v1.13.4

func (id TestSequencerID) MarshalText() ([]byte, error)

func (TestSequencerID) String added in v1.13.4

func (id TestSequencerID) String() string

func (*TestSequencerID) UnmarshalText added in v1.13.4

func (id *TestSequencerID) UnmarshalText(data []byte) error

type TestSequencerID2 added in v1.16.7

type TestSequencerID2 = ID[TestSequencerMarker]

Type-safe ID type aliases using marker types. These maintain backward compatibility with existing code.

func ConvertTestSequencerID added in v1.16.7

func ConvertTestSequencerID(old TestSequencerID) TestSequencerID2

ConvertTestSequencerID converts an old TestSequencerID to the new system.

func NewTestSequencerID2 added in v1.16.7

func NewTestSequencerID2(key string) TestSequencerID2

type TestSequencerMarker added in v1.16.7

type TestSequencerMarker struct{}

Marker types for each component kind. Each marker implements KindMarker to associate it with the correct ComponentKind.

type TestSequencerMatcher added in v1.13.4

type TestSequencerMatcher = Matcher[TestSequencerID, TestSequencer]

type TimeTravelClock added in v1.13.4

type TimeTravelClock interface {
	AdvanceTime(d time.Duration)
}

type TimeTravelOrchestrator added in v1.13.4

type TimeTravelOrchestrator interface {
	EnableTimeTravel()
}

type TimeTravelSystem added in v1.13.4

type TimeTravelSystem interface {
	System
	SetTimeTravelClock(cl TimeTravelClock)
	TimeTravelEnabled() bool
	AdvanceTime(amount time.Duration)
}

TimeTravelSystem is an extension-interface to support time travel.

Directories

Path Synopsis
Package match provides matching presets and utils for selecting devstack components.
Package match provides matching presets and utils for selecting devstack components.

Jump to

Keyboard shortcuts

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