Skip to content

Add Gloas state builders Beacon API endpoint#10765

Merged
rolfyone merged 3 commits into
Consensys:masterfrom
rolfyone:builderEndpoint
Jun 2, 2026
Merged

Add Gloas state builders Beacon API endpoint#10765
rolfyone merged 3 commits into
Consensys:masterfrom
rolfyone:builderEndpoint

Conversation

@rolfyone
Copy link
Copy Markdown
Contributor

@rolfyone rolfyone commented May 30, 2026

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

  • I thought about documentation and added the doc-change-required label to this PR if updates are required.

Changelog

  • I thought about adding a changelog entry, and added one if I deemed necessary.

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}/builders Beacon API (ethereum/beacon-APIs#614), registered via GloasRestApiBuilderAddon when Gloas is enabled.

Clients may send an optional ids body to filter builders by numeric index or 0x-prefixed pubkey; omitting ids returns every builder in state. Each entry includes index, pending/active/exited status (derived from withdrawable epoch and isActiveBuilder), and the builder SSZ object. Responses support JSON and SSZ (application/octet-stream), with the usual execution_optimistic / finalized metadata.

ChainDataProvider loads the requested beacon state and maps Gloas builders; pre-Gloas states are rejected. New StateBuilderData SSZ 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.

Copy link
Copy Markdown
Contributor

@gfukushima gfukushima left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm but we should probably wait until the api change is merged to merge this

@rolfyone rolfyone enabled auto-merge (squash) June 2, 2026 20:37
@rolfyone rolfyone merged commit 30c507c into Consensys:master Jun 2, 2026
67 checks passed
@github-actions github-actions Bot locked and limited conversation to collaborators Jun 2, 2026
@rolfyone rolfyone deleted the builderEndpoint branch June 2, 2026 21:25
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants