Skip to content

feat: add produceBlockV4WithBid endpoint - #10057

Draft
eth2353 wants to merge 1 commit into
ChainSafe:unstablefrom
eth2353:produce-block-v4-with-bid
Draft

eth2353 wants to merge 1 commit into
ChainSafe:unstablefrom
eth2353:produce-block-v4-with-bid

Conversation

@eth2353

@eth2353 eth2353 commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

Motivation

Implement Beacon APIs #627, allowing validator clients to supply a selected execution payload bid. This avoids duplicate builder requests when producing blocks through multiple beacon nodes.

Description

  • Add POST /eth/v4/validator/blocks/{slot}/with_bid with JSON and SSZ support.
  • Reuse produceBlockV4 production logic and response codecs.
  • Validate the supplied bid, apply the requested boost factor, and fall back to local production when the bid is invalid or the circuit breaker is active.
  • Add coverage for request handling, bid selection, validation failures, and payload inclusion.

Validation:

  • 139 targeted tests and lint pass.
  • Type checking reports the same 13 errors as the unchanged baseline.
  • Manually tested on a local Kurtosis devnet.

AI Assistance Disclosure

This PR鈥檚 implementation and tests were written primarily by OpenAI Codex (GPT-6 Astra High), with human review and direction.

import {getMockApi, getTestServer} from "../../utils/utils.js";
import {testData} from "./testData/validator.js";

describe("produceBlockV4WithBid", () => {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this test is kinda useless, this should be covered by spec tests already

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't like the diff in this file at all 馃槄

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: In Progress

Development

Successfully merging this pull request may close these issues.

2 participants