Skip to content

Commit 6c34113

Browse files
committed
feat: update engineapi endpoints to v4 (ChainSafe#6747)
1 parent 1705888 commit 6c34113

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

packages/beacon-node/src/execution/engine/http.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ export class ExecutionEngineHttp implements IExecutionEngine {
177177
): Promise<ExecutePayloadResponse> {
178178
const method =
179179
ForkSeq[fork] >= ForkSeq.electra
180-
? "engine_newPayloadV6110"
180+
? "engine_newPayloadV4"
181181
: ForkSeq[fork] >= ForkSeq.deneb
182182
? "engine_newPayloadV3"
183183
: ForkSeq[fork] >= ForkSeq.capella
@@ -198,7 +198,7 @@ export class ExecutionEngineHttp implements IExecutionEngine {
198198
const serializedVersionedHashes = serializeVersionedHashes(versionedHashes);
199199
const parentBeaconBlockRoot = serializeBeaconBlockRoot(parentBlockRoot);
200200

201-
const method = ForkSeq[fork] >= ForkSeq.electra ? "engine_newPayloadV6110" : "engine_newPayloadV3";
201+
const method = ForkSeq[fork] >= ForkSeq.electra ? "engine_newPayloadV4" : "engine_newPayloadV3";
202202
engineRequest = {
203203
method,
204204
params: [serializedExecutionPayload, serializedVersionedHashes, parentBeaconBlockRoot],
@@ -373,7 +373,7 @@ export class ExecutionEngineHttp implements IExecutionEngine {
373373
}> {
374374
const method =
375375
ForkSeq[fork] >= ForkSeq.electra
376-
? "engine_getPayloadV6110"
376+
? "engine_getPayloadV4"
377377
: ForkSeq[fork] >= ForkSeq.deneb
378378
? "engine_getPayloadV3"
379379
: ForkSeq[fork] >= ForkSeq.capella

packages/beacon-node/src/execution/engine/mock.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -89,14 +89,14 @@ export class ExecutionEngineMockBackend implements JsonRpcBackend {
8989
engine_newPayloadV1: this.notifyNewPayload.bind(this),
9090
engine_newPayloadV2: this.notifyNewPayload.bind(this),
9191
engine_newPayloadV3: this.notifyNewPayload.bind(this),
92-
engine_newPayloadV6110: this.notifyNewPayload.bind(this),
92+
engine_newPayloadV4: this.notifyNewPayload.bind(this),
9393
engine_forkchoiceUpdatedV1: this.notifyForkchoiceUpdate.bind(this),
9494
engine_forkchoiceUpdatedV2: this.notifyForkchoiceUpdate.bind(this),
9595
engine_forkchoiceUpdatedV3: this.notifyForkchoiceUpdate.bind(this),
9696
engine_getPayloadV1: this.getPayload.bind(this),
9797
engine_getPayloadV2: this.getPayload.bind(this),
9898
engine_getPayloadV3: this.getPayload.bind(this),
99-
engine_getPayloadV6110: this.getPayload.bind(this),
99+
engine_getPayloadV4: this.getPayload.bind(this),
100100
engine_getPayloadBodiesByHashV1: this.getPayloadBodiesByHash.bind(this),
101101
engine_getPayloadBodiesByRangeV1: this.getPayloadBodiesByRange.bind(this),
102102
};

packages/beacon-node/src/execution/engine/types.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ export type EngineApiRpcParamTypes = {
2828
engine_newPayloadV1: [ExecutionPayloadRpc];
2929
engine_newPayloadV2: [ExecutionPayloadRpc];
3030
engine_newPayloadV3: [ExecutionPayloadRpc, VersionedHashesRpc, DATA];
31-
engine_newPayloadV6110: [ExecutionPayloadRpc, VersionedHashesRpc, DATA];
31+
engine_newPayloadV4: [ExecutionPayloadRpc, VersionedHashesRpc, DATA];
3232
/**
3333
* 1. Object - Payload validity status with respect to the consensus rules:
3434
* - blockHash: DATA, 32 Bytes - block hash value of the payload
@@ -52,7 +52,7 @@ export type EngineApiRpcParamTypes = {
5252
engine_getPayloadV1: [QUANTITY];
5353
engine_getPayloadV2: [QUANTITY];
5454
engine_getPayloadV3: [QUANTITY];
55-
engine_getPayloadV6110: [QUANTITY];
55+
engine_getPayloadV4: [QUANTITY];
5656

5757
/**
5858
* 1. Array of DATA - Array of block_hash field values of the ExecutionPayload structure
@@ -80,7 +80,7 @@ export type EngineApiRpcReturnTypes = {
8080
engine_newPayloadV1: PayloadStatus;
8181
engine_newPayloadV2: PayloadStatus;
8282
engine_newPayloadV3: PayloadStatus;
83-
engine_newPayloadV6110: PayloadStatus;
83+
engine_newPayloadV4: PayloadStatus;
8484
engine_forkchoiceUpdatedV1: {
8585
payloadStatus: PayloadStatus;
8686
payloadId: QUANTITY | null;
@@ -99,7 +99,7 @@ export type EngineApiRpcReturnTypes = {
9999
engine_getPayloadV1: ExecutionPayloadRpc;
100100
engine_getPayloadV2: ExecutionPayloadResponse;
101101
engine_getPayloadV3: ExecutionPayloadResponse;
102-
engine_getPayloadV6110: ExecutionPayloadResponse;
102+
engine_getPayloadV4: ExecutionPayloadResponse;
103103

104104
engine_getPayloadBodiesByHashV1: (ExecutionPayloadBodyRpc | null)[];
105105

0 commit comments

Comments
 (0)