Documentation ¶
Index ¶
- type EngineAPI
- type EngineServer
- func (e *EngineServer) ExchangeCapabilities(fromCl []string) []string
- func (e *EngineServer) ExchangeTransitionConfigurationV1(ctx context.Context, beaconConfig *engine_types.TransitionConfiguration) (*engine_types.TransitionConfiguration, error)
- func (e *EngineServer) ForkchoiceUpdatedV1(ctx context.Context, forkChoiceState *engine_types.ForkChoiceState, ...) (*engine_types.ForkChoiceUpdatedResponse, error)
- func (e *EngineServer) ForkchoiceUpdatedV2(ctx context.Context, forkChoiceState *engine_types.ForkChoiceState, ...) (*engine_types.ForkChoiceUpdatedResponse, error)
- func (e *EngineServer) ForkchoiceUpdatedV3(ctx context.Context, forkChoiceState *engine_types.ForkChoiceState, ...) (*engine_types.ForkChoiceUpdatedResponse, error)
- func (e *EngineServer) GetPayloadBodiesByHashV1(ctx context.Context, hashes []libcommon.Hash) ([]*engine_types.ExecutionPayloadBodyV1, error)
- func (e *EngineServer) GetPayloadBodiesByRangeV1(ctx context.Context, start, count hexutil.Uint64) ([]*engine_types.ExecutionPayloadBodyV1, error)
- func (e *EngineServer) GetPayloadV1(ctx context.Context, payloadId hexutility.Bytes) (*engine_types.ExecutionPayload, error)
- func (e *EngineServer) GetPayloadV2(ctx context.Context, payloadID hexutility.Bytes) (*engine_types.GetPayloadResponse, error)
- func (e *EngineServer) GetPayloadV3(ctx context.Context, payloadID hexutility.Bytes) (*engine_types.GetPayloadResponse, error)
- func (e *EngineServer) HandleNewPayload(logPrefix string, block *types.Block) (*engine_types.PayloadStatus, error)
- func (e *EngineServer) HandlesForkChoice(logPrefix string, forkChoice *engine_types.ForkChoiceState, requestId int) (*engine_types.PayloadStatus, error)
- func (e *EngineServer) NewPayloadV1(ctx context.Context, payload *engine_types.ExecutionPayload) (*engine_types.PayloadStatus, error)
- func (e *EngineServer) NewPayloadV2(ctx context.Context, payload *engine_types.ExecutionPayload) (*engine_types.PayloadStatus, error)
- func (e *EngineServer) NewPayloadV3(ctx context.Context, payload *engine_types.ExecutionPayload, ...) (*engine_types.PayloadStatus, error)
- func (e *EngineServer) Start(httpConfig *httpcfg.HttpCfg, db kv.RoDB, blockReader services.FullBlockReader, ...)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EngineAPI ¶
type EngineAPI interface { NewPayloadV1(context.Context, *engine_types.ExecutionPayload) (*engine_types.PayloadStatus, error) NewPayloadV2(context.Context, *engine_types.ExecutionPayload) (*engine_types.PayloadStatus, error) NewPayloadV3(ctx context.Context, executionPayload *engine_types.ExecutionPayload, expectedBlobHashes []common.Hash, parentBeaconBlockRoot *common.Hash) (*engine_types.PayloadStatus, error) ForkchoiceUpdatedV1(ctx context.Context, forkChoiceState *engine_types.ForkChoiceState, payloadAttributes *engine_types.PayloadAttributes) (*engine_types.ForkChoiceUpdatedResponse, error) ForkchoiceUpdatedV2(ctx context.Context, forkChoiceState *engine_types.ForkChoiceState, payloadAttributes *engine_types.PayloadAttributes) (*engine_types.ForkChoiceUpdatedResponse, error) ForkchoiceUpdatedV3(ctx context.Context, forkChoiceState *engine_types.ForkChoiceState, payloadAttributes *engine_types.PayloadAttributes) (*engine_types.ForkChoiceUpdatedResponse, error) GetPayloadV1(ctx context.Context, payloadID hexutility.Bytes) (*engine_types.ExecutionPayload, error) GetPayloadV2(ctx context.Context, payloadID hexutility.Bytes) (*engine_types.GetPayloadResponse, error) GetPayloadV3(ctx context.Context, payloadID hexutility.Bytes) (*engine_types.GetPayloadResponse, error) ExchangeTransitionConfigurationV1(ctx context.Context, transitionConfiguration *engine_types.TransitionConfiguration) (*engine_types.TransitionConfiguration, error) GetPayloadBodiesByHashV1(ctx context.Context, hashes []common.Hash) ([]*engine_types.ExecutionPayloadBodyV1, error) GetPayloadBodiesByRangeV1(ctx context.Context, start, count hexutil.Uint64) ([]*engine_types.ExecutionPayloadBodyV1, error) }
EngineAPI Beacon chain communication endpoint
type EngineServer ¶
type EngineServer struct {
// contains filtered or unexported fields
}
func NewEngineServer ¶
func NewEngineServer(ctx context.Context, logger log.Logger, config *chain.Config, executionService execution.ExecutionClient, hd *headerdownload.HeaderDownload, blockDownloader *engine_block_downloader.EngineBlockDownloader, test bool, proposing bool) *EngineServer
func (*EngineServer) ExchangeCapabilities ¶
func (e *EngineServer) ExchangeCapabilities(fromCl []string) []string
func (*EngineServer) ExchangeTransitionConfigurationV1 ¶
func (e *EngineServer) ExchangeTransitionConfigurationV1(ctx context.Context, beaconConfig *engine_types.TransitionConfiguration) (*engine_types.TransitionConfiguration, error)
Receives consensus layer's transition configuration and checks if the execution layer has the correct configuration. Can also be used to ping the execution layer (heartbeats). See https://github.com/ethereum/execution-apis/blob/v1.0.0-beta.1/src/engine/specification.md#engine_exchangetransitionconfigurationv1
func (*EngineServer) ForkchoiceUpdatedV1 ¶
func (e *EngineServer) ForkchoiceUpdatedV1(ctx context.Context, forkChoiceState *engine_types.ForkChoiceState, payloadAttributes *engine_types.PayloadAttributes) (*engine_types.ForkChoiceUpdatedResponse, error)
Updates the forkchoice state after validating the headBlockHash Additionally, builds and returns a unique identifier for an initial version of a payload (asynchronously updated with transactions), if payloadAttributes is not nil and passes validation See https://github.com/ethereum/execution-apis/blob/main/src/engine/paris.md#engine_forkchoiceupdatedv1
func (*EngineServer) ForkchoiceUpdatedV2 ¶
func (e *EngineServer) ForkchoiceUpdatedV2(ctx context.Context, forkChoiceState *engine_types.ForkChoiceState, payloadAttributes *engine_types.PayloadAttributes) (*engine_types.ForkChoiceUpdatedResponse, error)
Same as, and a replacement for, [ForkchoiceUpdatedV1], post Shanghai See https://github.com/ethereum/execution-apis/blob/main/src/engine/shanghai.md#engine_forkchoiceupdatedv2
func (*EngineServer) ForkchoiceUpdatedV3 ¶
func (e *EngineServer) ForkchoiceUpdatedV3(ctx context.Context, forkChoiceState *engine_types.ForkChoiceState, payloadAttributes *engine_types.PayloadAttributes) (*engine_types.ForkChoiceUpdatedResponse, error)
Successor of [ForkchoiceUpdatedV2] post Cancun, with stricter check on params See https://github.com/ethereum/execution-apis/blob/main/src/engine/cancun.md#engine_forkchoiceupdatedv3
func (*EngineServer) GetPayloadBodiesByHashV1 ¶
func (e *EngineServer) GetPayloadBodiesByHashV1(ctx context.Context, hashes []libcommon.Hash) ([]*engine_types.ExecutionPayloadBodyV1, error)
Returns an array of execution payload bodies referenced by their block hashes See https://github.com/ethereum/execution-apis/blob/main/src/engine/shanghai.md#engine_getpayloadbodiesbyhashv1
func (*EngineServer) GetPayloadBodiesByRangeV1 ¶
func (e *EngineServer) GetPayloadBodiesByRangeV1(ctx context.Context, start, count hexutil.Uint64) ([]*engine_types.ExecutionPayloadBodyV1, error)
Returns an ordered (as per canonical chain) array of execution payload bodies, with corresponding execution block numbers from "start", up to "count" See https://github.com/ethereum/execution-apis/blob/main/src/engine/shanghai.md#engine_getpayloadbodiesbyrangev1
func (*EngineServer) GetPayloadV1 ¶
func (e *EngineServer) GetPayloadV1(ctx context.Context, payloadId hexutility.Bytes) (*engine_types.ExecutionPayload, error)
Returns the most recent version of the payload(for the payloadID) at the time of receiving the call See https://github.com/ethereum/execution-apis/blob/main/src/engine/paris.md#engine_getpayloadv1
func (*EngineServer) GetPayloadV2 ¶
func (e *EngineServer) GetPayloadV2(ctx context.Context, payloadID hexutility.Bytes) (*engine_types.GetPayloadResponse, error)
Same as [GetPayloadV1] with addition of blockValue See https://github.com/ethereum/execution-apis/blob/main/src/engine/shanghai.md#engine_getpayloadv2
func (*EngineServer) GetPayloadV3 ¶
func (e *EngineServer) GetPayloadV3(ctx context.Context, payloadID hexutility.Bytes) (*engine_types.GetPayloadResponse, error)
Same as [GetPayloadV2], with addition of blobsBundle containing valid blobs, commitments, proofs See https://github.com/ethereum/execution-apis/blob/main/src/engine/cancun.md#engine_getpayloadv3
func (*EngineServer) HandleNewPayload ¶
func (e *EngineServer) HandleNewPayload( logPrefix string, block *types.Block, ) (*engine_types.PayloadStatus, error)
func (*EngineServer) HandlesForkChoice ¶
func (e *EngineServer) HandlesForkChoice( logPrefix string, forkChoice *engine_types.ForkChoiceState, requestId int, ) (*engine_types.PayloadStatus, error)
func (*EngineServer) NewPayloadV1 ¶
func (e *EngineServer) NewPayloadV1(ctx context.Context, payload *engine_types.ExecutionPayload) (*engine_types.PayloadStatus, error)
NewPayloadV1 processes new payloads (blocks) from the beacon chain without withdrawals. See https://github.com/ethereum/execution-apis/blob/main/src/engine/paris.md#engine_newpayloadv1
func (*EngineServer) NewPayloadV2 ¶
func (e *EngineServer) NewPayloadV2(ctx context.Context, payload *engine_types.ExecutionPayload) (*engine_types.PayloadStatus, error)
NewPayloadV2 processes new payloads (blocks) from the beacon chain with withdrawals. See https://github.com/ethereum/execution-apis/blob/main/src/engine/shanghai.md#engine_newpayloadv2
func (*EngineServer) NewPayloadV3 ¶
func (e *EngineServer) NewPayloadV3(ctx context.Context, payload *engine_types.ExecutionPayload, expectedBlobHashes []libcommon.Hash, parentBeaconBlockRoot *libcommon.Hash) (*engine_types.PayloadStatus, error)
NewPayloadV3 processes new payloads (blocks) from the beacon chain with withdrawals & blob gas. See https://github.com/ethereum/execution-apis/blob/main/src/engine/cancun.md#engine_newpayloadv3
func (*EngineServer) Start ¶
func (e *EngineServer) Start(httpConfig *httpcfg.HttpCfg, db kv.RoDB, blockReader services.FullBlockReader, filters *rpchelper.Filters, stateCache kvcache.Cache, agg *libstate.AggregatorV3, engineReader consensus.EngineReader, eth rpchelper.ApiBackend, txPool txpool.TxpoolClient, mining txpool.MiningClient)