engine

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MetricsSubsystem = "engine"

	ForkchoiceUpdatedV3MethodName = "forkchoiceUpdatedV3"
	GetPayloadV3MethodName        = "getPayloadV3"
	NewPayloadV3MethodName        = "newPayloadV3"
)

Variables

View Source
var RPCMethodDurationBucketsMicroseconds = []float64{1, 10, 50, 100, 500, 1000}

Functions

This section is empty.

Types

type DB

type DB interface {
	HeaderByHash(hash common.Hash) (*monomer.Header, error)
	Height() (uint64, error)
	UpdateLabels(unsafe, safe, finalized common.Hash) error
	HeaderByHeight(height uint64) (*monomer.Header, error)
	HeadHeader() (*monomer.Header, error)
}

type EngineAPI

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

EngineAPI implements the Engine API. It assumes it is the sole block proposer.

func NewEngineAPI

func NewEngineAPI(
	b *builder.Builder,
	txValidator TxValidator,
	blockStore DB,
	metrics Metrics,
) *EngineAPI

func (*EngineAPI) ForkchoiceUpdatedV1

func (e *EngineAPI) ForkchoiceUpdatedV1(
	ctx context.Context,
	fcs eth.ForkchoiceState,
	pa *eth.PayloadAttributes,
) (*eth.ForkchoiceUpdatedResult, error)

func (*EngineAPI) ForkchoiceUpdatedV2

func (e *EngineAPI) ForkchoiceUpdatedV2(
	ctx context.Context,
	fcs eth.ForkchoiceState,
	pa *eth.PayloadAttributes,
) (*eth.ForkchoiceUpdatedResult, error)

func (*EngineAPI) ForkchoiceUpdatedV3

func (e *EngineAPI) ForkchoiceUpdatedV3(
	ctx context.Context,
	fcs eth.ForkchoiceState,
	pa *eth.PayloadAttributes,
) (*eth.ForkchoiceUpdatedResult, error)

func (*EngineAPI) GetPayloadV1

func (e *EngineAPI) GetPayloadV1(ctx context.Context, payloadID engine.PayloadID) (*eth.ExecutionPayloadEnvelope, error)

func (*EngineAPI) GetPayloadV2

func (e *EngineAPI) GetPayloadV2(ctx context.Context, payloadID engine.PayloadID) (*eth.ExecutionPayloadEnvelope, error)

func (*EngineAPI) GetPayloadV3

func (e *EngineAPI) GetPayloadV3(ctx context.Context, payloadID engine.PayloadID) (*eth.ExecutionPayloadEnvelope, error)

GetPayloadV3 seals a payload that is currently being built (i.e. was introduced in the PayloadAttributes from a previous ForkchoiceUpdated call).

func (*EngineAPI) NewPayloadV1

func (e *EngineAPI) NewPayloadV1(payload eth.ExecutionPayload) (*eth.PayloadStatusV1, error)

func (*EngineAPI) NewPayloadV2

func (e *EngineAPI) NewPayloadV2(payload eth.ExecutionPayload) (*eth.PayloadStatusV1, error)

func (*EngineAPI) NewPayloadV3

func (e *EngineAPI) NewPayloadV3(payload eth.ExecutionPayload) (*eth.PayloadStatusV1, error)

NewPayloadV3 ensures the payload's block hash is present in the block store.

type Metrics

type Metrics interface {
	rpcmetrics.Metrics
}

Metrics contains metrics collected from the engine package.

func NewMetrics

func NewMetrics(namespace string) Metrics

func NewNoopMetrics

func NewNoopMetrics() Metrics

type TxValidator

type TxValidator interface {
	CheckTx(context.Context, *abci.RequestCheckTx) (*abci.ResponseCheckTx, error)
}

Jump to

Keyboard shortcuts

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