ethereum / ethereum/execution-apis

testing_buildBlockV1 fixture omits required Amsterdam targetGasLimit

Open
#857 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Io
Stars
1.1k
Forks
530
Avg merge
5d 8h
Merged PRs (30d)
9

Description

## Summary

The `testing_buildBlockV1` schema and fixture omit `targetGasLimit`, although Amsterdam `PayloadAttributesV4` requires it. Erigon rejects the current fixture, while Besu, Nethermind, and Reth accept it. This points to a spec/fixture mismatch rather than an Erigon defect.

## Reproduction

Fixture: `tests/testing_buildBlockV1/build-block-from-mempool.io`

The request supplies `timestamp`, `prevRandao`, `suggestedFeeRecipient`, `withdrawals`, `parentBeaconBlockRoot`, and `slotNumber`, but no `targetGasLimit`.

On the current Glamsterdam images:

- Erigon `ethpandaops/erigon:glamsterdam-devnet-8` returns `-32602 targetGasLimit required for Glamsterdam and later forks`.
- Besu `ethpandaops/besu:glamsterdam-devnet-8`, Nethermind `ethpandaops/nethermind:glamsterdam-devnet-8`, and Reth `ethpandaops/reth:glamsterdam-devnet-7` accept the request.

## Specification mismatch

- `src/testing/testing_buildBlockV1.yaml` defines the payload attributes with `slotNumber` but no `targetGasLimit`.
- `src/engine/amsterdam.md` defines `PayloadAttributesV4` with both `slotNumber` and `targetGasLimit`, and requires clients to use the supplied target gas limit.
- `src/engine/openrpc/schemas/forkchoice.yaml` marks `targetGasLimit` as required for `PayloadAttributesV4`.

## Proposed fix

Update the testing method schema and affected fixtures to include `targetGasLimit`, or explicitly define the method as pre-Amsterdam. The current Glamsterdam fixture should not omit a field that the active fork requires.

Contributor guide

Open the contributing guide

Research direction

Compare src/testing/testing_buildBlockV1.yaml and tests/testing_buildBlockV1/build-block-from-mempool.io with the PayloadAttributesV4 definitions in src/engine/amsterdam.md and src/engine/openrpc/schemas/forkchoice.yaml. Update the schema and affected fixture to include targetGasLimit, or explicitly constrain the method to pre-Amsterdam, then rerun the testing_buildBlockV1 fixture against the relevant clients.

Written by the indexing model from the issue text.

Assessment

Tech stack
yaml
Domain
api, testing
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
72/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.