fix: parentBeaconBlockRoot fallback in engine_newPayloadV4#10072
fix: parentBeaconBlockRoot fallback in engine_newPayloadV4#10072forkfury wants to merge 10 commits intoNethermindEth:masterfrom
Conversation
| if (parentBeaconBlockRoot is null) | ||
| // Use parentBeaconBlockRoot parameter if provided, otherwise fall back to executionPayload.ParentBeaconBlockRoot | ||
| // This handles cases where op-node sends valid requests with parentBeaconBlockRoot in the payload itself | ||
| Hash256? finalParentBeaconBlockRoot = parentBeaconBlockRoot ?? executionPayload.ParentBeaconBlockRoot; |
There was a problem hiding this comment.
but normally executionPayload.ParentBeaconBlockRoot is null and is set few lines below. Unless the mechanism is different in Optimism and it comes from PayloadDecoder?
There was a problem hiding this comment.
I've been taking a look at our implementation of the OP-CL and also in OP-node, and in both cases the ParentBeaconBlockRoot sent as parameter is the same in the executionPayload.ParentBeaconBlockRoot parameter, so the assignment is a no-op (this is the case for all post-Ecotone blocks).
The proposed fix most likely does not work as intended. Have you tested this @forkfury ?
There was a problem hiding this comment.
@emlautarom1 What about others op-cl implementations?
There was a problem hiding this comment.
AFAIK there are only two implementations: op-node (official CL) and ours.
|
We are looking into this as a potential fix but we're not fully sure that it's the correct approach or even if it will have any semantic effect. Could you add the following logs:
|
LukaszRozmej
left a comment
There was a problem hiding this comment.
@forkfury please add above logging
|
That got ugly, can you move the logging part to |
|
Closing in favor of #10328, which should address root cause |
Fix
Fixes #9921 - Occasional "Parent beacon block root must be set" error when processing
engine_newPayloadV4requests from op-node.Changes
ExecutionPayloadParams.ValidateParams()to fall back toexecutionPayload.ParentBeaconBlockRootwhen theparentBeaconBlockRootparameter is nullparentBeaconBlockRootin the payload object instead of as a method parameter