Sign the built block and submit it to the relay - #558
Open
0w3n-d wants to merge 1 commit into
Open
Conversation
Take the builder domain from the beacon node's own spec and genesis. A hardcoded genesis fork version makes the relay drop every bid, silently. Check the blobs bundle by proof count, not by `version`. ethrex's `AddAssign` does not propagate it, so an aggregate always reads 0. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
6 tasks
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: #550 (step 4 of 6)
What this PR does
Signs each built block and POSTs it to the relay as SSZ. The builder is now
functionally complete: it watches slots, builds, pays the proposer, signs and
submits. Step 5 only adds in-slot timing and the optional self-check.
The conversion chain reuses what already exists —
block_to_payload_v3->payload_from_v3,requests_to_v4->requests_from_v4. Only the blobsbundle is new, as the inverse of
convert::eblobs.Two details worth review:
BeaconClient::get_chain_info()readingeth/v1/config/specandeth/v1/beacon/genesis. No hardcoded per-network fork versions. Getting thiswrong makes the relay drop every bid with no useful error, so the role fails
at startup rather than signing incorrectly.
version. ethrex'simpl AddAssign for BlobsBundledoes not propagateversion, so anaggregated bundle always reports 0 even when its sidecars carry EIP-7594 cell
proofs. The count of 128 per blob is the only trustworthy signal, and
helix_types::BlobsBundlerefuses to decode without it.Every
BidTracefield the relay cross-checks is read back off the convertedpayload rather than from the build, so the two cannot drift.
What this PR deliberately does not do
One submission per slot event, at the moment the event arrives — no timing
offsets, no resubmission on a higher value, and no self-validation. Those are
step 5, which is why
submit_offsets_msandself_validateare still unread.No optimistic v3, no bid adjustments, no multi-relay fan-out.
Tests
12 new, written before the implementation and signed off first.
refused; mismatched commitments are refused; an empty bundle converts.
BidTracemirrors the payload on the four fieldspayload.validate()checks; it carries the slot and proposer; thesignature verifies under the builder domain, using
verify_signature—the same call the relay's decoder makes; the submission round-trips through
SSZ, with and without a blob.
application/octet-streamandX-Api-Key; a 2xx is success; a 400 surfacesthe relay's message, since that text is how an operator learns the builder
is producing bad blocks.
139 pass in the crate.
Reviewer checklist
lint,unit-test) is green