Skip to content

core/validatorapi: adopt payload attestation interfaces - #4658

Merged
KaloyanTanev merged 2 commits into
gloasfrom
kalo/gloas-client-bump
Aug 21, 2026
Merged

core/validatorapi: adopt payload attestation interfaces#4658
KaloyanTanev merged 2 commits into
gloasfrom
kalo/gloas-client-bump

Conversation

@KaloyanTanev

Copy link
Copy Markdown
Collaborator

Bump go-eth2-client to v0.29.0-obol.2-gloas (obol stack rebased onto upstream gloas with the merged ePBS transport and PTC endpoints from attestantio/go-eth2-client#310 and #311). Replace the temporary plain Handler methods with the upstream eth2client.PayloadAttestationDataProvider and eth2client.PayloadAttestationMessagesSubmitter interfaces, adapting the component and router to the versioned opts/response types. The VC-facing wire format is unchanged; the validated Eth-Consensus-Version header now selects the message version passed to the submitter.

category: refactor
ticket: #4324

@KaloyanTanev KaloyanTanev self-assigned this Aug 21, 2026
@github-actions github-actions Bot added the branch-invalid PR raised against invalid branch. Not a main or release branch. label Aug 21, 2026
@KaloyanTanev
KaloyanTanev requested a lite review from Copilot August 21, 2026 14:13
@KaloyanTanev KaloyanTanev changed the title core/validatorapi: use go-eth2-client payload attestation interfaces core/validatorapi: adopt payload attestation interfaces Aug 21, 2026

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

Refactors the validator API’s payload attestation endpoints to use the upstream go-eth2-client payload attestation provider/submitter interfaces after bumping Charon’s forked go-eth2-client dependency for Gloas support, while keeping the VC-facing JSON wire format unchanged.

Changes:

  • Bumps the attestantio/go-eth2-client replacement to github.com/ObolNetwork/go-eth2-client v0.29.0-obol.2-gloas.
  • Updates core/validatorapi component methods to implement eth2client.PayloadAttestationDataProvider and eth2client.PayloadAttestationMessagesSubmitter using versioned opts/response/message types.
  • Adapts router/tests/mocks to the new interfaces and propagates the validated Eth-Consensus-Version into submitted message versions.

Reviewed changes

Copilot reviewed 5 out of 7 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
go.sum Updates module checksums for the bumped forked go-eth2-client version.
go.mod Updates the replace directive to the new go-eth2-client fork version.
core/validatorapi/validatorapi.go Implements upstream payload attestation provider/submitter interfaces and wraps data/messages in versioned containers.
core/validatorapi/validatorapi_test.go Updates component tests to use opts structs and assert versioned response/message behavior.
core/validatorapi/router.go Switches payload attestation routes to call the new interfaces and build versioned submit opts.
core/validatorapi/router_internal_test.go Updates router tests for the new handler signatures and versioned message passing.
core/validatorapi/mocks/handler.go Regenerates/updates mocks for the new payload attestation method signatures and types.
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.

Comment thread core/validatorapi/router.go
@codecov

codecov Bot commented Aug 21, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 80.64516% with 6 lines in your changes missing coverage. Please review.
⚠️ Please upload report for BASE (gloas@88c519c). Learn more about missing BASE report.

Files with missing lines Patch % Lines
core/validatorapi/validatorapi.go 71.42% 2 Missing and 2 partials ⚠️
core/validatorapi/router.go 88.23% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@           Coverage Diff            @@
##             gloas    #4658   +/-   ##
========================================
  Coverage         ?   58.84%           
========================================
  Files            ?      245           
  Lines            ?    34316           
  Branches         ?        0           
========================================
  Hits             ?    20193           
  Misses           ?    11617           
  Partials         ?     2506           

☔ 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.

@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

Copilot reviewed 5 out of 7 changed files in this pull request and generated no new comments.

Files not reviewed (1)
  • core/validatorapi/mocks/handler.go: Generated file
Suppressed comments (1)

core/validatorapi/router.go:1621

  • payloadAttestationData dereferences eth2Resp.Data and then reads data.Version without guarding against a nil response or nil Data. If the provider ever returns (nil, nil) or a response with Data == nil, this handler will panic instead of returning an HTTP error.
		data := eth2Resp.Data
		if data.Version != eth2spec.DataVersionGloas || data.Gloas == nil {
			return nil, nil, errors.New("unsupported payload attestation data version")
		}

@KaloyanTanev
KaloyanTanev merged commit aa81e43 into gloas Aug 21, 2026
10 checks passed
@KaloyanTanev
KaloyanTanev deleted the kalo/gloas-client-bump branch August 21, 2026 15:34
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