Skip to content

Commit ecae519

Browse files
authored
beacon/engine, miner: fix testing_buildBlockV1 response (#34704)
Two fixes for `testing_buildBlockV1`: 1. Add `omitempty` to `SlotNumber` in `ExecutableData` so it is omitted for pre-Amsterdam payloads. The spec defines the response as `ExecutionPayloadV3` which does not include `slotNumber`. 2. Pass `res.fees` instead of `new(big.Int)` in `BuildTestingPayload` so `blockValue` reflects actual priority fees instead of always being zero. Corresponding fixture update: ethereum/execution-apis#783
1 parent 735bfd1 commit ecae519

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

beacon/engine/gen_ed.go

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

beacon/engine/types.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ type ExecutableData struct {
9999
Withdrawals []*types.Withdrawal `json:"withdrawals"`
100100
BlobGasUsed *uint64 `json:"blobGasUsed"`
101101
ExcessBlobGas *uint64 `json:"excessBlobGas"`
102-
SlotNumber *uint64 `json:"slotNumber"`
102+
SlotNumber *uint64 `json:"slotNumber,omitempty"`
103103
}
104104

105105
// JSON type overrides for executableData.

miner/payload_building.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -360,5 +360,5 @@ func (miner *Miner) BuildTestingPayload(args *BuildPayloadArgs, transactions []*
360360
if res.err != nil {
361361
return nil, res.err
362362
}
363-
return engine.BlockToExecutableData(res.block, new(big.Int), res.sidecars, res.requests), nil
363+
return engine.BlockToExecutableData(res.block, res.fees, res.sidecars, res.requests), nil
364364
}

0 commit comments

Comments
 (0)