core/validatorapi: optional committee index param - #4672
Conversation
There was a problem hiding this comment.
Pull request overview
Fixes compatibility with post-gloas spec-compliant validator clients by making the deprecated committee_index query parameter optional on Charon’s GET /eth/v1/validator/attestation_data endpoint (defaulting to 0), preventing erroneous 400 responses when the parameter is omitted.
Changes:
- Default
committee_indexto0when omitted onGET /eth/v1/validator/attestation_data. - Add a router test that asserts the endpoint succeeds without
committee_indexand passesCommitteeIndex=0to the provider. - Add/extend comments documenting why Charon still sets
committee_indexin outbound BN requests for backwards compatibility.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
core/validatorapi/router.go |
Makes committee_index optional and defaults to 0 when absent for attestation data requests. |
core/validatorapi/router_internal_test.go |
Adds coverage verifying the route works when committee_index is omitted and defaults to 0. |
core/fetcher/fetcher.go |
Documents continued inclusion of committee index in BN attestation_data requests for backwards compatibility. |
testutil/validatormock/attest.go |
Documents continued inclusion of committee index in mock VC → BN attestation_data requests for backwards compatibility. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## gloas #4672 +/- ##
========================================
Coverage ? 58.82%
========================================
Files ? 246
Lines ? 34887
Branches ? 0
========================================
Hits ? 20523
Misses ? 11807
Partials ? 2557 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|



Make the deprecated
committee_indexquery parameter optional onGET /eth/v1/validator/attestation_data, defaulting to 0 — post-gloas spec-compliant validator clients omit it and previously got a 400. Charon's own outgoing requests keep setting it for backwards compatibility with pre-electra forks, with comments noting post-electra beacon nodes ignore it.category: feature
ticket: #4324