*: add PayloadAttestation duty - #4618
Conversation
|
There was a problem hiding this comment.
Pull request overview
Prepares Charon internals for the Gloas hardfork by introducing the new payload timeliness/payload attestation duty type and the supporting consensus-spec plumbing (domain + intra-slot timing config), without yet wiring it into go-eth2-client or the full workflow.
Changes:
- Add
DutyPayloadAttestation(enum + string + constructor) and update duty-type compatibility tests. - Extend intra-slot timing config parsing to include Gloas payload-related deadlines (
PAYLOAD_DUE_BPS,PAYLOAD_ATTESTATION_DUE_BPS) and use the payload due time for payload-attestation slot offsets. - Add
DOMAIN_PTC_ATTESTERsupport to signing domain lookup, plus a unit test.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| eth2util/signing/signing.go | Adds DOMAIN_PTC_ATTESTER domain name constant for spec-based domain resolution. |
| eth2util/signing/signing_test.go | Verifies GetDomain resolves DOMAIN_PTC_ATTESTER via overridden spec values. |
| core/types.go | Introduces DutyPayloadAttestation and a convenience constructor. |
| core/types_test.go | Updates backwards-compatibility and duty list tests for the new duty type. |
| core/slotoffset.go | Schedules DutyPayloadAttestation using the payload deadline basis points. |
| core/slotoffset_internal_test.go | Adds timing config fields and tests payload-attestation slot offsets around the Gloas fork. |
| app/eth2wrap/utils.go | Extends slot timing config parsing to include payload + payload attestation deadlines and clarifies fork-key handling. |
| app/eth2wrap/utils_test.go | Updates expected fetched timing config to include payload-related defaults. |
| app/eth2wrap/utils_internal_test.go | Expands parsing test cases for payload deadlines and validation. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| DutyAggregator: timing.Aggregate, | ||
| DutySyncMessage: timing.SyncMessage, | ||
| DutySyncContribution: timing.Contribution, | ||
| DutyPayloadAttestation: timing.Payload, |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## gloas #4618 +/- ##
========================================
Coverage ? 57.91%
========================================
Files ? 246
Lines ? 34061
Branches ? 0
========================================
Hits ? 19728
Misses ? 11872
Partials ? 2461 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|



The new duty for gloas :). Only the internals here, without involving any go-eth2-client (meaning it's dead code as it stands).
category: feature
ticket: #4324