From 322e3839a66fdcc0294a38855be2996ac32dd032 Mon Sep 17 00:00:00 2001 From: Stefan Pingel <16143240+pinges@users.noreply.github.com> Date: Wed, 13 Sep 2023 16:47:51 +1000 Subject: [PATCH] payload attributes: fix wrong warning and fail if beacon root is available before cancun (#5872) Signed-off-by: Stefan Co-authored-by: Sally MacFarlane --- .../methods/engine/AbstractEngineForkchoiceUpdated.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/ethereum/api/src/main/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/methods/engine/AbstractEngineForkchoiceUpdated.java b/ethereum/api/src/main/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/methods/engine/AbstractEngineForkchoiceUpdated.java index cfb28bcc9ef..1cde6c259a0 100644 --- a/ethereum/api/src/main/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/methods/engine/AbstractEngineForkchoiceUpdated.java +++ b/ethereum/api/src/main/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/methods/engine/AbstractEngineForkchoiceUpdated.java @@ -219,9 +219,14 @@ private boolean isPayloadAttributesValid( return false; } if (payloadAttributes.getTimestamp() < cancunTimestamp) { - LOG.warn("Payload attributes are present before cancun hardfork"); + if (payloadAttributes.getParentBeaconBlockRoot() != null) { + LOG.error( + "Parent beacon block root hash present in payload attributes before cancun hardfork"); + return false; + } } else if (payloadAttributes.getParentBeaconBlockRoot() == null) { - LOG.warn("Parent beacon block root not present in payload attributes after cancun hardfork"); + LOG.error( + "Parent beacon block root hash not present in payload attributes after cancun hardfork"); return false; } if (!getWithdrawalsValidator(