go-ethereum/eth/catalyst
Muzry b08aac1dbc
Some checks are pending
/ Linux Build (push) Waiting to run
/ Linux Build (arm) (push) Waiting to run
/ Keeper Build (push) Waiting to run
/ Windows Build (push) Waiting to run
/ Docker Image (push) Waiting to run
eth/catalyst: allow getPayloadV2 for pre-shanghai payloads (#33932)
I observed failing tests in Hive `engine-withdrawals`:

-
https://hive.ethpandaops.io/#/test/generic/1772351960-ad3e3e460605c670efe1b4f4178eb422?testnumber=146
-
https://hive.ethpandaops.io/#/test/generic/1772351960-ad3e3e460605c670efe1b4f4178eb422?testnumber=147

```shell
  DEBUG (Withdrawals Fork on Block 2): NextPayloadID before getPayloadV2:
  id=0x01487547e54e8abe version=1
  >> engine_getPayloadV2("0x01487547e54e8abe")
  << error: {"code":-38005,"message":"Unsupported fork"}
  FAIL: Expected no error on EngineGetPayloadV2: error=Unsupported fork
```
 
The same failure pattern occurred for Block 3.

Per Shanghai engine_getPayloadV2 spec, pre-Shanghai payloads should be
accepted via V2 and returned as ExecutionPayloadV1:
- executionPayload: ExecutionPayloadV1 | ExecutionPayloadV2
- ExecutionPayloadV1 MUST be returned if payload timestamp < Shanghai
timestamp
- ExecutionPayloadV2 MUST be returned if payload timestamp >= Shanghai
timestamp

Reference:
-
https://github.com/ethereum/execution-apis/blob/main/src/engine/shanghai.md#engine_getpayloadv2

Current implementation only allows GetPayloadV2 on the Shanghai fork
window (`[]forks.Fork{forks.Shanghai}`), so pre-Shanghai payloads are
rejected with Unsupported fork.

If my interpretation of the spec is incorrect, please let me know and I
can adjust accordingly.

---------

Co-authored-by: muzry.li <muzry.li1@ambergroup.io>
2026-03-09 11:22:58 +01:00
..
api.go eth/catalyst: allow getPayloadV2 for pre-shanghai payloads (#33932) 2026-03-09 11:22:58 +01:00
api_test.go eth/catalyst: allow getPayloadV2 for pre-shanghai payloads (#33932) 2026-03-09 11:22:58 +01:00
api_testing.go eth/catalyst: implement testing_buildBlockV1 (#33656) 2026-02-23 15:56:31 +01:00
api_testing_test.go eth/catalyst: implement testing_buildBlockV1 (#33656) 2026-02-23 15:56:31 +01:00
metrics.go eth/catalyst: implement getBlobsV3 (#33404) 2025-12-31 09:48:50 +08:00
queue.go cmd/geth: implement dev mode for post-merge (#27327) 2023-07-06 04:42:34 -04:00
simulated_beacon.go core: implement eip-7778: block gas accounting without refunds (#33593) 2026-03-04 18:18:18 +08:00
simulated_beacon_api.go eth/catalyst: abort dev mode block commit if shut down is triggered (#32166) 2025-07-08 22:15:53 +09:00
simulated_beacon_test.go eth/catalyst: set FeeRecipient in dev mode (#31316) 2025-03-17 09:32:44 +01:00
witness.go eth/catalyst: add initial OpenTelemetry tracing for newPayload (#33521) 2026-02-17 17:08:57 +01:00