Add Eth-Builder-Url header and pass it during block production - #11248
StefanBratanov merged 6 commits into
Conversation
d063703 to
00ed6a6
Compare
|
Finding 1 — CONFIRMED (correctness): NPE in SSZ V4 block response path Fix: Either set executionPayloadIncluded in the SSZ constructor (infer it from whether builderUrl is present/absent), or change the field type to boolean (primitive) and explicitly initialize it. Finding 2 — CONFIRMED (correctness): Builder URL silently dropped in remote-VC path Fix: Thread builderUrl through OkHttpValidatorTypeDefClient.sendSignedBlock() and SendSignedBlockRequest.submit(), adding it as a request header when present. Finding 3 — CONFIRMED (test-coverage): payloadIncluded=false path untested Finding 4 — PLAUSIBLE (correctness): Builder.build() missing null-checks |
aa9c593 to
75414d7
Compare
1 is legit and I fixed it in this PR. |
|
@rolfyone added integration tests for block v4 as well to cover |
b9a4b6d to
9db4229
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 9db4229. Configure here.
ff16bd8 to
c72419b
Compare
c72419b to
fd7c4bb
Compare
2317886
into
Consensys-Incorporated:master

PR Description
When we create block with https://ethereum.github.io/beacon-APIs/?urls.primaryName=dev#/ValidatorRequiredApi/produceBlockV4 we send back a header with the builder URL if builder was used, then VC uses that data to send it back to BN via the same header https://ethereum.github.io/beacon-APIs/?urls.primaryName=dev#/ValidatorRequiredApi/publishBlockV2 . This PR basically achieves that apart from the usage of it which would be covered in a future PR. I did some refactor in
BlockFactoryclasses to make it nicer and more extensible and less confusing. One of the main changes is the change toBlockContainerAndMetaDatawhich now stores more information (payloadIncluded and builderUrl)Fixed Issue(s)
related to #11194
Documentation
doc-change-requiredlabel to this PR if updates are required.Changelog
Note
Medium Risk
Touches block production and publish API contracts and refactors block factory metadata assembly on validator-critical paths; changes are mostly additive but affect how builder bids are surfaced end-to-end.
Overview
Adds
Eth-Builder-Urlto the beacon APIs so produce-block V4 can return the winning builder URL (when the bid came from the builder API) and publish-block V2 can accept the same header on the way back.BlockContainerAndMetaDatanow carriesbuilderUrlandpayloadIncluded, and Gloas block production fills those from slot caches andinclude_payload/ self-built vs external-bid logic.BlockFactoryclasses are refactored: unsigned block creation is split intocreateNewUnsignedBlockplus a sharedcreateBlockContainerAndMetaDataBuilder, with Deneb/Gloas building metadata via the builder instead of mutating containers in place.ValidatorApiChannel.sendSignedBlockgains anOptional<String> builderUrlargument (call sites updated; full downstream use is noted as follow-up work).Adds
PostNewBlockV4IntegrationTestand OpenAPI fixture updates; drops the old V3 GLOAS JSON golden file in favor of V4-focused fixtures.Reviewed by Cursor Bugbot for commit fd7c4bb. Bugbot is set up for automated code reviews on this repo. Configure here.