refactor(duties_tracker): retain proposer-duty v2 response metadata - #1241
Merged
mergify[bot] merged 1 commit intoAug 12, 2026
Merged
Conversation
Fetch proposer duties from the v2 endpoint and store each epoch's response as a ProposerSchedule: the duties plus dependent_root and execution_optimistic. A response is stored only if it validates as a complete schedule (one duty per slot of the requested epoch); a failed or malformed refresh keeps the previously stored schedule. Closes sigp#1183
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## epbs #1241 +/- ##
=======================================
Coverage ? 73.13%
=======================================
Files ? 170
Lines ? 34495
Branches ? 0
=======================================
Hits ? 25227
Misses ? 9268
Partials ? 0
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
Queued — the merge queue status continues in this comment ↓. |
Merge Queue Status
This pull request spent 28 minutes 42 seconds in the queue, including 26 minutes 44 seconds running CI. Required conditions to merge
|
11 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem, Evidence, and Context
proposer_assignment_at_slotthen answeredNotAssignedfor validators the response simply failed to include. SIP-101 allows a schedule to establish a view only when it is complete: one duty for every slot of the epoch.dependent_rootis the fork-aware decision root (v1 returns the legacy one), which later refresh logic needs.Change Overview
ProposerScheduletype with private fields, built only throughfrom_response, which accepts a response only if it has exactlySLOTS_PER_EPOCHduties, all inside the requested epoch, each slot exactly once. Anything else is rejected with a typed error naming the defect.get_validator_duties_proposer_v2and stores the validated schedule together withdependent_rootandexecution_optimistic. Neither field affects whether a schedule is accepted; they are retained for refresh decisions and diagnostics (fix(duties_tracker): authoritative complete-schedule transitions for proposer assignment verdicts #1184).DutiesProvidertrait andDutyAssignmentsemantics, per-epoch insert ordering, current+next polling, retention pruning, and no filtering by the local registry.Risks, Trade-offs, and Mitigations
/eth/v2/validator/duties/proposer; the pinned Lighthouse does.Validation
SLOTS_PER_EPOCHand every slot in range, a missing slot can only appear as a duplicate, so that case covers both.cargo +nightly fmt --check,clippy --all-targets -D warnings, andcargo test -p duties_tracker(11 tests) pass.Rollback
Blockers / Dependencies
Additional Info / Next Steps