cl: fix Gloas bid selection, validation and publication - #23583
Open
yperbasis wants to merge 7 commits into
Open
cl: fix Gloas bid selection, validation and publication#23583yperbasis wants to merge 7 commits into
yperbasis wants to merge 7 commits into
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Fixes Gloas bid valuation and publication by normalizing values to Wei and separating external-builder blob handling.
Changes:
- Preserves execution values as
big.Int. - Converts external bids from Gwei to Wei.
- Skips local sidecar construction for external bids and adds focused tests.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
cl/cltypes/epbs_payload.go |
Documents Gloas bid value units. |
cl/cltypes/block_production.go |
Documents execution value units. |
cl/beacon/handler/block_production.go |
Fixes valuation, metadata, and sidecar publication. |
cl/beacon/handler/block_production_test.go |
Adds valuation and publication tests. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
yperbasis
marked this pull request as draft
August 26, 2026 11:11
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.
Summary
Gloas
ExecutionPayloadBid.valueis denominated in Gwei, while execution-layer values and block-production metadata use Wei. Production compared the raw Gwei bid with the local Wei value, so external bids almost never won. It also narrowed execution values touint64, which corrupted metadata above the Wei limit of that type.Once external bid selection became reachable, a bid validated when it entered the pool could still become invalid against the production state. Parent execution requests can change builder eligibility before the current bid is processed. Selecting such a bid made the final state transition fail even though a valid self-built block was available. Gloas selection also ignored
builder_boost_factor, retained local blob data after choosing an external bid, and made a legacy Builder API request whose result could not be used.Consensus block value metadata was emitted in Gwei, while the beacon API requires Wei.
Changes
big.IntWei values through selection and response metadata.builder_boost_factorto Gloas external-bid selection.ProcessBlocktransition for a winning external bid on a production-state copy.getHeaderrequest on Gloas, where external bids arrive through ePBS gossip.The Gwei denomination follows the Gloas
ExecutionPayloadBidspecification.Testing
go test ./cl/beacon/handler ./cl/pool ./cl/phase1/network/services -count=1go test -race -timeout 10m ./cl/beacon/handler ./cl/pool ./cl/phase1/network/services -count=1make test-shortmake lintmake erigon integrationThe behavior changes were developed with failing regression tests. Moving header merkleization into the branches that consume it was a pure refactor covered by the existing publication tests.