From cb304ee99ea5bd5c2ff68ac878e0359a9df49fbc Mon Sep 17 00:00:00 2001 From: Mehdi AOUADI Date: Fri, 31 Jan 2025 17:47:57 +0100 Subject: [PATCH] add update payload with inclusion list egine api method --- .../ExecutionEngineClient.java | 4 ++ .../ThrottlingExecutionEngineClient.java | 8 +++ .../methods/EngineApiMethod.java | 3 +- ...ngineUpdatePayloadWithInclusionListV1.java | 69 +++++++++++++++++++ .../MetricRecordingExecutionEngineClient.java | 11 +++ ...atePayloadWithInclusionListV1Response.java | 39 +++++++++++ .../web3j/Web3JExecutionEngineClient.java | 17 +++++ .../ExecutionClientHandler.java | 4 ++ .../ExecutionClientHandlerImpl.java | 19 +++++ .../ExecutionLayerManagerImpl.java | 16 ++++- ...toneBasedEngineJsonRpcMethodsResolver.java | 5 ++ ...pdatePayloadWithInclusionListResponse.java | 18 +++++ .../executionlayer/ExecutionLayerChannel.java | 10 +++ .../ExecutionLayerChannelStub.java | 6 ++ 14 files changed, 226 insertions(+), 3 deletions(-) create mode 100644 ethereum/executionclient/src/main/java/tech/pegasys/teku/ethereum/executionclient/methods/EngineUpdatePayloadWithInclusionListV1.java create mode 100644 ethereum/executionclient/src/main/java/tech/pegasys/teku/ethereum/executionclient/schema/UpdatePayloadWithInclusionListV1Response.java create mode 100644 ethereum/spec/src/main/java/tech/pegasys/teku/spec/datastructures/execution/versions/eip7805/UpdatePayloadWithInclusionListResponse.java diff --git a/ethereum/executionclient/src/main/java/tech/pegasys/teku/ethereum/executionclient/ExecutionEngineClient.java b/ethereum/executionclient/src/main/java/tech/pegasys/teku/ethereum/executionclient/ExecutionEngineClient.java index 50a65c13a18..755d38990f6 100644 --- a/ethereum/executionclient/src/main/java/tech/pegasys/teku/ethereum/executionclient/ExecutionEngineClient.java +++ b/ethereum/executionclient/src/main/java/tech/pegasys/teku/ethereum/executionclient/ExecutionEngineClient.java @@ -33,6 +33,7 @@ import tech.pegasys.teku.ethereum.executionclient.schema.PayloadAttributesV3; import tech.pegasys.teku.ethereum.executionclient.schema.PayloadStatusV1; import tech.pegasys.teku.ethereum.executionclient.schema.Response; +import tech.pegasys.teku.ethereum.executionclient.schema.UpdatePayloadWithInclusionListV1Response; import tech.pegasys.teku.infrastructure.async.SafeFuture; import tech.pegasys.teku.infrastructure.bytes.Bytes8; import tech.pegasys.teku.spec.datastructures.execution.PowBlock; @@ -91,4 +92,7 @@ SafeFuture> forkChoiceUpdatedV3( SafeFuture>> getBlobsV1(List blobVersionedHashes); SafeFuture> getInclusionListV1(Bytes32 parentHash); + + SafeFuture> updatePayloadWithInclusionListV1( + Bytes8 payloadId, List inclusionList); } diff --git a/ethereum/executionclient/src/main/java/tech/pegasys/teku/ethereum/executionclient/ThrottlingExecutionEngineClient.java b/ethereum/executionclient/src/main/java/tech/pegasys/teku/ethereum/executionclient/ThrottlingExecutionEngineClient.java index 817cbd9a6ca..02ecc3010be 100644 --- a/ethereum/executionclient/src/main/java/tech/pegasys/teku/ethereum/executionclient/ThrottlingExecutionEngineClient.java +++ b/ethereum/executionclient/src/main/java/tech/pegasys/teku/ethereum/executionclient/ThrottlingExecutionEngineClient.java @@ -34,6 +34,7 @@ import tech.pegasys.teku.ethereum.executionclient.schema.PayloadAttributesV3; import tech.pegasys.teku.ethereum.executionclient.schema.PayloadStatusV1; import tech.pegasys.teku.ethereum.executionclient.schema.Response; +import tech.pegasys.teku.ethereum.executionclient.schema.UpdatePayloadWithInclusionListV1Response; import tech.pegasys.teku.infrastructure.async.SafeFuture; import tech.pegasys.teku.infrastructure.async.ThrottlingTaskQueue; import tech.pegasys.teku.infrastructure.bytes.Bytes8; @@ -184,4 +185,11 @@ public SafeFuture> getInclusionListV1( final Bytes32 parentHash) { return taskQueue.queueTask(() -> delegate.getInclusionListV1(parentHash)); } + + @Override + public SafeFuture> + updatePayloadWithInclusionListV1(final Bytes8 payloadId, final List inclusionList) { + return taskQueue.queueTask( + () -> delegate.updatePayloadWithInclusionListV1(payloadId, inclusionList)); + } } diff --git a/ethereum/executionclient/src/main/java/tech/pegasys/teku/ethereum/executionclient/methods/EngineApiMethod.java b/ethereum/executionclient/src/main/java/tech/pegasys/teku/ethereum/executionclient/methods/EngineApiMethod.java index ae57e9e5643..7ede23be18c 100644 --- a/ethereum/executionclient/src/main/java/tech/pegasys/teku/ethereum/executionclient/methods/EngineApiMethod.java +++ b/ethereum/executionclient/src/main/java/tech/pegasys/teku/ethereum/executionclient/methods/EngineApiMethod.java @@ -17,7 +17,8 @@ public enum EngineApiMethod { ENGINE_NEW_PAYLOAD("engine_newPayload"), ENGINE_GET_PAYLOAD("engine_getPayload"), ENGINE_FORK_CHOICE_UPDATED("engine_forkchoiceUpdated"), - ENGINE_GET_INCLUSION_LIST("engine_getInclusionList"); + ENGINE_GET_INCLUSION_LIST("engine_getInclusionList"), + ENGINE_UPDATE_PAYLOAD_WITH_INCLUSION_LIST("engine_updatePayloadWithInclusionList"); private final String name; diff --git a/ethereum/executionclient/src/main/java/tech/pegasys/teku/ethereum/executionclient/methods/EngineUpdatePayloadWithInclusionListV1.java b/ethereum/executionclient/src/main/java/tech/pegasys/teku/ethereum/executionclient/methods/EngineUpdatePayloadWithInclusionListV1.java new file mode 100644 index 00000000000..0aeb97cb626 --- /dev/null +++ b/ethereum/executionclient/src/main/java/tech/pegasys/teku/ethereum/executionclient/methods/EngineUpdatePayloadWithInclusionListV1.java @@ -0,0 +1,69 @@ +/* + * Copyright Consensys Software Inc., 2025 + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ + +package tech.pegasys.teku.ethereum.executionclient.methods; + +import java.util.List; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; +import org.apache.tuweni.bytes.Bytes; +import tech.pegasys.teku.ethereum.executionclient.ExecutionEngineClient; +import tech.pegasys.teku.ethereum.executionclient.response.ResponseUnwrapper; +import tech.pegasys.teku.ethereum.executionclient.schema.UpdatePayloadWithInclusionListV1Response; +import tech.pegasys.teku.infrastructure.async.SafeFuture; +import tech.pegasys.teku.infrastructure.bytes.Bytes8; +import tech.pegasys.teku.spec.datastructures.execution.versions.eip7805.UpdatePayloadWithInclusionListResponse; + +public class EngineUpdatePayloadWithInclusionListV1 + extends AbstractEngineJsonRpcMethod { + + private static final Logger LOG = LogManager.getLogger(); + + public EngineUpdatePayloadWithInclusionListV1(final ExecutionEngineClient executionEngineClient) { + super(executionEngineClient); + } + + @Override + public String getName() { + return EngineApiMethod.ENGINE_UPDATE_PAYLOAD_WITH_INCLUSION_LIST.getName(); + } + + @Override + public int getVersion() { + return 1; + } + + @Override + public SafeFuture execute( + final JsonRpcRequestParams params) { + final Bytes8 payloadId = params.getRequiredParameter(0, Bytes8.class); + final List inclusionList = params.getRequiredListParameter(1, Bytes.class); + + LOG.trace( + "Calling {}(payloadId={}, inclusionList={})", getVersionedName(), payloadId, inclusionList); + + return executionEngineClient + .updatePayloadWithInclusionListV1(payloadId, inclusionList) + .thenApply(ResponseUnwrapper::unwrapExecutionClientResponseOrThrow) + .thenApply( + UpdatePayloadWithInclusionListV1Response + ::asInternalUpdatePayloadWithInclusionListResponse) + .thenPeek( + updatePayloadWithInclusionListResponse -> + LOG.trace( + "Response {}(payloadId={}) -> {}", + getVersionedName(), + updatePayloadWithInclusionListResponse.payloadId(), + updatePayloadWithInclusionListResponse)); + } +} diff --git a/ethereum/executionclient/src/main/java/tech/pegasys/teku/ethereum/executionclient/metrics/MetricRecordingExecutionEngineClient.java b/ethereum/executionclient/src/main/java/tech/pegasys/teku/ethereum/executionclient/metrics/MetricRecordingExecutionEngineClient.java index 00285cf6430..9cbdb5ee11d 100644 --- a/ethereum/executionclient/src/main/java/tech/pegasys/teku/ethereum/executionclient/metrics/MetricRecordingExecutionEngineClient.java +++ b/ethereum/executionclient/src/main/java/tech/pegasys/teku/ethereum/executionclient/metrics/MetricRecordingExecutionEngineClient.java @@ -36,6 +36,7 @@ import tech.pegasys.teku.ethereum.executionclient.schema.PayloadAttributesV3; import tech.pegasys.teku.ethereum.executionclient.schema.PayloadStatusV1; import tech.pegasys.teku.ethereum.executionclient.schema.Response; +import tech.pegasys.teku.ethereum.executionclient.schema.UpdatePayloadWithInclusionListV1Response; import tech.pegasys.teku.infrastructure.async.SafeFuture; import tech.pegasys.teku.infrastructure.bytes.Bytes8; import tech.pegasys.teku.infrastructure.metrics.MetricsCountersByIntervals; @@ -71,6 +72,8 @@ public class MetricRecordingExecutionEngineClient extends MetricRecordingAbstrac public static final String GET_CLIENT_VERSION_V1_METHOD = "get_client_versionV1"; public static final String GET_BLOBS_V1_METHOD = "get_blobs_versionV1"; public static final String GET_INCLUSION_LIST_V1_METHOD = "get_inclusion_list_versionV1"; + public static final String UPDATE_PAYLOAD_WITH_INCLUSION_LIST_V1_METHOD = + "update_payload_with_inclusion_list_versionV1"; private final ExecutionEngineClient delegate; @@ -231,4 +234,12 @@ public SafeFuture> getInclusionListV1( return countRequest( () -> delegate.getInclusionListV1(parentHash), GET_INCLUSION_LIST_V1_METHOD); } + + @Override + public SafeFuture> + updatePayloadWithInclusionListV1(final Bytes8 payloadId, final List inclusionList) { + return countRequest( + () -> delegate.updatePayloadWithInclusionListV1(payloadId, inclusionList), + UPDATE_PAYLOAD_WITH_INCLUSION_LIST_V1_METHOD); + } } diff --git a/ethereum/executionclient/src/main/java/tech/pegasys/teku/ethereum/executionclient/schema/UpdatePayloadWithInclusionListV1Response.java b/ethereum/executionclient/src/main/java/tech/pegasys/teku/ethereum/executionclient/schema/UpdatePayloadWithInclusionListV1Response.java new file mode 100644 index 00000000000..259b9d8e5c5 --- /dev/null +++ b/ethereum/executionclient/src/main/java/tech/pegasys/teku/ethereum/executionclient/schema/UpdatePayloadWithInclusionListV1Response.java @@ -0,0 +1,39 @@ +/* + * Copyright Consensys Software Inc., 2025 + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ + +package tech.pegasys.teku.ethereum.executionclient.schema; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import tech.pegasys.teku.ethereum.executionclient.serialization.Bytes8Deserializer; +import tech.pegasys.teku.infrastructure.bytes.Bytes8; +import tech.pegasys.teku.spec.datastructures.execution.versions.eip7805.UpdatePayloadWithInclusionListResponse; + +public class UpdatePayloadWithInclusionListV1Response { + + @JsonDeserialize(using = Bytes8Deserializer.class) + private final Bytes8 payloadId; + + public UpdatePayloadWithInclusionListV1Response( + @JsonProperty("payloadId") final Bytes8 payloadId) { + this.payloadId = payloadId; + } + + public UpdatePayloadWithInclusionListResponse asInternalUpdatePayloadWithInclusionListResponse() { + return new UpdatePayloadWithInclusionListResponse(payloadId); + } + + public Bytes8 getPayloadId() { + return payloadId; + } +} diff --git a/ethereum/executionclient/src/main/java/tech/pegasys/teku/ethereum/executionclient/web3j/Web3JExecutionEngineClient.java b/ethereum/executionclient/src/main/java/tech/pegasys/teku/ethereum/executionclient/web3j/Web3JExecutionEngineClient.java index 00a6eb423a8..7b186772213 100644 --- a/ethereum/executionclient/src/main/java/tech/pegasys/teku/ethereum/executionclient/web3j/Web3JExecutionEngineClient.java +++ b/ethereum/executionclient/src/main/java/tech/pegasys/teku/ethereum/executionclient/web3j/Web3JExecutionEngineClient.java @@ -44,6 +44,7 @@ import tech.pegasys.teku.ethereum.executionclient.schema.PayloadAttributesV3; import tech.pegasys.teku.ethereum.executionclient.schema.PayloadStatusV1; import tech.pegasys.teku.ethereum.executionclient.schema.Response; +import tech.pegasys.teku.ethereum.executionclient.schema.UpdatePayloadWithInclusionListV1Response; import tech.pegasys.teku.infrastructure.async.SafeFuture; import tech.pegasys.teku.infrastructure.bytes.Bytes8; import tech.pegasys.teku.infrastructure.unsigned.UInt64; @@ -56,6 +57,7 @@ public class Web3JExecutionEngineClient implements ExecutionEngineClient { private static final Duration GET_CLIENT_VERSION_TIMEOUT = Duration.ofSeconds(1); private static final Duration GET_BLOBS_TIMEOUT = Duration.ofSeconds(1); private static final Duration GET_INCLUSION_LIST_TIMEOUT = Duration.ofSeconds(1); + private static final Duration UPDATE_PAYLOAD_WITH_INCLUSION_LIST_TIMEOUT = Duration.ofSeconds(1); private final Web3JClient web3JClient; @@ -314,6 +316,18 @@ public SafeFuture> getInclusionListV1( return web3JClient.doRequest(web3jRequest, GET_INCLUSION_LIST_TIMEOUT); } + @Override + public SafeFuture> + updatePayloadWithInclusionListV1(final Bytes8 payloadId, final List inclusionList) { + final Request web3jRequest = + new Request<>( + "engine_updatePayloadWithInclusionListV1", + list(payloadId, inclusionList), + web3JClient.getWeb3jService(), + UpdatePayloadWithInclusionListV1Web3jResponse.class); + return web3JClient.doRequest(web3jRequest, UPDATE_PAYLOAD_WITH_INCLUSION_LIST_TIMEOUT); + } + static class ExecutionPayloadV1Web3jResponse extends org.web3j.protocol.core.Response {} @@ -344,6 +358,9 @@ static class GetBlobsVersionV1Web3jResponse static class GetnclusionListVersionV1Web3jResponse extends org.web3j.protocol.core.Response {} + static class UpdatePayloadWithInclusionListV1Web3jResponse + extends org.web3j.protocol.core.Response {} + /** * Returns a list that supports null items. * diff --git a/ethereum/executionlayer/src/main/java/tech/pegasys/teku/ethereum/executionlayer/ExecutionClientHandler.java b/ethereum/executionlayer/src/main/java/tech/pegasys/teku/ethereum/executionlayer/ExecutionClientHandler.java index 3538f897f6d..1943b7741b0 100644 --- a/ethereum/executionlayer/src/main/java/tech/pegasys/teku/ethereum/executionlayer/ExecutionClientHandler.java +++ b/ethereum/executionlayer/src/main/java/tech/pegasys/teku/ethereum/executionlayer/ExecutionClientHandler.java @@ -17,6 +17,7 @@ import java.util.Optional; import org.apache.tuweni.bytes.Bytes32; import tech.pegasys.teku.infrastructure.async.SafeFuture; +import tech.pegasys.teku.infrastructure.bytes.Bytes8; import tech.pegasys.teku.infrastructure.unsigned.UInt64; import tech.pegasys.teku.spec.datastructures.execution.BlobAndProof; import tech.pegasys.teku.spec.datastructures.execution.ClientVersion; @@ -52,4 +53,7 @@ SafeFuture> engineGetBlobs( List blobVersionedHashes, UInt64 slot); SafeFuture> engineGetInclusionList(Bytes32 parentHash, UInt64 slot); + + SafeFuture engineUpdatePayloadWithInclusionList( + Bytes8 payloadId, List inclusionList, UInt64 slot); } diff --git a/ethereum/executionlayer/src/main/java/tech/pegasys/teku/ethereum/executionlayer/ExecutionClientHandlerImpl.java b/ethereum/executionlayer/src/main/java/tech/pegasys/teku/ethereum/executionlayer/ExecutionClientHandlerImpl.java index 5303f6fd814..6994238ec09 100644 --- a/ethereum/executionlayer/src/main/java/tech/pegasys/teku/ethereum/executionlayer/ExecutionClientHandlerImpl.java +++ b/ethereum/executionlayer/src/main/java/tech/pegasys/teku/ethereum/executionlayer/ExecutionClientHandlerImpl.java @@ -21,7 +21,9 @@ import tech.pegasys.teku.ethereum.executionclient.methods.JsonRpcRequestParams; import tech.pegasys.teku.ethereum.executionclient.response.ResponseUnwrapper; import tech.pegasys.teku.ethereum.executionclient.schema.ClientVersionV1; +import tech.pegasys.teku.ethereum.executionclient.schema.UpdatePayloadWithInclusionListV1Response; import tech.pegasys.teku.infrastructure.async.SafeFuture; +import tech.pegasys.teku.infrastructure.bytes.Bytes8; import tech.pegasys.teku.infrastructure.unsigned.UInt64; import tech.pegasys.teku.spec.Spec; import tech.pegasys.teku.spec.datastructures.blobs.versions.deneb.BlobSchema; @@ -176,4 +178,21 @@ public SafeFuture> engineGetInclusionList( return response.transactions.stream().map(transactionSchema::fromBytes).toList(); }); } + + @Override + public SafeFuture engineUpdatePayloadWithInclusionList( + final Bytes8 payloadId, final List inclusionList, final UInt64 slot) { + final TransactionSchema transactionSchema = + spec.atSlot(slot) + .getSchemaDefinitions() + .toVersionEip7805() + .orElseThrow() + .getInclusionListSchema() + .getTransactionSchema(); + return executionEngineClient + .updatePayloadWithInclusionListV1( + payloadId, inclusionList.stream().map(transactionSchema::sszSerialize).toList()) + .thenApply(ResponseUnwrapper::unwrapExecutionClientResponseOrThrow) + .thenApply(UpdatePayloadWithInclusionListV1Response::getPayloadId); + } } diff --git a/ethereum/executionlayer/src/main/java/tech/pegasys/teku/ethereum/executionlayer/ExecutionLayerManagerImpl.java b/ethereum/executionlayer/src/main/java/tech/pegasys/teku/ethereum/executionlayer/ExecutionLayerManagerImpl.java index 376afc26fc9..8b93c9c481d 100644 --- a/ethereum/executionlayer/src/main/java/tech/pegasys/teku/ethereum/executionlayer/ExecutionLayerManagerImpl.java +++ b/ethereum/executionlayer/src/main/java/tech/pegasys/teku/ethereum/executionlayer/ExecutionLayerManagerImpl.java @@ -39,6 +39,7 @@ import tech.pegasys.teku.ethereum.executionclient.web3j.Web3JExecutionEngineClient; import tech.pegasys.teku.ethereum.performance.trackers.BlockProductionPerformance; import tech.pegasys.teku.infrastructure.async.SafeFuture; +import tech.pegasys.teku.infrastructure.bytes.Bytes8; import tech.pegasys.teku.infrastructure.logging.EventLogger; import tech.pegasys.teku.infrastructure.metrics.TekuMetricCategory; import tech.pegasys.teku.infrastructure.ssz.SszList; @@ -234,11 +235,22 @@ public SafeFuture>> engineGetBlobs( @Override public SafeFuture> engineGetInclusionList( final Bytes32 parentHash, final UInt64 slot) { - LOG.trace( - "calling engineGetInclusionList(engineGetInclusionList={}, slot={})", parentHash, slot); + LOG.trace("calling engineGetInclusionList(parentHash={}, slot={})", parentHash, slot); return executionClientHandler.engineGetInclusionList(parentHash, slot); } + @Override + public SafeFuture engineUpdatePayloadWithInclusionList( + final Bytes8 payloadId, final List inclusionList, final UInt64 slot) { + LOG.trace( + "calling engineUpdatePayloadWithInclusionList(payloadId={}, inclusionList={}, slot={})", + payloadId, + inclusionList, + slot); + return executionClientHandler.engineUpdatePayloadWithInclusionList( + payloadId, inclusionList, slot); + } + @Override public SafeFuture builderRegisterValidators( final SszList signedValidatorRegistrations, final UInt64 slot) { diff --git a/ethereum/executionlayer/src/main/java/tech/pegasys/teku/ethereum/executionlayer/MilestoneBasedEngineJsonRpcMethodsResolver.java b/ethereum/executionlayer/src/main/java/tech/pegasys/teku/ethereum/executionlayer/MilestoneBasedEngineJsonRpcMethodsResolver.java index 6d4f61c6bf1..2b7436b6c2f 100644 --- a/ethereum/executionlayer/src/main/java/tech/pegasys/teku/ethereum/executionlayer/MilestoneBasedEngineJsonRpcMethodsResolver.java +++ b/ethereum/executionlayer/src/main/java/tech/pegasys/teku/ethereum/executionlayer/MilestoneBasedEngineJsonRpcMethodsResolver.java @@ -17,6 +17,7 @@ import static tech.pegasys.teku.ethereum.executionclient.methods.EngineApiMethod.ENGINE_GET_INCLUSION_LIST; import static tech.pegasys.teku.ethereum.executionclient.methods.EngineApiMethod.ENGINE_GET_PAYLOAD; import static tech.pegasys.teku.ethereum.executionclient.methods.EngineApiMethod.ENGINE_NEW_PAYLOAD; +import static tech.pegasys.teku.ethereum.executionclient.methods.EngineApiMethod.ENGINE_UPDATE_PAYLOAD_WITH_INCLUSION_LIST; import java.util.Collections; import java.util.EnumMap; @@ -41,6 +42,7 @@ import tech.pegasys.teku.ethereum.executionclient.methods.EngineNewPayloadV3; import tech.pegasys.teku.ethereum.executionclient.methods.EngineNewPayloadV4; import tech.pegasys.teku.ethereum.executionclient.methods.EngineNewPayloadV5; +import tech.pegasys.teku.ethereum.executionclient.methods.EngineUpdatePayloadWithInclusionListV1; import tech.pegasys.teku.spec.Spec; import tech.pegasys.teku.spec.SpecMilestone; import tech.pegasys.teku.spec.datastructures.util.ForkAndSpecMilestone; @@ -133,6 +135,9 @@ private Map> eip7805SupportedMethods() { methods.put(ENGINE_GET_PAYLOAD, new EngineGetPayloadV4(executionEngineClient, spec)); methods.put(ENGINE_FORK_CHOICE_UPDATED, new EngineForkChoiceUpdatedV3(executionEngineClient)); methods.put(ENGINE_GET_INCLUSION_LIST, new EngineGetInclusionListV1(executionEngineClient)); + methods.put( + ENGINE_UPDATE_PAYLOAD_WITH_INCLUSION_LIST, + new EngineUpdatePayloadWithInclusionListV1(executionEngineClient)); return methods; } diff --git a/ethereum/spec/src/main/java/tech/pegasys/teku/spec/datastructures/execution/versions/eip7805/UpdatePayloadWithInclusionListResponse.java b/ethereum/spec/src/main/java/tech/pegasys/teku/spec/datastructures/execution/versions/eip7805/UpdatePayloadWithInclusionListResponse.java new file mode 100644 index 00000000000..ec973561d3a --- /dev/null +++ b/ethereum/spec/src/main/java/tech/pegasys/teku/spec/datastructures/execution/versions/eip7805/UpdatePayloadWithInclusionListResponse.java @@ -0,0 +1,18 @@ +/* + * Copyright Consensys Software Inc., 2025 + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + */ + +package tech.pegasys.teku.spec.datastructures.execution.versions.eip7805; + +import tech.pegasys.teku.infrastructure.bytes.Bytes8; + +public record UpdatePayloadWithInclusionListResponse(Bytes8 payloadId) {} diff --git a/ethereum/spec/src/main/java/tech/pegasys/teku/spec/executionlayer/ExecutionLayerChannel.java b/ethereum/spec/src/main/java/tech/pegasys/teku/spec/executionlayer/ExecutionLayerChannel.java index 75d93761f24..b6862d9014b 100644 --- a/ethereum/spec/src/main/java/tech/pegasys/teku/spec/executionlayer/ExecutionLayerChannel.java +++ b/ethereum/spec/src/main/java/tech/pegasys/teku/spec/executionlayer/ExecutionLayerChannel.java @@ -21,6 +21,7 @@ import tech.pegasys.teku.ethereum.performance.trackers.BlockProductionPerformance; import tech.pegasys.teku.ethereum.performance.trackers.BlockPublishingPerformance; import tech.pegasys.teku.infrastructure.async.SafeFuture; +import tech.pegasys.teku.infrastructure.bytes.Bytes8; import tech.pegasys.teku.infrastructure.events.ChannelInterface; import tech.pegasys.teku.infrastructure.ssz.SszList; import tech.pegasys.teku.infrastructure.unsigned.UInt64; @@ -93,6 +94,12 @@ public SafeFuture> engineGetInclusionList( return SafeFuture.completedFuture(Collections.emptyList()); } + @Override + public SafeFuture engineUpdatePayloadWithInclusionList( + final Bytes8 payloadId, final List inclusionList, final UInt64 slot) { + return SafeFuture.completedFuture(null); + } + @Override public SafeFuture builderRegisterValidators( final SszList signedValidatorRegistrations, @@ -137,6 +144,9 @@ SafeFuture>> engineGetBlobs( SafeFuture> engineGetInclusionList(Bytes32 parentHash, UInt64 slot); + SafeFuture engineUpdatePayloadWithInclusionList( + Bytes8 payloadId, List inclusionList, UInt64 slot); + /** * This is low level method, use {@link * ExecutionLayerBlockProductionManager#initiateBlockProduction(ExecutionPayloadContext, diff --git a/ethereum/spec/src/main/java/tech/pegasys/teku/spec/executionlayer/ExecutionLayerChannelStub.java b/ethereum/spec/src/main/java/tech/pegasys/teku/spec/executionlayer/ExecutionLayerChannelStub.java index 7457b3a0df9..03fba4be6e6 100644 --- a/ethereum/spec/src/main/java/tech/pegasys/teku/spec/executionlayer/ExecutionLayerChannelStub.java +++ b/ethereum/spec/src/main/java/tech/pegasys/teku/spec/executionlayer/ExecutionLayerChannelStub.java @@ -387,6 +387,12 @@ public SafeFuture> engineGetInclusionList( return SafeFuture.completedFuture(Collections.emptyList()); } + @Override + public SafeFuture engineUpdatePayloadWithInclusionList( + final Bytes8 payloadId, final List inclusionList, final UInt64 slot) { + return SafeFuture.completedFuture(payloadId); + } + @Override public SafeFuture builderRegisterValidators( final SszList signedValidatorRegistrations, final UInt64 slot) {