Skip to content

Update PostDeploymentValidation script#21630

Merged
simsonraj merged 14 commits intodevelopfrom
update-post-deployment-validation
Mar 26, 2026
Merged

Update PostDeploymentValidation script#21630
simsonraj merged 14 commits intodevelopfrom
update-post-deployment-validation

Conversation

@simsonraj
Copy link
Copy Markdown
Contributor

@simsonraj simsonraj commented Mar 23, 2026

Updates Post validation scripts with extensive validation for 1.5 -> 1.6 chain migrations and new chains as well as FQ2.0 migration

Copilot AI review requested due to automatic review settings March 23, 2026 07:05
@simsonraj simsonraj requested review from a team as code owners March 23, 2026 07:05
@github-actions
Copy link
Copy Markdown
Contributor

👋 simsonraj, 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
Copy Markdown
Contributor

github-actions Bot commented Mar 23, 2026

✅ No conflicts with other open PRs targeting develop

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

Risk Rating: MEDIUM

This PR strengthens CCIP post-deployment validation by (a) collecting multiple validation errors instead of failing fast, (b) adding/expanding EVM chain-level validators (FeeQuoter/NonceManager/RMNProxy/ownership), and (c) adding memory-environment tests to exercise the new validation behavior.

Changes:

  • Refactors ValidatePostDeploymentState to delegate to an internal helper, optionally skip MCMS ownership validation, and aggregate errors via errors.Join.
  • Introduces new EVM validation helpers (ValidateFeeQuoter, ValidateNonceManager, ValidateRMNProxy, ValidateContractOwnership) plus extensive unit tests.
  • Updates FeeQuoter defaults logic and removes a duplicate helper from ops code.

Reviewed changes

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

Show a summary per file
File Description
deployment/ccip/shared/stateview/state.go Adds “skip MCMS ownership” variant, aggregates validation errors, and adds RMNProxy/ownership validations.
deployment/ccip/shared/stateview/evm/validate.go New EVM validators for FeeQuoter/NonceManager/RMNProxy/ownership.
deployment/ccip/shared/stateview/evm/validate_test.go New tests covering happy path, multi-error aggregation, ownership, RMNProxy, NonceManager, FeeQuoter, and home chain validation.
deployment/ccip/shared/stateview/evm/state.go Improves home-chain validation structure + makes OnRamp/OffRamp checks stricter.
deployment/ccip/operation/evm/v1_6/ops_fee_quoter.go Removes now-redundant default dest config helper + unused imports.
deployment/ccip/changeset/v1_6/cs_chain_contracts.go Adjusts FeeQuoter dest default fees based on destination chain type.
deployment/ccip/changeset/testhelpers/test_environment.go Uses the new “without MCMS ownership” validator in memory env setup.

Targeted areas for scrupulous human review:

  • deployment/ccip/shared/stateview/state.go: error aggregation + new ownership/RMNProxy validation flow (risk of masking/falsely passing, and nil-panics in error formatting).
  • deployment/ccip/shared/stateview/evm/validate.go: FeeQuoter “expected defaults” logic (chain classification, version handling, and legacy cross-checks).

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

  • @smartcontractkit/ccip-tooling, @smartcontractkit/ccip-offchain, @smartcontractkit/operations-platform

Comment thread deployment/ccip/shared/stateview/state.go Outdated
Comment thread deployment/ccip/shared/stateview/state.go Outdated
Comment thread deployment/ccip/shared/stateview/evm/validate.go Outdated
Comment thread deployment/ccip/shared/stateview/state.go Outdated
Comment thread deployment/ccip/shared/stateview/state.go Outdated
Comment thread deployment/ccip/shared/stateview/state.go Outdated
@trunk-io
Copy link
Copy Markdown

trunk-io Bot commented Mar 23, 2026

Static BadgeStatic BadgeStatic BadgeStatic Badge

View Full Report ↗︎Docs

@simsonraj simsonraj requested a review from a team as a code owner March 24, 2026 12:29
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Mar 24, 2026

CORA - Pending Reviewers

All codeowners have approved! ✅

Legend: ✅ Approved | ❌ Changes Requested | 💬 Commented | 🚫 Dismissed | ⏳ Pending | ❓ Unknown

For more details, see the full review summary.

@github-actions
Copy link
Copy Markdown
Contributor

