el

package
v1.19.2 Latest Latest
Warning

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

Go to latest
Published: Jun 26, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package el is the single construction seam for op-e2e's L2 execution layer. It selects between in-process op-geth and external-process op-reth based on the requested ELKind, so call sites never construct an EL backend directly. It lives apart from the geth/reth/services packages to avoid an import cycle.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitL2

func InitL2(ctx context.Context, cfg L2Config) (services.EthInstance, error)

InitL2 constructs and starts the requested L2 EL backend, returning it as a services.EthInstance. The geth lifecycle (Node.Start) is folded in here; op-reth is already started and ready when reth.InitL2 returns.

Types

type L2Config

type L2Config struct {
	Kind    services.ELKind
	Name    string
	Genesis *core.Genesis
	JWTPath string
	Logger  log.Logger
	// SequencerHTTP, when set, points non-sequencer nodes at the sequencer for
	// tx forwarding. On op-reth it maps to --rollup.sequencer-http.
	SequencerHTTP string
	// DataDir is the op-reth base directory. Callers must pass t.TempDir() so the
	// test framework owns cleanup. Ignored by the in-process op-geth backend.
	DataDir string
	// GethOptions are op-geth-only knobs. They cannot apply to op-reth; passing
	// any on the op-reth path is a hard error (see InitL2).
	GethOptions []geth.GethOption
}

L2Config carries everything needed to construct an L2 EL backend.

Jump to

Keyboard shortcuts

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