From d207654dbd8cb14f195a9f15c44f9f43c1ad8740 Mon Sep 17 00:00:00 2001 From: Justin Florentine Date: Thu, 5 Oct 2023 17:03:59 -0400 Subject: [PATCH] hive tests explicitly attempt zero Signed-off-by: Justin Florentine --- .../internal/methods/engine/EngineForkchoiceUpdatedV2.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ethereum/api/src/main/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/methods/engine/EngineForkchoiceUpdatedV2.java b/ethereum/api/src/main/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/methods/engine/EngineForkchoiceUpdatedV2.java index 44ba15cae8d..e7a3ba9f537 100644 --- a/ethereum/api/src/main/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/methods/engine/EngineForkchoiceUpdatedV2.java +++ b/ethereum/api/src/main/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/methods/engine/EngineForkchoiceUpdatedV2.java @@ -58,6 +58,11 @@ protected Optional isPayloadAttributesValid( final Optional> maybeWithdrawals, final BlockHeader headBlockHeader) { if (payloadAttributes.getTimestamp() >= cancunTimestamp) { + if (payloadAttributes.getParentBeaconBlockRoot() == null + || payloadAttributes.getParentBeaconBlockRoot().isEmpty() + || payloadAttributes.getParentBeaconBlockRoot().isZero()) { + return Optional.of(new JsonRpcErrorResponse(requestId, RpcErrorType.INVALID_PARAMS)); + } return Optional.of(new JsonRpcErrorResponse(requestId, RpcErrorType.UNSUPPORTED_FORK)); } else if (payloadAttributes.getParentBeaconBlockRoot() != null) { LOG.error(