Skip to content

feat(builder): assemble stateless payload envelopes - #9981

Draft
krisoshea-eth wants to merge 15 commits into
ChainSafe:unstablefrom
krisoshea-eth:krisoshea/envelope-assembly
Draft

feat(builder): assemble stateless payload envelopes#9981
krisoshea-eth wants to merge 15 commits into
ChainSafe:unstablefrom
krisoshea-eth:krisoshea/envelope-assembly

Conversation

@krisoshea-eth

@krisoshea-eth krisoshea-eth commented Sep 2, 2026

Copy link
Copy Markdown

Motivation

A selected local bid must reveal only the exact payload material that was retained for that bid. Envelope construction should fail closed if the retained payload belongs to a different slot, parent execution block, or execution block hash.

Description

Adds a pure createExecutionPayloadEnvelopeMaterial boundary that:

  • accepts the selecting Beacon block root, local Builder index, selected bid identity, and retained payload material carrying its original parent Beacon block root;
  • verifies slot, parent execution block hash, parent Beacon block root, and execution block hash;
  • constructs the stateless ExecutionPayloadEnvelope without mutating retained material;
  • preserves execution requests, blobs, KZG proofs, Builder index, Beacon block root, and parent Beacon block root;
  • supports both Gloas and Heze retained payloads;
  • reports structured mismatch errors.

Signing, API publication, reveal cutoffs, retries, store eviction, metrics, and Builder wiring remain outside this draft.

This draft is stacked on #9958 for the BuiltPayload contract. The envelope slice itself is one commit and two files.

Tracking: LOD-66

Tests

  • 6 focused envelope-assembly tests
  • Builder type-check
  • Biome check
  • Builder build and import check
  • git diff --check

Review plan

Treat #9980, #9981, and #9982 as one logical selection and reveal path. Keep this draft isolated during development, but combine the services around their first runtime consumer if maintainers prefer fewer service-only PRs.

This PR was written primarily with Codex. I reviewed the implementation against Lodestar types, the project reveal requirements, and Nico's Builder proof of concept, and validated it locally.

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.

1 participant