core/validatorapi: add payload attestation endpoints - #4657
Conversation
|
There was a problem hiding this comment.
Pull request overview
This PR adds validator-client-facing support for Gloas/ePBS Payload Timeliness Committee (PTC) payload attestations to Charon’s core/validatorapi, exposing a new data-fetch endpoint backed by DutyDB.AwaitPayloadAttestationData and a new submission endpoint for partially signed payload attestation messages, while wiring the new duty type into deadline handling, broadcast delay metrics, and tracing.
Changes:
- Add
GET /eth/v1/validator/payload_attestation_datareturninggloas.PayloadAttestationData(withEth-Consensus-Version: gloasresponse header). - Add
POST /eth/v1/beacon/pool/payload_attestationsto ingest partial payload attestation signatures, enforceEth-Consensus-Version: gloas, and dispatch grouped partials downstream. - Wire
DutyPayloadAttestationinto deadlines, bcast delay metric selection, and tracing/wiring plumbing; update docs and tests accordingly.
Reviewed changes
Copilot reviewed 9 out of 10 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| docs/architecture.md | Documents the new DutyPayloadAttestation duty type in the architecture overview. |
| core/validatorapi/validatorapi.go | Adds component hooks for awaiting payload attestation data and submitting payload attestation messages with partial signature verification and slot-grouping. |
| core/validatorapi/validatorapi_test.go | Adds unit tests for the new component methods (data retrieval + submission path). |
| core/validatorapi/router.go | Adds the new GET/POST routes and enforces Eth-Consensus-Version: gloas on submission. |
| core/validatorapi/router_internal_test.go | Adds route-level tests for the new endpoints, including bad/missing version header behavior. |
| core/validatorapi/mocks/handler.go | Regenerates the Handler mock to include the new handler methods. |
| core/tracing.go | Wraps DutyDBAwaitPayloadAttestation with tracing spans. |
| core/interfaces.go | Extends core interfaces/wiring to include AwaitPayloadAttestationData registration and wiring glue. |
| core/deadline.go | Adds a DutyPayloadAttestation deadline duration of one slot. |
| core/bcast/bcast.go | Includes DutyPayloadAttestation in the delay-metric offset selection set. |
Files not reviewed (1)
- core/validatorapi/mocks/handler.go: Generated file
💡 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 #4657 +/- ##
========================================
Coverage ? 58.81%
========================================
Files ? 245
Lines ? 34296
Branches ? 0
========================================
Hits ? 20171
Misses ? 11621
Partials ? 2504 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|



Add the VC-facing payload attestation surface:
GET /eth/v1/validator/payload_attestation_dataserved from the DutyDB viaAwaitPayloadAttestationData, andPOST /eth/v1/beacon/pool/payload_attestationsas partial-signature intake (validator index to cluster pubkey mapping, partial signature verification underDOMAIN_PTC_ATTESTER, grouped by slot). The requiredEth-Consensus-Versionrequest header is enforced on submission. Also wiresDutyPayloadAttestationinto the bcast delay metric (measured from the duty trigger, consistent with other duties), duty deadline, andcore.Wire/tracing plumbing.Handler methods are plain (not
eth2clientinterfaces) until go-eth2-client exposes the PTC provider interfaces (attestantio/go-eth2-client#311); the 204 no-block-seen semantics land with the fetcher PR.category: feature
ticket: #4324