node_utils

package
v1.16.6 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2026 License: MIT, MIT Imports: 23 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultOpSequencerGeth = 0
	DefaultOpSequencerReth = 0

	DefaultKonaSequencerGeth = 0
	DefaultKonaSequencerReth = 1

	DefaultOpValidatorGeth = 0
	DefaultOpValidatorReth = 0

	DefaultKonaValidatorGeth = 3
	DefaultKonaValidatorReth = 3
)
View Source
const (
	DEFAULT_TIMEOUT = 10 * time.Second
)
View Source
const DefaultL1ID = 900
View Source
const DefaultL2ID = 901

Variables

This section is empty.

Functions

func AsyncGetPrefixedWs

func AsyncGetPrefixedWs[T any, Out any](t devtest.T, node *dsl.L2CLNode, prefix string, method string, runUntil <-chan T) <-chan Out

func GetDevWS

func GetDevWS[T any](t devtest.T, node *dsl.L2CLNode, method string, runUntil <-chan T) []uint64

func GetDevWSAsync

func GetDevWSAsync[T any](t devtest.T, node *dsl.L2CLNode, method string, runUntil <-chan T) <-chan uint64

func GetKonaWs

func GetKonaWs[T any](t devtest.T, node *dsl.L2CLNode, method string, runUntil <-chan T) []eth.L2BlockRef

func GetKonaWsAsync

func GetKonaWsAsync[T any](t devtest.T, node *dsl.L2CLNode, method string, runUntil <-chan T) <-chan eth.L2BlockRef

func GetNodeRPCEndpoint

func GetNodeRPCEndpoint(node *dsl.L2CLNode) client.RPC

func GetPrefixedWs

func GetPrefixedWs[T any, Out any](t devtest.T, node *dsl.L2CLNode, prefix string, method string, runUntil <-chan T) []Out

func L2CLNodes

func L2CLNodes(nodes []stack.L2CLNode, orch stack.Orchestrator) []dsl.L2CLNode

func L2ELNodes

func L2ELNodes(nodes []stack.L2ELNode, orch stack.Orchestrator) []dsl.L2ELNode

func L2NodeMatcher

func L2NodeMatcher[
	I interface {
		comparable
		Key() string
	}, E stack.Identifiable[I]](value ...string) stack.Matcher[I, E]

func MatchedWithinRange

func MatchedWithinRange(t devtest.T, baseNode, refNode dsl.L2CLNode, delta uint64, lvl types.SafetyLevel, attempts int) dsl.CheckFunc

func SendRPCRequest

func SendRPCRequest[T any](clientRPC client.RPC, method string, resOutput *T, params ...any) error

func WithMixedOpKona

func WithMixedOpKona(l2NodeConfig L2NodeConfig) stack.CommonOption

func WithMixedWithTestSequencer

func WithMixedWithTestSequencer(l2Config L2NodeConfig) stack.CommonOption

Types

type DefaultMinimalWithTestSequencerIds

type DefaultMinimalWithTestSequencerIds struct {
	DefaultMixedOpKonaSystemIDs DefaultMixedOpKonaSystemIDs
	TestSequencerId             stack.TestSequencerID
}

func NewDefaultMinimalWithTestSequencerIds

func NewDefaultMinimalWithTestSequencerIds(l2Config L2NodeConfig) DefaultMinimalWithTestSequencerIds

type DefaultMixedOpKonaSystemIDs

type DefaultMixedOpKonaSystemIDs struct {
	L1   stack.L1NetworkID
	L1EL stack.L1ELNodeID
	L1CL stack.L1CLNodeID

	L2 stack.L2NetworkID

	L2ELOpGethSequencerNodes []stack.L2ELNodeID
	L2ELOpRethSequencerNodes []stack.L2ELNodeID

	L2CLOpGethSequencerNodes []stack.L2CLNodeID
	L2CLOpRethSequencerNodes []stack.L2CLNodeID

	L2ELKonaGethSequencerNodes []stack.L2ELNodeID
	L2ELKonaRethSequencerNodes []stack.L2ELNodeID

	L2CLKonaGethSequencerNodes []stack.L2CLNodeID
	L2CLKonaRethSequencerNodes []stack.L2CLNodeID

	L2CLOpGethNodes []stack.L2CLNodeID
	L2ELOpGethNodes []stack.L2ELNodeID

	L2CLOpRethNodes []stack.L2CLNodeID
	L2ELOpRethNodes []stack.L2ELNodeID

	L2CLKonaGethNodes []stack.L2CLNodeID
	L2ELKonaGethNodes []stack.L2ELNodeID

	L2CLKonaRethNodes []stack.L2CLNodeID
	L2ELKonaRethNodes []stack.L2ELNodeID

	L2Batcher  stack.L2BatcherID
	L2Proposer stack.L2ProposerID
}

func NewDefaultMixedOpKonaSystemIDs

func NewDefaultMixedOpKonaSystemIDs(l1ID, l2ID eth.ChainID, l2NodeConfig L2NodeConfig) DefaultMixedOpKonaSystemIDs

func (*DefaultMixedOpKonaSystemIDs) L2CLNodes

func (ids *DefaultMixedOpKonaSystemIDs) L2CLNodes() []stack.L2CLNodeID

func (*DefaultMixedOpKonaSystemIDs) L2CLSequencerNodes

func (ids *DefaultMixedOpKonaSystemIDs) L2CLSequencerNodes() []stack.L2CLNodeID

func (*DefaultMixedOpKonaSystemIDs) L2CLValidatorNodes

func (ids *DefaultMixedOpKonaSystemIDs) L2CLValidatorNodes() []stack.L2CLNodeID

func (*DefaultMixedOpKonaSystemIDs) L2ELNodes

