Documentation
¶
Index ¶
- type EngineAPI
- type EngineServer
- func (e *EngineServer) ExchangeCapabilities(fromCl []string) []string
- 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) GetClientVersionV1(ctx context.Context, callerVersion *engine_types.ClientVersionV1) ([]engine_types.ClientVersionV1, error)
- func (e *EngineServer) GetPayloadBodiesByHashV1(ctx context.Context, hashes []libcommon.Hash) ([]*engine_types.ExecutionPayloadBody, error)
- func (e *EngineServer) GetPayloadBodiesByRangeV1(ctx context.Context, start, count hexutil.Uint64) ([]*engine_types.ExecutionPayloadBody, 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) GetPayloadV4(ctx context.Context, payloadID hexutility.Bytes) (*engine_types.GetPayloadResponse, error)
- func (e *EngineServer) HandleNewPayload(ctx context.Context, logPrefix string, block *types.Block, ...) (*engine_types.PayloadStatus, error)
- func (e *EngineServer) HandlesForkChoice(ctx context.Context, logPrefix string, ...) (*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) NewPayloadV4(ctx context.Context, payload *engine_types.ExecutionPayload, ...) (*engine_types.PayloadStatus, error)
- func (e *EngineServer) SetConsuming(consuming bool)
- func (e *EngineServer) Start(ctx context.Context, httpConfig *httpcfg.HttpCfg, db kv.TemporalRoDB, ...)
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) NewPayloadV4(ctx context.Context, executionPayload *engine_types.ExecutionPayload, expectedBlobHashes []common.Hash, parentBeaconBlockRoot *common.Hash, executionRequests []hexutility.Bytes) (*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) GetPayloadV4(ctx context.Context, payloadID hexutility.Bytes) (*engine_types.GetPayloadResponse, error) GetPayloadBodiesByHashV1(ctx context.Context, hashes []common.Hash) ([]*engine_types.ExecutionPayloadBody, error) GetPayloadBodiesByRangeV1(ctx context.Context, start, count hexutil.Uint64) ([]*engine_types.ExecutionPayloadBody, error) GetClientVersionV1(ctx context.Context, callerVersion *engine_types.ClientVersionV1) ([]engine_types.ClientVersionV1, error) }
EngineAPI Beacon chain communication endpoint
type EngineServer ¶
type EngineServer struct {
// contains filtered or unexported fields
}
func NewEngineServer ¶
func NewEngineServer(logger log.Logger, config *chain.Config, executionService execution.ExecutionClient, hd *headerdownload.HeaderDownload, blockDownloader *engine_block_downloader.EngineBlockDownloader, caplin, test, proposing, consuming bool) *EngineServer
func (*EngineServer) ExchangeCapabilities ¶
func (e *EngineServer) ExchangeCapabilities(fromCl []string) []string
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) GetClientVersionV1 ¶
func (e *EngineServer) GetClientVersionV1(ctx context.Context, callerVersion *engine_types.ClientVersionV1) ([]engine_types.ClientVersionV1, error)
Returns the node's code and commit details in a slice See https://github.com/ethereum/execution-apis/blob/main/src/engine/identification.md#engine_getclientversionv1
func (*EngineServer) GetPayloadBodiesByHashV1 ¶
func (e *EngineServer) GetPayloadBodiesByHashV1(ctx context.Context, hashes []libcommon.Hash) ([]*engine_types.ExecutionPayloadBody, 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.ExecutionPayloadBody, 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) GetPayloadV4 ¶
func (e *EngineServer) GetPayloadV4(ctx context.Context, payloadID hexutility.Bytes) (*engine_types.GetPayloadResponse, error)
Same as [GetPayloadV3], but returning ExecutionPayloadV4 (= ExecutionPayloadV3 + requests) See https://github.com/ethereum/execution-apis/blob/main/src/engine/prague.md#engine_getpayloadv4
func (*EngineServer) HandleNewPayload ¶
func (e *EngineServer) HandleNewPayload( ctx context.Context, logPrefix string, block *types.Block, versionedHashes []libcommon.Hash, ) (*engine_types.PayloadStatus, error)
func (*EngineServer) HandlesForkChoice ¶
func (e *EngineServer) HandlesForkChoice( ctx context.Context, 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) NewPayloadV4 ¶
func (e *EngineServer) NewPayloadV4(ctx context.Context, payload *engine_types.ExecutionPayload, expectedBlobHashes []libcommon.Hash, parentBeaconBlockRoot *libcommon.Hash, executionRequests []hexutility.Bytes) (*engine_types.PayloadStatus, error)
NewPayloadV4 processes new payloads (blocks) from the beacon chain with withdrawals, blob gas and requests. See https://github.com/ethereum/execution-apis/blob/main/src/engine/prague.md#engine_newpayloadv4
func (*EngineServer) SetConsuming ¶
func (e *EngineServer) SetConsuming(consuming bool)
func (*EngineServer) Start ¶
func (e *EngineServer) Start( ctx context.Context, httpConfig *httpcfg.HttpCfg, db kv.TemporalRoDB, blockReader services.FullBlockReader, filters *rpchelper.Filters, stateCache kvcache.Cache, engineReader consensus.EngineReader, eth rpchelper.ApiBackend, txPool txpool.TxpoolClient, mining txpool.MiningClient, )