Construct and sign the Gloas SignedExecutionPayloadEnvelope, and broadcast it to beacon nodes - #503
Merged
Merged
Conversation
This was referenced Aug 24, 2026
0w3n-d
force-pushed
the
od/gloas-step2-envelope-broadcast
branch
from
August 25, 2026 12:56
70da680 to
92bd1e1
Compare
0w3n-d
force-pushed
the
od/gloas-step2-envelope-broadcast
branch
2 times, most recently
from
August 27, 2026 18:06
92bd1e1 to
6c3aca0
Compare
ninaiiad
reviewed
Sep 3, 2026
ninaiiad
reviewed
Sep 3, 2026
0w3n-d
force-pushed
the
od/gloas-step2-envelope-broadcast
branch
2 times, most recently
from
September 3, 2026 17:34
e9a8df7 to
552e72c
Compare
0w3n-d
force-pushed
the
od/gloas-step2-envelope-broadcast
branch
from
September 25, 2026 09:56
e036e47 to
8379f97
Compare
ninaiiad
reviewed
Sep 25, 2026
| /// Payloads held by a bid's committed block hash. Each payload is taken at most once. | ||
| // TODO(gloas): populate from the auctioneer; see gattaca-com/helix#489 step 3. | ||
| #[derive(Default)] | ||
| pub struct GloasPayloadStore(DashMap<B256, HeldGloasPayload>); |
ninaiiad
reviewed
Sep 25, 2026
ninaiiad
reviewed
Sep 25, 2026
| pub blacklist_provider: Option<Url>, | ||
| /// This relay's on-chain Gloas (ePBS) builder_index. Placeholder until helix has a real | ||
| /// on-chain builder registration; signs under the relay's own key in the meantime. | ||
| #[serde(default)] |
Collaborator
There was a problem hiding this comment.
should this really have a default?
ninaiiad
reviewed
Sep 25, 2026
ninaiiad
reviewed
Sep 25, 2026
Comment on lines
+88
to
+89
| /// success. Unlike `publish_block`, fans out via plain concurrent futures, not | ||
| /// `spawn_tracked!`. |
Collaborator
There was a problem hiding this comment.
The fan-out uses plain futures inside the axum handler: if the proposer disconnects, or the 5s TimeoutLayer fires, the handler future is dropped and every in-flight publish is cancelled. This is exactly why publish_block uses spawn_tracked!, and here the payload is already gone when it happens.
ninaiiad
reviewed
Sep 25, 2026
ninaiiad
reviewed
Sep 25, 2026
ninaiiad
reviewed
Sep 25, 2026
| pub reg_handle: RegWorkerHandle, | ||
| pub operator_api: Option<Arc<OperatorPubSub>>, | ||
| pub ip_tracker: IpTracker, | ||
| pub gloas_builder_identity: Arc<GloasBuilderIdentity>, |
Collaborator
There was a problem hiding this comment.
don't need an arc here because it's not shared?
ninaiiad
reviewed
Sep 25, 2026
ninaiiad
reviewed
Sep 25, 2026
…dcast it to beacon nodes
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
0w3n-d
force-pushed
the
od/gloas-step2-envelope-broadcast
branch
from
September 28, 2026 15:31
44cf2c2 to
37a569a
Compare
ninaiiad
approved these changes
Sep 28, 2026
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