testutil: vmock payload attestation and simnet e2e - #4670
Conversation
There was a problem hiding this comment.
Pull request overview
This PR extends Charon’s test utilities to support the Gloas payload timeliness committee (PTC) flow by teaching the validator mock to perform DutyPayloadAttestation, enhancing beaconmock PTC duty responses/metadata, and adding a simnet e2e coverage case to assert payload attestation broadcast behavior under Gloas spec overrides.
Changes:
- Add a stateless
PayloadAttestduty implementation tovalidatormockand wire it into the duty runner/scheduling. - Add deterministic PTC duties support to
beaconmock, and ensure PTC duties responses include expected metadata (dependent_root,execution_optimistic). - Add a simnet e2e test case enabling Gloas via spec overrides and asserting
DutyPayloadAttestationbehavior with mock VCs.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| testutil/validatormock/payloadattest.go | Implements payload timeliness committee signing and submission for the validator mock. |
| testutil/validatormock/component.go | Wires DutyPayloadAttestation into duty execution and duty start-time scheduling. |
| testutil/integration/simnet_test.go | Adds a simnet e2e scenario for payload attestations with Gloas activated via spec overrides. |
| testutil/beaconmock/options.go | Adds WithDeterministicPTCDuties option to generate PTC duties deterministically. |
| testutil/beaconmock/beaconmock.go | Wraps PTC duties responses with metadata required by the beacon API response shape. |
Suppressed comments (1)
testutil/validatormock/payloadattest.go:86
- This nil-check is for the fork-specific payload attestation data (
versioned.Gloas), but the error message is the same as the earlier versioned-wrapper nil-check. Consider making it fork-specific to clarify what was nil.
if data == nil {
return errors.New("payload attestation data is nil")
}
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
|
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 6 out of 6 changed files in this pull request and generated no new comments.
Suppressed comments (1)
testutil/validatormock/payloadattest.go:73
- The nil/error branches for payload attestation data (
dataResp.Data == niland laterversioned.Gloas == nil) are new behavior but currently aren’t covered bypayloadattest_test.go. Adding targeted subtests would make these failure modes deterministic and prevent regressions in the early-return/error handling.
versioned := dataResp.Data
if versioned == nil {
return errors.New("versioned payload attestation data is nil")
}
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## gloas #4670 +/- ##
========================================
Coverage ? 58.79%
========================================
Files ? 246
Lines ? 34818
Branches ? 0
========================================
Hits ? 20471
Misses ? 11794
Partials ? 2553 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|



Add payload timeliness committee support to the validator mock: a stateless
PayloadAttest(mirroringProposeBlock) that fetches PTC duties and payload attestation data via charon, signs withDomainPTCAttesterand submits versioned messages, scheduled at the 50% slot offset. AddWithDeterministicPTCDutiesto beaconmock and fix itsPTCDutiesto includedependent_root/execution_optimisticmetadata. Add a simnet e2e case assertingDutyPayloadAttestationis broadcast by all nodes with gloas activated via spec overrides.category: test
ticket: #4324