stack

package
v1.16.9 Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2026 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

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

Types

type Common

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

	// 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 Conductor added in v1.13.4

type Conductor interface {
	Common
	ChainID() eth.ChainID

	RpcAPI() conductorRpc.API
}

type ELNode

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

type Faucet

type Faucet interface {
	Common
	ChainID() eth.ChainID
	API() apis.Faucet
}

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 Keys

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

type L1CLNode

type L1CLNode interface {
	Common
	ChainID() eth.ChainID

	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.

type L1ELNode

type L1ELNode interface {
	ELNode
}

L1ELNode is a L1 ethereum execution-layer node

type L1Network

type L1Network interface {
	Network

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

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

type L2Batcher

type L2Batcher interface {
	Common
	ChainID() eth.ChainID
	ActivityAPI() apis.BatcherActivity
}

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

type L2CLNode

type L2CLNode interface {
	Common
	ChainID() eth.ChainID

	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

type L2Challenger

type L2Challenger interface {
	Common
	ChainID() eth.ChainID
	Config() *config.Config
}

type L2Deployment

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

type L2ELNode

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

	ELNode
}

L2ELNode is a L2 ethereum execution-layer node

type L2Network

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

	L1() L1Network

	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.

type L2Proposer

type L2Proposer interface {
	Common
	ChainID() eth.ChainID
}

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

type Lifecycle

type Lifecycle interface {
	Start()
	Stop()
}

type Network

type Network interface {
	Common

	ChainID() eth.ChainID

	ChainConfig() *params.ChainConfig

	Faucets() []Faucet

	SyncTesters() []SyncTester
}

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 {
	L2EthClient() apis.L2EthClient
	L2EngineClient() apis.EngineClient
	FlashblocksClient() *client.WSClient
	UpdateRuleSet(rulesYaml string) error

	ELNode
}

OPRBuilderNode is a L2 ethereum execution-layer node

type RollupBoostNode added in v1.16.3

type RollupBoostNode interface {
	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

type SuperchainDeployment

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

type Supernode added in v1.16.7

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

type Supervisor

type Supervisor interface {
	Common

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

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

type SyncTester added in v1.13.6

type SyncTester interface {
	Common
	ChainID() eth.ChainID
	API() apis.SyncTester

	APIWithSession(sessionID string) apis.SyncTester
}

type TestSequencer added in v1.13.4

type TestSequencer interface {
	Common

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

TestSequencer

Jump to

Keyboard shortcuts

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