core: add gloas proposer preferences duty - #4693
Conversation
There was a problem hiding this comment.
🟡 Changes recommended
Same-slot reorg submissions collide in ParSigDB, and the endpoint rejects standard SSZ submissions.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
Adds Gloas proposer-preference intake and threshold-signing support to the validator workflow.
Changes:
- Adds proposer-preference duty, signing domain, serialization, and verification.
- Adds validator API intake, mismatch warnings, and metrics.
- Updates the Gloas client dependency and supporting tests/mocks.
File summaries
| File | Description |
|---|---|
testutil/random.go |
Adds random proposer preferences. |
go.mod |
Updates the Gloas client fork. |
go.sum |
Updates dependency checksums. |
eth2util/signing/signing.go |
Adds the proposer-preferences domain. |
core/validatorapi/validatorapi.go |
Processes and validates partial preferences. |
core/validatorapi/validatorapi_test.go |
Tests preference submission. |
core/validatorapi/validatorapi_internal_test.go |
Tests mismatch metrics. |
core/validatorapi/router.go |
Adds the HTTP endpoint. |
core/validatorapi/mocks/handler.go |
Extends the generated handler mock. |
core/validatorapi/metrics.go |
Adds mismatch counters. |
core/types.go |
Defines the new duty type. |
core/types_test.go |
Updates duty compatibility tests. |
core/signeddata.go |
Implements signed preference data. |
core/proto.go |
Adds protobuf decoding. |
core/proto_test.go |
Tests protobuf round trips. |
core/eth2signeddata.go |
Adds domain and epoch resolution. |
Review details
Files not reviewed (1)
- core/validatorapi/mocks/handler.go: Generated file
- Files reviewed: 14/16 changed files
- Comments generated: 6
- Review effort level: Balanced
💡 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.
🟡 Changes recommended
Threshold completion currently fails at broadcasting, and reorg aggregates still collide in AggSigDB.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Review details
Files not reviewed (1)
- core/validatorapi/mocks/handler.go: Generated file
- Files reviewed: 25/27 changed files
- Comments generated: 2
- Review effort level: Balanced
There was a problem hiding this comment.
🟡 Changes recommended
Input bounds, HTTP error classification, and non-blocking processing semantics remain unresolved.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Review details
Files not reviewed (1)
- core/validatorapi/mocks/handler.go: Generated file
- Files reviewed: 31/33 changed files
- Comments generated: 3
- Review effort level: Balanced
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## gloas #4693 +/- ##
========================================
Coverage ? 59.00%
========================================
Files ? 246
Lines ? 35181
Branches ? 0
========================================
Hits ? 20759
Misses ? 11846
Partials ? 2576 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
🟡 Changes recommended
SSZ empty-list handling and request-size bounds remain incorrect, and router behavior lacks direct coverage.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Review details
Files not reviewed (1)
- core/validatorapi/mocks/handler.go: Generated file
Suppressed comments (1)
core/validatorapi/router.go:1878
- An empty SSZ list is valid and is what the upstream client encodes for an empty preferences slice, but this condition rejects it while the JSON form
[]succeeds. Remove the explicit zero-length rejection so both encodings implement the same empty-list behavior.
if len(body) == 0 || len(body)%itemSize != 0 {
- Files reviewed: 31/33 changed files
- Comments generated: 2
- Review effort level: Balanced
9cbd678 to
18544db
Compare
944c6a6 to
5335b92
Compare
6a13185 to
b3050c6
Compare
b3050c6 to
dc2ab77
Compare
|



Adds the gloas proposer preferences signed duty. From the gloas fork, validator-signed
ProposerPreferencessupersedeprepare_beacon_proposerandregister_validatoras the source of fee recipient and gas limit.This adds the
core.SignedProposerPreferencestype +DOMAIN_PROPOSER_PREFERENCESdomain, and aPOST /eth/v1/validator/proposer_preferencesintake handler aggregated like sync committee messages (verify the partial signature, group by proposal slot, forward to subscribers, non-blocking). Threshold aggregation reuses the genericParSigDB/SigAggpath (grouped by message root), so the changed-dependent_root-on-reorg case needs no special handling. A warn +proposer_preferences_mismatch_totalmetric fires when a submittedfee_recipient/target_gas_limitdiffers from the cluster-lock value (no rejection, so a staggered gas-limit change self-heals).Follow-ups, blocked or deferred: broadcasting the aggregate (attestantio/go-eth2-client#316), serving v2 proposer duties with the E-2 shuffling
dependent_root(upstream v2 provider), and validatormock/e2e support.category: feature
ticket: #4691