func (ids *DefaultMixedOpKonaSystemIDs) L2ELNodes() []stack.L2ELNodeID

func (*DefaultMixedOpKonaSystemIDs) L2ELSequencerNodes

func (ids *DefaultMixedOpKonaSystemIDs) L2ELSequencerNodes() []stack.L2ELNodeID

func (*DefaultMixedOpKonaSystemIDs) L2ELValidatorNodes

func (ids *DefaultMixedOpKonaSystemIDs) L2ELValidatorNodes() []stack.L2ELNodeID

type L2NodeConfig

type L2NodeConfig struct {
	OpSequencerNodesWithGeth   int
	OpSequencerNodesWithReth   int
	KonaSequencerNodesWithGeth int
	KonaSequencerNodesWithReth int
	OpNodesWithGeth            int
	OpNodesWithReth            int
	KonaNodesWithGeth          int
	KonaNodesWithReth          int
}

func ParseL2NodeConfigFromEnv

func ParseL2NodeConfigFromEnv() L2NodeConfig

func (L2NodeConfig) KonaSequencerNodes

func (l2NodeConfig L2NodeConfig) KonaSequencerNodes() int

func (L2NodeConfig) KonaValidatorNodes

func (l2NodeConfig L2NodeConfig) KonaValidatorNodes() int

func (L2NodeConfig) OpSequencerNodes

func (l2NodeConfig L2NodeConfig) OpSequencerNodes() int

func (L2NodeConfig) OpValidatorNodes

func (l2NodeConfig L2NodeConfig) OpValidatorNodes() int

func (L2NodeConfig) TotalNodes

func (l2NodeConfig L2NodeConfig) TotalNodes() int

type L2NodeKind

type L2NodeKind string
const (
	OpNode    L2NodeKind = "op"
	KonaNode  L2NodeKind = "kona"
	Sequencer L2NodeKind = "sequencer"
	Validator L2NodeKind = "validator"
)

type MinimalWithConductors

type MinimalWithConductors struct {
	*MixedOpKonaPreset

	ConductorSets map[stack.L2NetworkID]dsl.ConductorSet
}

func NewMixedOpKonaWithConductors

func NewMixedOpKonaWithConductors(t devtest.T) *MinimalWithConductors

type MinimalWithTestSequencersPreset

type MinimalWithTestSequencersPreset struct {
	*MixedOpKonaPreset

	TestSequencer dsl.TestSequencer
}

func NewMixedOpKonaWithTestSequencer

func NewMixedOpKonaWithTestSequencer(t devtest.T) *MinimalWithTestSequencersPreset

type MixedOpKonaPreset

type MixedOpKonaPreset struct {
	Log          log.Logger
	T            devtest.T
	ControlPlane stack.ControlPlane

	L1Network *dsl.L1Network
	L1EL      *dsl.L1ELNode

	L2Chain   *dsl.L2Network
	L2Batcher *dsl.L2Batcher

	L2ELKonaSequencerNodes []dsl.L2ELNode
	L2CLKonaSequencerNodes []dsl.L2CLNode

	L2ELOpSequencerNodes []dsl.L2ELNode
	L2CLOpSequencerNodes []dsl.L2CLNode

	L2ELOpValidatorNodes []dsl.L2ELNode
	L2CLOpValidatorNodes []dsl.L2CLNode

	L2ELKonaValidatorNodes []dsl.L2ELNode
	L2CLKonaValidatorNodes []dsl.L2CLNode

	Wallet *dsl.HDWallet

	FaucetL1 *dsl.Faucet
	Faucet   *dsl.Faucet
	FunderL1 *dsl.Funder
	Funder   *dsl.Funder
}

func NewMixedOpKona

func NewMixedOpKona(t devtest.T) *MixedOpKonaPreset

func (*MixedOpKonaPreset) L2CLKonaNodes

func (m *MixedOpKonaPreset) L2CLKonaNodes() []dsl.L2CLNode

func (*MixedOpKonaPreset) L2CLNodes

func (m *MixedOpKonaPreset) L2CLNodes() []dsl.L2CLNode

L2CLNodes returns all the L2CL nodes in the network (op-nodes and kona-nodes), validator and sequencer.

func (*MixedOpKonaPreset) L2CLSequencerNodes

func (m *MixedOpKonaPreset) L2CLSequencerNodes() []dsl.L2CLNode

L2CLSequencerNodes returns all the sequencer L2CL nodes in the network (op-nodes and kona-nodes).

func (*MixedOpKonaPreset) L2CLValidatorNodes

func (m *MixedOpKonaPreset) L2CLValidatorNodes() []dsl.L2CLNode

L2CLValidatorNodes returns all the validator L2CL nodes in the network (op-nodes and kona-nodes).

func (*MixedOpKonaPreset) L2ELNodes

func (m *MixedOpKonaPreset) L2ELNodes() []dsl.L2ELNode

L2ELNodes returns all the L2EL nodes in the network (op-reth, op-geth, etc.), validator and sequencer.

func (*MixedOpKonaPreset) L2ELSequencerNodes

func (m *MixedOpKonaPreset) L2ELSequencerNodes() []dsl.L2ELNode

L2ELSequencerNodes returns all the sequencer L2EL nodes in the network (op-reth, op-geth, etc.).

func (*MixedOpKonaPreset) L2ELValidatorNodes

func (m *MixedOpKonaPreset) L2ELValidatorNodes() []dsl.L2ELNode

L2ELValidatorNodes returns all the validator L2EL nodes in the network (op-reth, op-geth, etc.).

func (*MixedOpKonaPreset) L2Networks

func (m *MixedOpKonaPreset) L2Networks() []*dsl.L2Network

Jump to

Keyboard shortcuts

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