Skip to content

Comments

aggregator committee: deduplicate messages if validator has already been seen for a subnet#2681

Merged
nkryuchkov merged 3 commits intoboole-forkfrom
aggregator-committee-deduplicate-msgs
Feb 16, 2026
Merged

aggregator committee: deduplicate messages if validator has already been seen for a subnet#2681
nkryuchkov merged 3 commits intoboole-forkfrom
aggregator-committee-deduplicate-msgs

Conversation

@nkryuchkov
Copy link
Contributor

@nkryuchkov nkryuchkov commented Feb 9, 2026

On hold until it's implemented in spec due to broken spec tests
ssvlabs/ssv-spec#603

@nkryuchkov nkryuchkov requested review from a team as code owners February 9, 2026 17:34
@nkryuchkov
Copy link
Contributor Author

@greptile-apps
Copy link
Contributor

greptile-apps bot commented Feb 9, 2026

Greptile Overview

Greptile Summary

Optimizes sync committee selection proof generation by deduplicating messages when multiple validator sync committee indices map to the same subnet. Since selection proofs depend only on slot and subcommittee index (not the specific validator index), generating multiple signatures for the same subnet is redundant. The change tracks seen subnets and skips duplicate signature generation while maintaining the correct rootToSyncCommitteeIdx mapping needed for later processing.

Confidence Score: 5/5

  • This PR is safe to merge once spec tests are updated to match the new behavior
  • The logic correctly deduplicates signatures by subnet, which is a valid optimization since selection proofs only depend on slot+subnet. The implementation properly maintains the mapping structure and doesn't introduce any bugs. The PR is on hold waiting for spec changes, not due to code quality issues.
  • No files require special attention

Important Files Changed

Filename Overview
protocol/v2/ssv/runner/aggregator_committee.go Deduplicates sync committee selection proofs by subnet to avoid redundant signatures for validators mapping to the same subnet

Sequence Diagram

sequenceDiagram
    participant R as AggregatorCommitteeRunner
    participant BN as BeaconNode
    participant S as Signer
    
    Note over R: executeDuty for BNRoleSyncCommitteeContribution
    R->>R: Initialize seenSubnets map
    
    loop For each ValidatorSyncCommitteeIndex
        R->>BN: SyncCommitteeSubnetID(index)
        BN-->>R: subnet
        
        alt subnet already seen
            R->>R: Skip (continue)
        else subnet not seen
            R->>R: Mark subnet as seen
            R->>R: Create SyncAggregatorSelectionData(slot, subnet)
            R->>S: signBeaconObject(data)
            S-->>R: partialSig with SigningRoot
            R->>R: Append to messages
            R->>R: Store rootToSyncCommitteeIdx[SigningRoot] = index
        end
    end
    
    Note over R: Result: One signature per unique subnet instead of per index
Loading

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 file reviewed, no comments

Edit Code Review Agent Settings | Greptile

@codecov
Copy link

codecov bot commented Feb 9, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (boole-fork@c8c54ee). Learn more about missing BASE report.

☔ View full report in Codecov by Sentry.
📢 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.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@y0sher y0sher requested a review from iurii-ssv February 11, 2026 10:54
Copy link
Contributor

@iurii-ssv iurii-ssv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, could also mention that this PR pins down the golangci-lint version (in the PR description)

@nkryuchkov
Copy link
Contributor Author

LGTM, could also mention that this PR pins down the golangci-lint version (in the PR description)

The linter issue actually applies to the base branch as well, so I pulled the latest changes from it

@iurii-ssv
Copy link
Contributor

LGTM, could also mention that this PR pins down the golangci-lint version (in the PR description)

The linter issue actually applies to the base branch as well, so I pulled the latest changes from it

@nkryuchkov I think we have linter pipelines failing for stage branch too since recently, should we create a PR to merge it there too ?

@nkryuchkov
Copy link
Contributor Author

LGTM, could also mention that this PR pins down the golangci-lint version (in the PR description)

The linter issue actually applies to the base branch as well, so I pulled the latest changes from it

@nkryuchkov I think we have linter pipelines failing for stage branch too since recently, should we create a PR to merge it there too ?

@iurii-ssv #2684

Base automatically changed from aggregator-committee to boole-fork February 16, 2026 09:01
@nkryuchkov nkryuchkov force-pushed the aggregator-committee-deduplicate-msgs branch from 9e2ce0a to fb90446 Compare February 16, 2026 14:11
@nkryuchkov nkryuchkov merged commit 6f21b51 into boole-fork Feb 16, 2026
11 of 12 checks passed
@nkryuchkov nkryuchkov deleted the aggregator-committee-deduplicate-msgs branch February 16, 2026 18:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants