Skip to content

Move all fee aggregator to topology#1933

Merged
carte7000 merged 3 commits intomainfrom
simon/fee-aggregator-topology
Apr 7, 2026
Merged

Move all fee aggregator to topology#1933
carte7000 merged 3 commits intomainfrom
simon/fee-aggregator-topology

Conversation

@carte7000
Copy link
Copy Markdown
Contributor

No description provided.

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 PR centralizes fee-aggregator configuration for v1.7.0 deployments by moving it out of per-committee/per-component config and into the environment topology, then plumbing the resolved value through the deployment changeset and EVM adapter.

Changes:

  • Add fee_aggregators (chainSelector → address) to EnvironmentTopology, remove FeeAggregator from ChainCommitteeConfig, and expose a GetFeeAggregator helper.
  • Update DeployChainContracts to resolve a single per-chain fee aggregator (topology-preferred, importer-fallback) and pass it via DeployChainContractsInput.
  • Refactor EVM deploy adapter/importer to consume the per-chain fee aggregator and apply it to OnRamp / committee verifiers / executors; update and add tests accordingly.

Reviewed changes

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

Show a summary per file
File Description
deployment/v1_7_0/offchain/topology.go Introduces topology-level fee_aggregators and validation/helper access.
deployment/v1_7_0/changesets/deploy_chain_contracts.go Enforces/derives per-chain fee aggregator and passes it into deploy input.
deployment/v1_7_0/changesets/deploy_chain_contracts_test.go Updates test topology builders and adds validation/apply coverage around fee_aggregators.
deployment/v1_7_0/adapters/deploy_chain_contracts.go Moves fee aggregator into top-level deploy input/contract params (import-output), removes per-component fields.
deployment/v1_7_0/adapters/deploy_chain_contracts_test.go Adjusts merge tests for the new FeeAggregator placement/behavior.
ccv/chains/evm/deployment/v1_7_0/adapters/deploy_chain_contracts_adapter.go Makes EVM adapter parse required per-chain FeeAggregator and inject it into downstream params.
ccv/chains/evm/deployment/v1_7_0/adapters/deploy_chain_contracts_adapter_test.go Updates importer/merge assertions to validate the new FeeAggregator behavior.

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

Comment on lines +87 to +98
if _, topOk := cfg.Cfg.Topology.GetFeeAggregator(sel); !topOk {
if cfg.Cfg.IgnoreImportedConfigFromPreviousVersion {
return fmt.Errorf("topology fee_aggregators entry is required for chain %d when IgnoreImportedConfigFromPreviousVersion is true", sel)
}
shouldImport, impErr := shouldImportConfigFromPreviousVersion(e, registry, sel)
if impErr != nil {
return fmt.Errorf("chain %d: %w", sel, impErr)
}
if !shouldImport {
return fmt.Errorf("topology fee_aggregators entry is required for chain %d when no v1.6.0 config import applies", sel)
}
}
Copy link

Copilot AI Apr 7, 2026

Choose a reason for hiding this comment

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

Preconditions currently treat a missing topology fee_aggregators entry as acceptable whenever shouldImportConfigFromPreviousVersion returns true, but that function only checks lane versions and does not guarantee the config importer will actually yield a FeeAggregator (e.g., OnRamp v1.6.0 metadata might be missing for the chain). This can allow VerifyPreconditions to pass and then fail later during Apply with a generic "FeeAggregator is required" error. Consider tightening validation when topOk is false by preflighting the importer (or at least verifying the previous-version metadata/address refs exist) so a missing FeeAggregator is rejected deterministically in VerifyPreconditions with a targeted message.

Copilot uses AI. Check for mistakes.
Comment on lines +21 to +26
IndexerAddress []string `toml:"indexer_address"`
PyroscopeURL string `toml:"pyroscope_url"`
FeeAggregators map[string]string `toml:"fee_aggregators,omitempty"`
Monitoring MonitoringConfig `toml:"monitoring"`
NOPTopology *NOPTopology `toml:"nop_topology"`
ExecutorPools map[string]ExecutorPoolConfig `toml:"executor_pools"`
Copy link

Copilot AI Apr 7, 2026

Choose a reason for hiding this comment

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

This struct field alignment isn’t gofmt’d (extra spacing before the struct tag on ExecutorPools). Please run gofmt on this file to keep formatting consistent and avoid CI/lint failures.

Suggested change
IndexerAddress []string `toml:"indexer_address"`
PyroscopeURL string `toml:"pyroscope_url"`
FeeAggregators map[string]string `toml:"fee_aggregators,omitempty"`
Monitoring MonitoringConfig `toml:"monitoring"`
NOPTopology *NOPTopology `toml:"nop_topology"`
ExecutorPools map[string]ExecutorPoolConfig `toml:"executor_pools"`
IndexerAddress []string `toml:"indexer_address"`
PyroscopeURL string `toml:"pyroscope_url"`
FeeAggregators map[string]string `toml:"fee_aggregators,omitempty"`
Monitoring MonitoringConfig `toml:"monitoring"`
NOPTopology *NOPTopology `toml:"nop_topology"`
ExecutorPools map[string]ExecutorPoolConfig `toml:"executor_pools"`

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

github-actions bot commented Apr 7, 2026

Metric simon/fee-aggregator-topology main
Coverage 70.1% 69.8%

@carte7000 carte7000 enabled auto-merge April 7, 2026 15:34
@carte7000 carte7000 added this pull request to the merge queue Apr 7, 2026
Merged via the queue into main with commit bac943d Apr 7, 2026
61 checks passed
@carte7000 carte7000 deleted the simon/fee-aggregator-topology branch April 7, 2026 15:57
carte7000 added a commit that referenced this pull request Apr 8, 2026
github-merge-queue bot pushed a commit that referenced this pull request Apr 8, 2026
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