I see you updated files related to core. Please run make gocs in the root directory to add a changeset as well as in the text include at least one of the following tags:

  • #added For any new functionality added.
  • #breaking_change For any functionality that requires manual action for the node to boot.
  • #bugfix For bug fixes.
  • #changed For any change to the existing functionality.
  • #db_update For any feature that introduces updates to database schema.
  • #deprecation_notice For any upcoming deprecation functionality.
  • #internal For changesets that need to be excluded from the final changelog.
  • #nops For any feature that is NOP facing and needs to be in the official Release Notes for the release.
  • #removed For any functionality/config that is removed.
  • #updated For any functionality that is updated.
  • #wip For any change that is not ready yet and external communication about it should be held off till it is feature complete.

jmank88
jmank88 previously approved these changes Mar 24, 2026
Comment on lines +227 to +230
name, _ := chain_selectors.GetChainNameFromSelector(destChainSelector[0])
if strings.HasPrefix(name, "ethereum") {
networkFeeUSDCents = 50
defaultTokenFeeUSDCents = 150
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This is going to set these values for a lot of chains though, a lot of chain names start with ethereum, example - ethereum-mainnet-unichain-1

Copy link
Copy Markdown
Contributor Author

@simsonraj simsonraj Mar 25, 2026

Choose a reason for hiding this comment

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

ah good catch, i fixed it in another file, but missed to propagate this here

Comment on lines +210 to +211
familySelector, _ := hex.DecodeString(EVMFamilySelector)
networkFeeUSDCents := uint32(10)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

DefaultFeeQuoterDestChainConfig accepts multiple destChainSelector and always consider the first one? why do we need multiple then?

Copy link
Copy Markdown
Contributor Author

@simsonraj simsonraj Mar 26, 2026

Choose a reason for hiding this comment

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

This was already functioning that way here (cs_chain_contracts)
https://github.com/smartcontractkit/chainlink/pull/21630/changes#diff-e8b395a3a7f5dab0bcc777f295eccf0b017ec8bfc4e7696bf55fa7f51c45dc93R1745
I just moved it here to be shared & this function before was not being used anywhere.
But this shouldnt have any impact as it is only referenced by tests and they dont usually classify a chain as Ethereum or not for these settings, but my tests does but its always just the 1 chain

GasMultiplierWeiPerEth: 11e17, // Gas multiplier in wei per eth is scaled by 1e18, so 11e17 is 1.1 = 110%
NetworkFeeUSDCents: 10,
GasMultiplierWeiPerEth: 11e17,
NetworkFeeUSDCents: networkFeeUSDCents,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

no gasPriceStalenessthreashold?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Same as previous, I just moved it to the shared package & remove the unused method, but this is good point, I think this is the reason why all the integrations have been setting the staleness threshold to zero, so I added it now

}
for _, ft := range feeTokens {
if !v16Set[ft] {
errs = append(errs, fmt.Errorf("FeeQuoter v2.0 %s has fee token %s not present in v1.6 FeeQuoter",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

FeeQuoter 2.0 can have a fee token which might not be present in 1.6 -
Any token that has a price is considered a fee token in FQ2.0
https://github.com/smartcontractkit/chainlink-ccip/blob/main/chains/evm/contracts/FeeQuoter.sol#L150C64-L153
It's added here - https://github.com/smartcontractkit/chainlink-ccip/blob/main/chains/evm/contracts/FeeQuoter.sol#L279

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Ah did not know this, updated it

@cl-sonarqube-production
Copy link
Copy Markdown

@simsonraj simsonraj changed the title Update PostValidation script Update PostDeploymentValidation script Mar 26, 2026
@simsonraj simsonraj enabled auto-merge March 26, 2026 17:04
@simsonraj simsonraj added this pull request to the merge queue Mar 26, 2026
Merged via the queue into develop with commit eceff97 Mar 26, 2026
267 of 271 checks passed
@simsonraj simsonraj deleted the update-post-deployment-validation branch March 26, 2026 17:33
prashantkumar1982 pushed a commit that referenced this pull request Apr 2, 2026
* Update PostValidation script

* Lint fixes

* Updates perf fix & v2 FQ

* fixes

* refactor

* Fixes

* Lint fixes & others

* run go modtidy

* refactor

* Addressed comments & fixes

* formatting

* Add GasPriceStalenessThreshold back

* FQ test fixes
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