Add Gloas state builders Beacon API endpoint#10765
Merged
Merged
Conversation
gfukushima
approved these changes
Jun 2, 2026
Contributor
gfukushima
left a comment
There was a problem hiding this comment.
lgtm but we should probably wait until the api change is merged to merge this
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
PR Description
Summary
Implements ethereum/beacon-APIs#614 for Teku by adding the Gloas-only POST /eth/v1/beacon/states/{state_id}/builders Beacon API endpoint with JSON and SSZ response support. The endpoint accepts optional builder ids, filters by builder index or pubkey, and returns each builder with its derived pending, active, or exited status.
Testing
./gradlew :data:provider:spotlessCheck :data:beaconrestapi:spotlessCheck :data:serializer:spotlessCheck :ethereum:json-types:spotlessCheck :data:provider:test --tests tech.pegasys.teku.api.ChainDataProviderTest :data:beaconrestapi:test --tests tech.pegasys.teku.beaconrestapi.handlers.v1.beacon.PostStateBuildersTest
./gradlew :data:beaconrestapi:integrationTest --tests tech.pegasys.teku.beaconrestapi.beacon.OpenApiIntegrationTest
git diff --check
Fixed Issue(s)
Documentation
doc-change-requiredlabel to this PR if updates are required.Changelog
Note
Low Risk
Read-only state query API behind Gloas milestone gating, mirroring existing validator filter endpoints with no consensus or signing changes.
Overview
Adds the Gloas-only
POST /eth/v1/beacon/states/{state_id}/buildersBeacon API (ethereum/beacon-APIs#614), registered viaGloasRestApiBuilderAddonwhen Gloas is enabled.Clients may send an optional
idsbody to filter builders by numeric index or 0x-prefixed pubkey; omittingidsreturns every builder in state. Each entry includes index, pending/active/exited status (derived from withdrawable epoch andisActiveBuilder), and the builder SSZ object. Responses support JSON and SSZ (application/octet-stream), with the usualexecution_optimistic/finalizedmetadata.ChainDataProviderloads the requested beacon state and maps Gloasbuilders; pre-Gloas states are rejected. NewStateBuilderDataSSZ types back the API payload. Changelog and OpenAPI fixture schemas are updated; unit tests cover the handler and provider logic.Reviewed by Cursor Bugbot for commit 12bfdba. Bugbot is set up for automated code reviews on this repo. Configure here.