Skip to content

Avoid aggregating report that will fail get_message_since mapping#971

Merged
carte7000 merged 1 commit intomainfrom
simon/aggregaotr/avoid-aggregation-when-not-exportable
Apr 1, 2026
Merged

Avoid aggregating report that will fail get_message_since mapping#971
carte7000 merged 1 commit intomainfrom
simon/aggregaotr/avoid-aggregation-when-not-exportable

Conversation

@carte7000
Copy link
Copy Markdown
Contributor

No description provided.

@github-actions
Copy link
Copy Markdown

Code coverage report:

Package main simon/aggregaotr/avoid-aggregation-when-not-exportable diff
github.com/smartcontractkit/chainlink-ccv/aggregator 47.47% 48.46% +0.99%
github.com/smartcontractkit/chainlink-ccv/bootstrap 42.35% 42.35% +0.00%
github.com/smartcontractkit/chainlink-ccv/cli 65.13% 65.13% +0.00%
github.com/smartcontractkit/chainlink-ccv/cmd 0.00% 0.00% +0.00%
github.com/smartcontractkit/chainlink-ccv/common 50.74% 50.74% +0.00%
github.com/smartcontractkit/chainlink-ccv/executor 46.42% 46.42% +0.00%
github.com/smartcontractkit/chainlink-ccv/indexer 42.70% 42.70% +0.00%
github.com/smartcontractkit/chainlink-ccv/integration 46.14% 46.14% +0.00%
github.com/smartcontractkit/chainlink-ccv/pkg 100.00% 100.00% +0.00%
github.com/smartcontractkit/chainlink-ccv/pricer 0.00% 0.00% +0.00%
github.com/smartcontractkit/chainlink-ccv/protocol 68.69% 68.69% +0.00%
github.com/smartcontractkit/chainlink-ccv/verifier 33.10% 33.10% +0.00%

@carte7000 carte7000 marked this pull request as ready for review April 1, 2026 16:07
@carte7000 carte7000 requested review from a team and skudasov as code owners April 1, 2026 16:07
Copilot AI review requested due to automatic review settings April 1, 2026 16:07
@carte7000 carte7000 enabled auto-merge April 1, 2026 16:07
@carte7000 carte7000 added this pull request to the merge queue Apr 1, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This pull request prevents the aggregator from submitting (and later surfacing via GetMessagesSince) aggregated reports that meet quorum but cannot be mapped into an exportable verifier result due to missing committee/destination-verifier configuration, while also tracking this condition via a new metric.

Changes:

  • Add a new counter metric (aggregator_aggregations_blocked_unexportable) and interface method to record when quorum is met but export mapping is impossible.
  • Update aggregation submission flow to pre-validate exportability (via MapAggregatedReportToVerifierResultProto) and skip submission when unexportable.
  • Adjust report-to-proto mapping rules so message-discovery reports can omit destination verifier metadata, with new/updated unit tests covering the behavior.

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated no comments.

Show a summary per file
File Description
internal/mocks/mock_AggregatorMetricLabeler.go Extends the metric labeler mock with IncrementAggregationsBlockedUnexportable.
aggregator/pkg/monitoring/noop.go Adds a no-op implementation for the new metric method.
aggregator/pkg/monitoring/metrics.go Registers the new counter and implements the increment method on the real labeler.
aggregator/pkg/model/model_mappers.go Updates mapping logic to allow nil destination metadata for message-discovery version; otherwise require destination verifier mapping.
aggregator/pkg/model/map_aggregated_report_mapper_test.go Adds tests validating destination-verifier rules for message-discovery vs non-message-discovery versions.
aggregator/pkg/common/metrics.go Extends AggregatorMetricLabeler interface with the new method.
aggregator/pkg/aggregation/aggregator.go Adds committee reference and blocks submission when quorum met but report is not exportable; increments new metric.
aggregator/pkg/aggregation/aggregator_test.go Updates existing aggregation tests and adds coverage for blocked-unexportable scenarios.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Merged via the queue into main with commit 358aba2 Apr 1, 2026
34 of 37 checks passed
@carte7000 carte7000 deleted the simon/aggregaotr/avoid-aggregation-when-not-exportable branch April 1, 2026 16:30
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