Skip to content

core: add gloas proposer preferences duty - #4693

Open
KaloyanTanev wants to merge 7 commits into
gloasfrom
kalo/gloas-proposer-preferences
Open

core: add gloas proposer preferences duty#4693
KaloyanTanev wants to merge 7 commits into
gloasfrom
kalo/gloas-proposer-preferences

Conversation

@KaloyanTanev

Copy link
Copy Markdown
Collaborator

Adds the gloas proposer preferences signed duty. From the gloas fork, validator-signed ProposerPreferences supersede prepare_beacon_proposer and register_validator as the source of fee recipient and gas limit.

This adds the core.SignedProposerPreferences type + DOMAIN_PROPOSER_PREFERENCES domain, and a POST /eth/v1/validator/proposer_preferences intake handler aggregated like sync committee messages (verify the partial signature, group by proposal slot, forward to subscribers, non-blocking). Threshold aggregation reuses the generic ParSigDB/SigAgg path (grouped by message root), so the changed-dependent_root-on-reorg case needs no special handling. A warn + proposer_preferences_mismatch_total metric fires when a submitted fee_recipient/target_gas_limit differs 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

@KaloyanTanev KaloyanTanev self-assigned this Sep 10, 2026
@github-actions github-actions Bot added the branch-invalid PR raised against invalid branch. Not a main or release branch. label Sep 10, 2026
@KaloyanTanev
KaloyanTanev requested a balanced review from Copilot September 10, 2026 09:54
@KaloyanTanev KaloyanTanev changed the title core: add gloas proposer preferences submission and aggregation core: add gloas proposer preferences duty Sep 10, 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.

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

Comment thread core/validatorapi/validatorapi.go
Comment thread core/validatorapi/router.go Outdated
Comment thread core/validatorapi/validatorapi.go Outdated
Comment thread core/validatorapi/validatorapi.go Outdated
Comment thread core/signeddata.go
Comment thread core/validatorapi/mocks/handler.go

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.

🟡 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

Comment thread core/parsigdb/memory.go Outdated
Comment thread core/validatorapi/validatorapi.go

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.

🟡 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

Comment thread core/validatorapi/router.go
Comment thread core/validatorapi/validatorapi.go
Comment thread core/validatorapi/validatorapi.go
@codecov

codecov Bot commented Sep 10, 2026

Copy link
Copy Markdown

Codecov Report

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

Files with missing lines Patch % Lines
core/parsigdb/memory.go 72.28% 18 Missing and 5 partials ⚠️
core/aggsigdb/memory.go 76.19% 13 Missing and 7 partials ⚠️
core/validatorapi/validatorapi.go 80.28% 8 Missing and 6 partials ⚠️
core/signeddata.go 68.42% 9 Missing and 3 partials ⚠️
core/validatorapi/router.go 86.15% 6 Missing and 3 partials ⚠️
core/types.go 20.00% 4 Missing ⚠️
core/deadline.go 0.00% 2 Missing ⚠️
core/eth2signeddata.go 66.66% 1 Missing and 1 partial ⚠️
core/proto.go 60.00% 1 Missing and 1 partial ⚠️
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.
📢 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.

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.

🟡 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

Comment thread core/validatorapi/router.go
Comment thread core/validatorapi/router.go

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.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

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.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@KaloyanTanev
KaloyanTanev force-pushed the kalo/gloas-proposer-preferences branch from 9cbd678 to 18544db Compare September 11, 2026 07:01
@KaloyanTanev
KaloyanTanev force-pushed the kalo/gloas-proposer-preferences branch from 944c6a6 to 5335b92 Compare September 11, 2026 08:49
@KaloyanTanev
KaloyanTanev marked this pull request as draft September 11, 2026 13:29
@KaloyanTanev
KaloyanTanev force-pushed the kalo/gloas-proposer-preferences branch 4 times, most recently from 6a13185 to b3050c6 Compare September 11, 2026 14:31
@KaloyanTanev
KaloyanTanev force-pushed the kalo/gloas-proposer-preferences branch from b3050c6 to dc2ab77 Compare September 11, 2026 14:41
@sonarqubecloud

Copy link
Copy Markdown

@KaloyanTanev
KaloyanTanev marked this pull request as ready for review September 11, 2026 14:42
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.

2 participants