Skip to content

Remove chain selectors params from agg/indexer cs#1893

Merged
carte7000 merged 2 commits intomainfrom
simon/remove-chain-selectors-from-idx-agg
Mar 23, 2026
Merged

Remove chain selectors params from agg/indexer cs#1893
carte7000 merged 2 commits intomainfrom
simon/remove-chain-selectors-from-idx-agg

Conversation

@carte7000
Copy link
Contributor

No description provided.

Copy link
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 PR removes explicit chain selector parameters from the v1_7_0 aggregator/indexer config changesets, shifting selection logic to topology (aggregator) and environment chains (indexer) while improving how undeployed verifier addresses are handled.

Changes:

  • Remove ChainSelectors from GenerateIndexerConfigInput and GenerateAggregatorConfigInput.
  • For aggregator config generation, derive chain selectors from the provided committee topology (and validate it).
  • For indexer config generation, ignore per-chain “missing addresses” errors and fail if no addresses exist across all environment chains for a qualifier.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
deployment/v1_7_0/changesets/generate_indexer_config.go Removes selector filtering and adds logic to skip missing-address errors, with new “no deployed addresses” behavior.
deployment/v1_7_0/changesets/generate_indexer_config_test.go Updates tests to match new indexer input shape and behavior.
deployment/v1_7_0/changesets/generate_aggregator_config.go Replaces selector input with topology-driven chain selection and validation.
deployment/v1_7_0/changesets/generate_aggregator_config_test.go Updates aggregator tests to build selectors from topology and adds validation cases.
deployment/v1_7_0/adapters/indexer_config.go Introduces a typed “missing addresses” error and a registry helper to detect adapters.
ccv/chains/evm/deployment/v1_7_0/adapters/indexer_config_adapter.go Switches EVM adapter to return the new typed missing-address error.

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

Comment on lines 111 to +115

addrs, err := adapter.ResolveVerifierAddresses(ds, sel, qualifier, kind)
if err != nil {
var missingErr *adapters.MissingIndexerVerifierAddressesError
if errors.As(err, &missingErr) {
Copy link

Copilot AI Mar 23, 2026

Choose a reason for hiding this comment

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

Because GenerateIndexerConfig now always uses env.BlockChains.ListChainSelectors(), environments containing chain families without a registered IndexerConfigAdapter will fail hard at registry.GetByChain(sel). This is a regression from being able to restrict selectors via input. Consider treating “no adapter registered for chain family” as a non-fatal condition (skip that selector), ideally via a typed error from GetByChain / a HasAdapterForChain helper, so mixed-family environments can still generate indexer config for supported chains.

Copilot uses AI. Check for mistakes.
Comment on lines 112 to +117
addrs, err := adapter.ResolveVerifierAddresses(ds, sel, qualifier, kind)
if err != nil {
var missingErr *adapters.MissingIndexerVerifierAddressesError
if errors.As(err, &missingErr) {
continue
}
Copy link

Copilot AI Mar 23, 2026

Choose a reason for hiding this comment

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

The new behavior that ignores adapters.MissingIndexerVerifierAddressesError via errors.As isn’t exercised by the current tests (the mock adapter returns (nil, nil) on missing data). Add a test case where the adapter returns MissingIndexerVerifierAddressesError for one selector to ensure the changeset correctly skips that chain and still succeeds when other chains provide addresses.

Copilot uses AI. Check for mistakes.
@github-actions
Copy link

Metric simon/remove-chain-selectors-from-idx-agg main
Coverage 70.1% 69.8%

@carte7000 carte7000 added this pull request to the merge queue Mar 23, 2026
Merged via the queue into main with commit 82b60f3 Mar 23, 2026
73 of 75 checks passed
@carte7000 carte7000 deleted the simon/remove-chain-selectors-from-idx-agg branch March 23, 2026 20:05
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.

5 participants