Skip to content

feat(builder): publish stateless payload envelopes - #9982

Draft
krisoshea-eth wants to merge 11 commits into
ChainSafe:unstablefrom
krisoshea-eth:krisoshea/envelope-publication
Draft

feat(builder): publish stateless payload envelopes#9982
krisoshea-eth wants to merge 11 commits into
ChainSafe:unstablefrom
krisoshea-eth:krisoshea/envelope-publication

Conversation

@krisoshea-eth

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

Copy link
Copy Markdown

Motivation

The Builder needs a small safety boundary between exact envelope assembly and later reveal timing/runtime wiring. Once a local selection is verified, the envelope must be signed and submitted at most once without allowing a conflicting payload for the same Beacon block root.

Description

This draft adds an EnvelopePublisher that:

  • accepts complete stateless envelope material;
  • requires the local Builder index and an exact recorded selection;
  • signs through BuilderSigner;
  • reserves the exact unsigned envelope root before the network outcome becomes ambiguous;
  • submits the envelope with blobs and KZG proofs;
  • explicitly requests consensus_and_equivocation validation;
  • marks publication only after the Beacon Node accepts it;
  • coalesces concurrent exact attempts and permits a later exact retry after rejection; and
  • rejects changed envelope content for the same selecting block root.

The selection lookup is injected, so this PR does not choose an SSE contract, payload-store implementation, cutoff, retry policy, metrics, or runtime wiring.

Dependencies

This draft is stacked on #9975 for BidLedger. The review surface added here is two files:

  • packages/builder/src/services/envelopePublisher.ts
  • packages/builder/test/unit/services/envelopePublisher.test.ts

Validation

  • 9 focused envelope-publication tests
  • 19 inherited BidLedger tests, including reveal reservation and publication state
  • Builder type-check
  • Biome check
  • git diff --check

The Builder build and import check was validated before the ledger-only parent refresh.

Tracks LOD-67.

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 and validated the focused and package-level checks listed above.

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