engine_controller

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: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNoEngineClient = errors.New("engine client not initialized")
	ErrNoRollupConfig = errors.New("rollup config not available")
)
View Source
var (
	ErrRewindTargetBlockNotFound        = errors.New("failed to get target block at timestamp")
	ErrRewindComputeTargetsFailed       = errors.New("failed to compute rewind targets")
	ErrRewindInsertSyntheticFailed      = errors.New("failed to insert synthetic payload")
	ErrRewindSyntheticPayloadRejected   = errors.New("synthetic payload rejected by engine")
	ErrRewindFCUSyntheticFailed         = errors.New("failed to FCU to synthetic block")
	ErrRewindFCUTargetFailed            = errors.New("failed to FCU to target block")
	ErrRewindVerificationFailed         = errors.New("rewind state verification failed")
	ErrRewindFCURejected                = errors.New("forkchoice update rejected by engine")
	ErrRewindTimestampToBlockConversion = errors.New("failed to convert timestamp to block number")
	ErrRewindPayloadNotFound            = errors.New("failed to get payload for block")
	ErrRewindOverFinalizedHead          = errors.New("cannot rewind over finalized head")
)

Functions

This section is empty.

Types

type EngineController

type EngineController interface {
	// L2BlockRefByNumber returns the L2 block reference for the given block number.
	L2BlockRefByNumber(ctx context.Context, num uint64) (eth.L2BlockRef, error)
	// OutputV0AtBlockNumber returns the output preimage for the given L2 block number.
	OutputV0AtBlockNumber(ctx context.Context, num uint64) (*eth.OutputV0, error)
	// RewindToTimestamp rewinds the L2 execution layer to block at or before the given timestamp.
	RewindToTimestamp(ctx context.Context, timestamp uint64) error
	// FetchReceipts fetches the receipts for a given block by hash.
	FetchReceipts(ctx context.Context, blockHash common.Hash) (eth.BlockInfo, types.Receipts, error)
	// Close releases any underlying RPC resources.
	Close() error
}

EngineController abstracts access to the L2 execution layer

func NewEngineControllerFromConfig added in v1.16.3

func NewEngineControllerFromConfig(ctx context.Context, log gethlog.Logger, vncfg *opnodecfg.Config) (EngineController, error)

NewEngineControllerFromConfig builds an engine client from the op-node L2 endpoint config. This creates a separate connection (not passed as an override to op-node).

func NewEngineControllerWithL2 added in v1.16.3

func NewEngineControllerWithL2(l2 l2Provider) EngineController

NewEngineControllerWithL2 wraps an existing L2 provider.

func NewEngineControllerWithL2AndRollup added in v1.16.7

func NewEngineControllerWithL2AndRollup(l2 l2Provider, rollup *rollup.Config) EngineController

Jump to

Keyboard shortcuts

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