attributes

package
v1.11.2 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2025 License: MIT, MIT Imports: 18 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrCanyonMustHaveWithdrawals       = errors.New("canyon: expected withdrawals in block to be non-nil and empty")
	ErrCanyonWithdrawalsRoot           = errors.New("canyon: expected withdrawalsRoot in block to be default")
	ErrBedrockMustHaveEmptyWithdrawals = errors.New("bedrock: expected withdrawals in attributes to be nil")
	ErrIsthmusMustHaveWithdrawalsRoot  = errors.New("isthmus: expected withdrawalsRoot in block to be non-nil")
	ErrNilBlockOrAttributes            = errors.New("nil attributes or block")
)

Functions

func AttributesMatchBlock

func AttributesMatchBlock(rollupCfg *rollup.Config, attrs *eth.PayloadAttributes, parentHash common.Hash, envelope *eth.ExecutionPayloadEnvelope, l log.Logger) error

AttributesMatchBlock checks if the L2 attributes pre-inputs match the output nil if it is a match. If err is not nil, the error contains the reason for the mismatch

Types

type AttributesHandler

type AttributesHandler struct {
	// contains filtered or unexported fields
}

func NewAttributesHandler

func NewAttributesHandler(log log.Logger, cfg *rollup.Config, ctx context.Context, l2 L2) *AttributesHandler

func (*AttributesHandler) AttachEmitter added in v1.8.0

func (eq *AttributesHandler) AttachEmitter(em event.Emitter)

func (*AttributesHandler) OnEvent added in v1.8.0

func (eq *AttributesHandler) OnEvent(ev event.Event) bool

type L2

type L2 interface {
	PayloadByNumber(context.Context, uint64) (*eth.ExecutionPayloadEnvelope, error)
}

Jump to

Keyboard shortcuts

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