Update PostDeploymentValidation script#21630
Conversation
|
👋 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! |
|
✅ No conflicts with other open PRs targeting |
There was a problem hiding this comment.
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
ValidatePostDeploymentStateto delegate to an internal helper, optionally skip MCMS ownership validation, and aggregate errors viaerrors.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
CORA - Pending ReviewersAll codeowners have approved! ✅ Legend: ✅ Approved | ❌ Changes Requested | 💬 Commented | 🚫 Dismissed | ⏳ Pending | ❓ Unknown For more details, see the full review summary. |
|
I see you updated files related to
|
| name, _ := chain_selectors.GetChainNameFromSelector(destChainSelector[0]) | ||
| if strings.HasPrefix(name, "ethereum") { | ||
| networkFeeUSDCents = 50 | ||
| defaultTokenFeeUSDCents = 150 |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
ah good catch, i fixed it in another file, but missed to propagate this here
| familySelector, _ := hex.DecodeString(EVMFamilySelector) | ||
| networkFeeUSDCents := uint32(10) |
There was a problem hiding this comment.
DefaultFeeQuoterDestChainConfig accepts multiple destChainSelector and always consider the first one? why do we need multiple then?
There was a problem hiding this comment.
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, |
There was a problem hiding this comment.
no gasPriceStalenessthreashold?
There was a problem hiding this comment.
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", |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Ah did not know this, updated it
|
* 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




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