Construct and sign the Gloas SignedExecutionPayloadEnvelope, and broadcast it to beacon nodes - #503
Open
0w3n-d wants to merge 2 commits into
Open
Conversation
0w3n-d
force-pushed
the
od/gloas-step2-envelope-broadcast
branch
from
August 25, 2026 12:56
70da680 to
92bd1e1
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue: #489 (step 2 of 6)
Stacked on #501 — base branch is
od/gloas-spec-link-cleanup, notdevelop. Retarget todeveloponce #501 merges.What this PR does
BeaconClient/MultiBeaconClient::publish_execution_payload_envelope: POSTs aSignedExecutionPayloadEnvelopeto a connected beacon node's/eth/v1/beacon/execution_payload_envelopes, mirroringpublish_block's fan-out-and-return-on-first-success.construct_signed_envelope: builds and signs the envelope from a proposer's signed block and a held payload, guarding against a missing held payload, a held-payload/bid block-hash mismatch, and a bid committing to a differentbuilder_indexthan helix's configured identity.GloasBuilderIdentity: helix's own Gloas builder identity (builder_index + key), signing underDOMAIN_BEACON_BUILDER— not the off-chain domainSignedBuilderBiduses. Reuses the relay's existing signing key;builder_indexis a newRelayConfigfield, defaulting to 0 as a placeholder until helix has a real on-chain builder registration.submitSignedBeaconBlock: decodes the block, constructs and signs the envelope, and broadcasts it viaMultiBeaconClient.NoHeldPayloads: theGloasPayloadStoreimplementation used until step 3 lands a real one. Every real request currently gets aNoHeldPayloadForBlockerror, which is correct: nothing has held a payload yet.What this PR deliberately does not do
No real held-payload store yet (step 3). No support for external builders submitting their own signed bids/envelopes (deferred, see the issue's resolved design question).
Tests
Written before wiring, per the issue's tests-first convention:
BeaconClient::publish_execution_payload_envelope: correct headers/body, 200/202/error-response handling (httpmock).MultiBeaconClient::publish_execution_payload_envelope: returns on first success, errors only if all clients fail.construct_signed_envelope: correct construction, signature round-trip verification, and all three guard conditions.Reviewer checklist
lint,unit-test) is green