consensus

package
v1.12.0 Latest Latest
Warning

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

Go to latest
Published: May 14, 2026 License: GPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EngineAPINewPayload

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

EngineAPINewPayload is an event that represents timing data for an engine_newPayload call.

func NewEngineAPINewPayload

func NewEngineAPINewPayload(
	log observability.ContextualLogger, data *EngineAPINewPayloadData,
	now time.Time,
	beacon *ethereum.BeaconNode,
	duplicateCache *ttlcache.Cache[string, time.Time],
	clientMeta *xatu.ClientMeta,
) *EngineAPINewPayload

NewEngineAPINewPayload creates a new EngineAPINewPayload event.

func (*EngineAPINewPayload) Decorate

Decorate decorates the event with additional metadata and returns a DecoratedEvent.

func (*EngineAPINewPayload) ShouldIgnore

func (e *EngineAPINewPayload) ShouldIgnore(ctx context.Context) (bool, error)

ShouldIgnore checks if the event should be ignored based on duplicate detection. We use a hash of the event data as the cache key since each unique call should only be reported once.

type EngineAPINewPayloadData

type EngineAPINewPayloadData struct {
	// Timing
	RequestedAt time.Time
	DurationMs  uint64

	// Beacon context
	Slot            uint64
	BlockRoot       string
	ParentBlockRoot string
	ProposerIndex   uint64

	// Execution payload
	BlockNumber uint64
	BlockHash   string
	ParentHash  string
	GasUsed     uint64
	GasLimit    uint64
	TxCount     uint32
	BlobCount   uint32

	// Response
	Status          string
	LatestValidHash string
	ValidationError string

	// Meta
	MethodVersion string
}

EngineAPINewPayloadData contains the data for an engine_newPayload call event.

Jump to

Keyboard shortcuts

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