core/*: use comm idx as key in DutyDB for agg duty#4544
Open
KaloyanTanev wants to merge 6 commits into
Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes aggregator-duty lookup and partial-signature diagnostics, especially for post-Electra attestations where multiple committees can share the same attestation data root.
Changes:
- Adds committee index to aggregated attestation DutyDB lookup keys and threads it through validator API calls.
- Adds Electra multi-committee DutyDB coverage.
- Fixes partial-signature inconsistency reporting to check roots per pubkey.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
core/validatorapi/validatorapi.go |
Passes committee index into aggregate attestation lookup. |
core/tracker/tracker.go |
Updates inconsistent partial-signature reporting logic and log payload. |
core/interfaces.go |
Updates interfaces and wiring signatures for aggregate attestation lookup. |
core/dutydb/memory.go |
Includes committee index in aggregated attestation storage/query keys. |
core/dutydb/memory_test.go |
Adds Electra multi-committee aggregate lookup test and updates existing call. |
core/dutydb/memory_internal_test.go |
Updates cancelled-query test for new signature. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
pinebit
approved these changes
May 28, 2026
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.



Fixing 2 bugs with partial sigs during aggregation duties.
reportParSigs never warned on inconsistencies (core/tracker/tracker.go)
The guard checked
len(parsigsByRoot) <= 1against the outer map (number of pubkeys) instead of the inner map (number of distinct roots per pubkey), so the warning was effectively dead code for single-validator cases. Fixed, and improved the log to show per-rootmsg_roothex, share indices, and a sample parsig JSON.Wrong aggregate returned to VCs in post-Electra (core/dutydb/memory.go, core/validatorapi/validatorapi.go, core/interfaces.go)
In Electra,
AttestationData.Indexis always 0, so all committees in a slot share the sameAttestationDataRoot. TheaggKeyin DutyDB only used {slot, root}, causing later committee aggregates to silently overwrite earlier ones.AggregateAttestationalso ignoredopts.CommitteeIndexentirely. Fixed by addingCommitteeIndextoaggKey(derived fromCommitteeBitson post-Electra aggregates) and threading it throughAwaitAggAttestation.category: bug
ticket: #4006