Skip to content

Commit 17e5af4

Browse files
pingesmacfarla
authored andcommitted
payload attributes: fix wrong warning and fail if beacon root is available before cancun (besu-eth#5872)
Signed-off-by: Stefan <stefan.pingel@consensys.net> Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
1 parent 395d639 commit 17e5af4

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

ethereum/api/src/main/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/methods/engine/AbstractEngineForkchoiceUpdated.java

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -219,9 +219,14 @@ private boolean isPayloadAttributesValid(
219219
return false;
220220
}
221221
if (payloadAttributes.getTimestamp() < cancunTimestamp) {
222-
LOG.warn("Payload attributes are present before cancun hardfork");
222+
if (payloadAttributes.getParentBeaconBlockRoot() != null) {
223+
LOG.error(
224+
"Parent beacon block root hash present in payload attributes before cancun hardfork");
225+
return false;
226+
}
223227
} else if (payloadAttributes.getParentBeaconBlockRoot() == null) {
224-
LOG.warn("Parent beacon block root not present in payload attributes after cancun hardfork");
228+
LOG.error(
229+
"Parent beacon block root hash not present in payload attributes after cancun hardfork");
225230
return false;
226231
}
227232
if (!getWithdrawalsValidator(

0 commit comments

Comments
 (0)