Skip to content

core: version and broadcast payload attestation message - #4668

Merged
KaloyanTanev merged 2 commits into
gloasfrom
kalo/gloas-versioned-payload-att-msg
Aug 26, 2026
Merged

core: version and broadcast payload attestation message#4668
KaloyanTanev merged 2 commits into
gloasfrom
kalo/gloas-versioned-payload-att-msg

Conversation

@KaloyanTanev

@KaloyanTanev KaloyanTanev commented Aug 26, 2026

Copy link
Copy Markdown
Collaborator

Refactor core.SignedPayloadAttestationMessage into core.VersionedPayloadAttestationMessage wrapping eth2spec.VersionedPayloadAttestationMessage, mirroring #4663 on the signed side and following the VersionedAttestation pattern. The parsig wire format (SSZ/JSON) now carries the fork version, and the validatorapi submit handler uses the validating constructor instead of a hardcoded gloas check.

On top of that, add DutyPayloadAttestation to the broadcaster: unwrap the signed set and submit via SubmitPayloadAttestationMessages, with no version fabrication anywhere.

category: feature
ticket: #4324

@KaloyanTanev KaloyanTanev self-assigned this Aug 26, 2026
@github-actions github-actions Bot added the branch-invalid PR raised against invalid branch. Not a main or release branch. label Aug 26, 2026
@KaloyanTanev
KaloyanTanev requested a lite review from Copilot August 26, 2026 12:56

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 refactors payload attestation messages on the “signed/parsig” side to be fork-versioned, aligning them with the existing “versioned data” patterns (and mirroring the earlier VersionedPayloadAttestationData work). It updates wire formats (SSZ/JSON) and the validator API submit path to use validating constructors rather than hardcoded Gloas checks, enabling fork-version-aware handling end-to-end.

Changes:

  • Introduces core.VersionedPayloadAttestationMessage wrapping eth2spec.VersionedPayloadAttestationMessage, including SSZ + JSON envelope encoding with the fork version.
  • Updates validatorapi payload attestation message submission to use the validating constructor and versioned accessors (Data(), ValidatorIndex()).
  • Updates fuzz/random generators, proto decoding, and golden/SSZ tests to cover the new versioned message format.

Reviewed changes

Copilot reviewed 14 out of 15 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
testutil/random.go Adds a random generator for eth2spec.VersionedPayloadAttestationMessage to support tests/helpers.
testutil/fuzz.go Adds fuzzing support for core.VersionedPayloadAttestationMessage (fixed version set to Gloas).
core/validatorapi/validatorapi.go Replaces hardcoded Gloas checks with NewPartialVersionedPayloadAttestationMessage + versioned accessors.
core/validatorapi/validatorapi_test.go Updates expected parsig objects to use the new versioned constructor.
core/ssz.go Implements SSZ marshal/unmarshal for VersionedPayloadAttestationMessage using the versioned envelope.
core/ssz_test.go Updates SSZ tests to validate the new versioned envelope bytes and round-trip behavior.
core/signeddata.go Adds VersionedPayloadAttestationMessage type, constructor/partial constructor, MessageRoot/signature plumbing, and JSON wrapper format.
core/serialise_test.go Switches JSON golden serialization coverage to the new versioned type.
core/proto.go Updates parsig proto decoding for DutyPayloadAttestation to unmarshal VersionedPayloadAttestationMessage.
core/eth2signeddata.go Updates Eth2SignedData implementation to use VersionedPayloadAttestationMessage for domain/epoch.
core/eth2signeddata_test.go Updates Eth2SignedData verification test to build a valid versioned payload attestation message.
core/testdata/TestSSZSerialisation_SignedPayloadAttestationMessage.ssz.golden Removes obsolete golden for the removed signed-only payload attestation message format.
core/testdata/TestJSONSerialisation_SignedPayloadAttestationMessage.json.golden Removes obsolete golden for the removed signed-only JSON payload attestation message format.
core/testdata/TestJSONSerialisation_VersionedPayloadAttestationMessage.json.golden Adds new JSON golden for the versioned message wrapper format.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread core/signeddata.go
@KaloyanTanev KaloyanTanev changed the title core: version payload attestation message core: version and broadcast payload attestation message Aug 26, 2026
@KaloyanTanev
KaloyanTanev requested a lite review from Copilot August 26, 2026 13:06
@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 16 out of 17 changed files in this pull request and generated 1 comment.

Comment thread core/bcast/bcast.go
@codecov

codecov Bot commented Aug 26, 2026

Copy link
Copy Markdown

Codecov Report

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

Files with missing lines Patch % Lines
core/signeddata.go 53.94% 27 Missing and 8 partials ⚠️
core/ssz.go 68.75% 6 Missing and 4 partials ⚠️
core/validatorapi/validatorapi.go 53.84% 3 Missing and 3 partials ⚠️
core/bcast/bcast.go 78.94% 2 Missing and 2 partials ⚠️
core/eth2signeddata.go 66.66% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@           Coverage Diff            @@
##             gloas    #4668   +/-   ##
========================================
  Coverage         ?   58.78%           
========================================
  Files            ?      246           
  Lines            ?    34746           
  Branches         ?        0           
========================================
  Hits             ?    20427           
  Misses           ?    11778           
  Partials         ?     2541           

☔ 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 requested a review from pinebit August 26, 2026 13:49
@KaloyanTanev KaloyanTanev mentioned this pull request Aug 26, 2026
31 tasks
@KaloyanTanev
KaloyanTanev merged commit f26215d into gloas Aug 26, 2026
12 checks passed
@KaloyanTanev
KaloyanTanev deleted the kalo/gloas-versioned-payload-att-msg branch August 26, 2026 15:45
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