opgeth

package
v1.20.2 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2026 License: MIT Imports: 26 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrForkChoiceUpdated is returned when a forkChoiceUpdated returns an error
	ErrForkChoiceUpdated = errors.New("forkChoiceUpdated status was not valid")
	// ErrForkChoiceUpdatedNotValid is returned when a forkChoiceUpdated returns a status other than Valid
	ErrForkChoiceUpdatedNotValid = errors.New("forkChoiceUpdated status was not valid")
	// ErrNewPayloadNotValid is returned when a newPayload call returns a status other than Valid, indicating the new block is invalid
	ErrNewPayloadNotValid = errors.New("newPayload status was not valid")
)

Functions

This section is empty.

Types

type OpGeth

type OpGeth struct {
	L2Client      *ethclient.Client
	SystemConfig  eth.SystemConfig
	L1ChainConfig *params.ChainConfig
	L2ChainConfig *params.ChainConfig
	L1Head        eth.BlockInfo
	L2Head        *eth.ExecutionPayload
	// contains filtered or unexported fields
}

OpGeth is an actor that functions as a l2 op-geth node It provides useful functions for advancing and querying the chain

func NewOpGeth

func NewOpGeth(t testing.TB, ctx context.Context, cfg *e2esys.SystemConfig) (*OpGeth, error)

func (*OpGeth) AddL2Block

func (d *OpGeth) AddL2Block(ctx context.Context, txs ...*types.Transaction) (*eth.ExecutionPayloadEnvelope, error)

AddL2Block Appends a new L2 block to the current chain including the specified transactions The L1Info transaction is automatically prepended to the created block

func (*OpGeth) Close

func (d *OpGeth) Close()

func (*OpGeth) CreatePayloadAttributes

func (d *OpGeth) CreatePayloadAttributes(txs ...*types.Transaction) (*eth.PayloadAttributes, error)

CreatePayloadAttributes creates a valid PayloadAttributes containing a L1Info deposit transaction followed by the supplied transactions.

func (*OpGeth) StartBlockBuilding

func (d *OpGeth) StartBlockBuilding(ctx context.Context, attrs *eth.PayloadAttributes) (*eth.ForkchoiceUpdatedResult, error)

StartBlockBuilding begins block building for the specified PayloadAttributes by sending a engine_forkChoiceUpdated call. The current L2Head is used as the parent of the new block. ErrForkChoiceUpdatedNotValid is returned if the forkChoiceUpdate call returns a status other than valid.

Jump to

Keyboard shortcuts

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