eth/catalyst: return -32602 for FCU V2 wrong payloadAttributes version#33918
Closed
Muzry wants to merge 1 commit into
Closed
eth/catalyst: return -32602 for FCU V2 wrong payloadAttributes version#33918Muzry wants to merge 1 commit into
Muzry wants to merge 1 commit into
Conversation
Member
|
You are correct, but I think the spec is bad in that case. It makes no sense to return 38003 for V3 and V4 and 32602 for V2 and V1. Maybe @marioevz and @MysticRyuujin can weigh in here |
Contributor
|
Hmmm
I would think that I think I agree that the SPEC should change 🤔 |
Contributor
|
What do you think about introducing |
Member
|
@mkalinin I think your comment is not related to this PR, right? |
Contributor
|
The spec was updated |
Contributor
Author
|
Thanks everyone for the clarification, and for updating the spec. |
This was referenced Mar 10, 2026
yperbasis
pushed a commit
to erigontech/erigon
that referenced
this pull request
Mar 17, 2026
This PR updates `engine_forkchoiceUpdatedV2` to return `-38003: Invalid payload attributes` when the wrong `payloadAttributes` version is used. In particular, FCUv2 payload-attribute version mismatches such as: - missing `withdrawals` at or after Shanghai - unexpected `withdrawals` before Shanghai should be treated as `Invalid payload attributes`, not `Invalid params`. ## Why This change aligns the client with the latest Engine API spec update in: - ethereum/execution-apis#761 It also follows the implementation discussion and prior client-side change in: - ethereum/go-ethereum#33918 The spec was clarified so that FCUv2 now behaves consistently with newer forkchoiceUpdated versions for payloadAttributes structure/version mismatches. ## What changed - Updated FCUv2 payload attributes validation to return `-38003` for payloadAttributes version mismatches. - Added/updated regression coverage for the affected FCUv2 cases. ## Hive impact This fixes the Hive `engine-withdrawals` failure caused by returning the wrong error code for FCUv2 payloadAttributes mismatches. Relevant Hive failure: - https://hive.ethpandaops.io/#/test/generic/1773130326-4e173a80b2b6f0634fd0139743cbe0de After this change, the client returns the expected error code for the affected FCUv2 cases. If my understanding or interpretation of the spec change is incorrect, please let me know and I can adjust the implementation accordingly. --------- Co-authored-by: muzry.li <muzry.li1@ambergroup.io>
github-merge-queue Bot
pushed a commit
to lambdaclass/ethrex
that referenced
this pull request
Mar 17, 2026
This PR updates `engine_forkchoiceUpdatedV2` to return `-38003: Invalid payload attributes` when the wrong `payloadAttributes` version is used. In particular, FCUv2 payload-attribute version mismatches such as: - missing `withdrawals` at or after Shanghai - unexpected `withdrawals` before Shanghai should be treated as `Invalid payload attributes`, not `Invalid params`. ## Why This change aligns the client with the latest Engine API spec update in: - ethereum/execution-apis#761 It also follows the implementation discussion and prior client-side change in: - ethereum/go-ethereum#33918 The spec was clarified so that FCUv2 now behaves consistently with newer forkchoiceUpdated versions for payloadAttributes structure/version mismatches. ## What changed - Updated FCUv2 payload attributes validation to return `-38003` for payloadAttributes version mismatches. - Added/updated regression coverage for the affected FCUv2 cases. ## Hive impact This fixes the Hive `engine-withdrawals` failure caused by returning the wrong error code for FCUv2 payloadAttributes mismatches. Relevant Hive failure: - https://hive.ethpandaops.io/#/test/generic/1773130989-fdc508a8e36929a0f9059e686f9f65ba After this change, the client returns the expected error code for the affected FCUv2 cases. If my understanding or interpretation of the spec change is incorrect, please let me know and I can adjust the implementation accordingly.
lupin012
pushed a commit
to erigontech/erigon
that referenced
this pull request
Mar 17, 2026
This PR updates `engine_forkchoiceUpdatedV2` to return `-38003: Invalid payload attributes` when the wrong `payloadAttributes` version is used. In particular, FCUv2 payload-attribute version mismatches such as: - missing `withdrawals` at or after Shanghai - unexpected `withdrawals` before Shanghai should be treated as `Invalid payload attributes`, not `Invalid params`. ## Why This change aligns the client with the latest Engine API spec update in: - ethereum/execution-apis#761 It also follows the implementation discussion and prior client-side change in: - ethereum/go-ethereum#33918 The spec was clarified so that FCUv2 now behaves consistently with newer forkchoiceUpdated versions for payloadAttributes structure/version mismatches. ## What changed - Updated FCUv2 payload attributes validation to return `-38003` for payloadAttributes version mismatches. - Added/updated regression coverage for the affected FCUv2 cases. ## Hive impact This fixes the Hive `engine-withdrawals` failure caused by returning the wrong error code for FCUv2 payloadAttributes mismatches. Relevant Hive failure: - https://hive.ethpandaops.io/#/test/generic/1773130326-4e173a80b2b6f0634fd0139743cbe0de After this change, the client returns the expected error code for the affected FCUv2 cases. If my understanding or interpretation of the spec change is incorrect, please let me know and I can adjust the implementation accordingly. --------- Co-authored-by: muzry.li <muzry.li1@ambergroup.io>
AskAlexSharov
pushed a commit
to erigontech/erigon
that referenced
this pull request
Apr 8, 2026
This PR updates `engine_forkchoiceUpdatedV2` to return `-38003: Invalid payload attributes` when the wrong `payloadAttributes` version is used. In particular, FCUv2 payload-attribute version mismatches such as: - missing `withdrawals` at or after Shanghai - unexpected `withdrawals` before Shanghai should be treated as `Invalid payload attributes`, not `Invalid params`. ## Why This change aligns the client with the latest Engine API spec update in: - ethereum/execution-apis#761 It also follows the implementation discussion and prior client-side change in: - ethereum/go-ethereum#33918 The spec was clarified so that FCUv2 now behaves consistently with newer forkchoiceUpdated versions for payloadAttributes structure/version mismatches. ## What changed - Updated FCUv2 payload attributes validation to return `-38003` for payloadAttributes version mismatches. - Added/updated regression coverage for the affected FCUv2 cases. ## Hive impact This fixes the Hive `engine-withdrawals` failure caused by returning the wrong error code for FCUv2 payloadAttributes mismatches. Relevant Hive failure: - https://hive.ethpandaops.io/#/test/generic/1773130326-4e173a80b2b6f0634fd0139743cbe0de After this change, the client returns the expected error code for the affected FCUv2 cases. If my understanding or interpretation of the spec change is incorrect, please let me know and I can adjust the implementation accordingly. --------- Co-authored-by: muzry.li <muzry.li1@ambergroup.io>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I observed the following failure while running hive:
https://hive.ethpandaops.io/#/test/generic/1772351960-ad3e3e460605c670efe1b4f4178eb422?testnumber=153
Relevant log excerpt:
In short: geth returns -38003 for this FCU V2 invalid-structure/version case, while hive expects -32602.
Why return -32602
Per Shanghai engine_forkchoiceUpdatedV2:
Reference:
https://github.com/ethereum/execution-apis/blob/main/src/engine/shanghai.md#engine_forkchoiceupdatedv2
In this case, when timestamp >= Shanghai and withdrawals is null, we treat that as a version mismatch (i.e. not a valid PayloadAttributesV2), so it should return -32602.
This PR updates FCU V2 handling to follow that requirement.
Result
This change fixes 9 hive test cases.
Note
If my interpretation of the spec here is incorrect, please let me know and I can adjust the implementation accordingly.