Skip to content

Connect EVM with EVM: Add support for skipping FQ v2 config if already configured during migration#21665

Open
HelloKashif wants to merge 1 commit intodevelopfrom
feat/skip-existing-fq-dest-configs
Open

Connect EVM with EVM: Add support for skipping FQ v2 config if already configured during migration#21665
HelloKashif wants to merge 1 commit intodevelopfrom
feat/skip-existing-fq-dest-configs

Conversation

@HelloKashif
Copy link
Contributor

Connect EVM with EVM: Add support for skipping FQ v2 config if already configured during migration

@github-actions
Copy link
Contributor

👋 HelloKashif, thanks for creating this pull request!

To help reviewers, please consider creating future PRs as drafts first. This allows you to self-review and make any final changes before notifying the team.

Once you're ready, you can mark it as "Ready for review" to request feedback. Thanks!

@github-actions
Copy link
Contributor

github-actions bot commented Mar 24, 2026

✅ No conflicts with other open PRs targeting develop

@HelloKashif HelloKashif force-pushed the feat/skip-existing-fq-dest-configs branch from 0da1c07 to aa34bbe Compare March 24, 2026 07:58
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

Risk Rating: HIGH

This PR changes how v2 FeeQuoter destination config updates are generated during lane updates, aiming to avoid overwriting already-configured v2 FeeQuoter destinations during migration.

Changes:

  • Add FilterOutExistingDestChainConfigs to query v2 FeeQuoter on-chain state and skip dest configs that are already enabled.
  • Invoke this filter when building v2 FeeQuoter lane-update operations.
  • Add a unit test covering the “already enabled dest config is filtered out and not overwritten” behavior.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
deployment/ccip/changeset/v1_6/cs_update_bidirectional_lanes.go Adds and wires a new on-chain filtering step for v2 FeeQuoter dest config updates.
deployment/ccip/changeset/v1_6/cs_update_bidirectional_lanes_test.go Adds a focused test ensuring enabled destinations are filtered and existing config remains unchanged.

Requires scrupulous human review (behavioral / breaking-change risk):

  • FilterOutExistingDestChainConfigs + its unconditional use in UpdateLanesLogic for v2 FeeQuoter chains (it can change the semantics of “update” by skipping updates to already-enabled destinations).

Suggested reviewers (per .github/CODEOWNERS for /deployment/ccip):

  • @smartcontractkit/ccip-tooling, @smartcontractkit/ccip-offchain, @smartcontractkit/operations-platform (and @smartcontractkit/core as needed)

Comment on lines +371 to +384
for _, destCfg := range destCfgs {
existing, err := fqContract.GetDestChainConfig(&bind.CallOpts{Context: e.GetContext()}, destCfg.DestChainSelector)
if err != nil {
return nil, fmt.Errorf("failed to query existing dest chain config on chain %d for dest %d: %w",
chainSel, destCfg.DestChainSelector, err)
}
if existing.IsEnabled {
e.Logger.Infow("skipping dest chain config already present on v2 FeeQuoter",
"sourceChain", chainSel,
"destChain", destCfg.DestChainSelector,
)
continue
}
filtered = append(filtered, destCfg)
Copy link

Copilot AI Mar 24, 2026

Choose a reason for hiding this comment

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

FilterOutExistingDestChainConfigs currently drops all updates for destinations that are already enabled on-chain. That means legitimate config changes (or an intended disable) for an already-enabled destination will be silently skipped, which changes the semantics of running UpdateLanesLogic against an existing v2 FeeQuoter. Consider narrowing the filter to the migration/idempotency case (e.g., only skip when the requested config is an enable and the on-chain config already matches, or gate behind an explicit flag) so intentional updates to enabled destinations still apply.

Copilot uses AI. Check for mistakes.
@HelloKashif HelloKashif force-pushed the feat/skip-existing-fq-dest-configs branch from aa34bbe to fc270eb Compare March 24, 2026 08:10
@trunk-io
Copy link

trunk-io bot commented Mar 24, 2026

Static BadgeStatic BadgeStatic BadgeStatic Badge

View Full Report ↗︎Docs

@HelloKashif HelloKashif force-pushed the feat/skip-existing-fq-dest-configs branch from fc270eb to b4914f5 Compare March 24, 2026 10:42
@HelloKashif HelloKashif force-pushed the feat/skip-existing-fq-dest-configs branch from b4914f5 to 134adea Compare March 25, 2026 01:27
@cl-sonarqube-production
Copy link

@HelloKashif HelloKashif enabled auto-merge March 25, 2026 03:10
@HelloKashif HelloKashif requested a review from simsonraj March 25, 2026 03:10
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.

2 participants