Skip to content

core/validatorapi: add payload attestation endpoints - #4657

Merged
KaloyanTanev merged 2 commits into
gloasfrom
kalo/gloas-ptc-plumbing
Aug 21, 2026
Merged

core/validatorapi: add payload attestation endpoints#4657
KaloyanTanev merged 2 commits into
gloasfrom
kalo/gloas-ptc-plumbing

Conversation

@KaloyanTanev

Copy link
Copy Markdown
Collaborator

Add the VC-facing payload attestation surface: GET /eth/v1/validator/payload_attestation_data served from the DutyDB via AwaitPayloadAttestationData, and POST /eth/v1/beacon/pool/payload_attestations as partial-signature intake (validator index to cluster pubkey mapping, partial signature verification under DOMAIN_PTC_ATTESTER, grouped by slot). The required Eth-Consensus-Version request header is enforced on submission. Also wires DutyPayloadAttestation into the bcast delay metric (measured from the duty trigger, consistent with other duties), duty deadline, and core.Wire/tracing plumbing.

Handler methods are plain (not eth2client interfaces) 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

@github-actions github-actions Bot added the branch-invalid PR raised against invalid branch. Not a main or release branch. label Aug 21, 2026
@sonarqubecloud

Copy link
Copy Markdown

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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_data returning gloas.PayloadAttestationData (with Eth-Consensus-Version: gloas response header).
  • Add POST /eth/v1/beacon/pool/payload_attestations to ingest partial payload attestation signatures, enforce Eth-Consensus-Version: gloas, and dispatch grouped partials downstream.
  • Wire DutyPayloadAttestation into 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

codecov Bot commented Aug 21, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 70.58824% with 30 lines in your changes missing coverage. Please review.
⚠️ Please upload report for BASE (gloas@563c58c). Learn more about missing BASE report.

Files with missing lines Patch % Lines
core/validatorapi/validatorapi.go 71.42% 6 Missing and 6 partials ⚠️
core/validatorapi/router.go 83.67% 4 Missing and 4 partials ⚠️
core/tracing.go 0.00% 5 Missing ⚠️
core/interfaces.go 0.00% 3 Missing ⚠️
core/deadline.go 0.00% 2 Missing ⚠️
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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@KaloyanTanev
KaloyanTanev merged commit 88c519c into gloas Aug 21, 2026
10 checks passed
@KaloyanTanev
KaloyanTanev deleted the kalo/gloas-ptc-plumbing branch August 21, 2026 13:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

branch-invalid PR raised against invalid branch. Not a main or release branch.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants