Skip to content

chore: Refactor onramp upgrade cs to include verifier_id - #1360

Draft
carte7000 wants to merge 1 commit into
mainfrom
refactor-onramp-upgrade-cs
Draft

chore: Refactor onramp upgrade cs to include verifier_id#1360
carte7000 wants to merge 1 commit into
mainfrom
refactor-onramp-upgrade-cs

Conversation

@carte7000

Copy link
Copy Markdown
Contributor

Introduces improved handling and isolation of verifier job identities for temporary or parallel jobs (such as on-ramp upgrade jobs), ensuring that isolated jobs have unique runtime verifier_ids while still referencing the canonical credentials for aggregator connections. It also adds comprehensive tests to verify correct behavior for both legacy and consolidated job topologies, and clarifies the code and comments around these behaviors.

Key changes include:

Isolated Job Identity and Configuration

  • Refactored the job suffix mechanism: replaced jobSuffix with isolatedJobSuffix and introduced helper methods (isIsolatedJob, applyJobID, and applyVerifierID) in applyVerifierConfigApplyOverrides to consistently apply isolation to both job IDs and verifier IDs. This ensures isolated jobs have unique identities without affecting credential lookup.
  • Updated ApplyOnrampUpgradeVerifierConfig to use the new WithIsolatedJob option, ensuring on-ramp upgrade jobs are properly isolated.

Job Specification and Aggregator Representation

  • Modified job spec generation to use the new isolation logic: canonical jobs retain the legacy AggregatorAddress field, while isolated jobs use a single-entry Aggregators list and a unique verifier_id, ensuring separation of runtime identity from secret lookup. [1] [2] [3]

@carte7000 carte7000 added the run-cl-smoke Force run CL smoke tests in PR CI. label Aug 18, 2026
@carte7000
carte7000 requested a balanced review from Copilot August 18, 2026 20:17
@github-actions

Copy link
Copy Markdown

Code coverage report:

Package main refactor-onramp-upgrade-cs Diff
github.com/smartcontractkit/chainlink-ccv/aggregator 50.86% 50.86% +0.00%
github.com/smartcontractkit/chainlink-ccv/bootstrap 70.72% 70.72% +0.00%
github.com/smartcontractkit/chainlink-ccv/cli 59.12% 59.12% +0.00%
github.com/smartcontractkit/chainlink-ccv/cmd 36.93% 36.93% +0.00%
github.com/smartcontractkit/chainlink-ccv/common 46.51% 46.51% +0.00%
github.com/smartcontractkit/chainlink-ccv/executor 42.80% 42.80% +0.00%
github.com/smartcontractkit/chainlink-ccv/indexer 35.54% 35.56% +0.02%
github.com/smartcontractkit/chainlink-ccv/integration 55.99% 55.99% +0.00%
github.com/smartcontractkit/chainlink-ccv/internal 0.00% 0.00% +0.00%
github.com/smartcontractkit/chainlink-ccv/migration 77.66% 77.66% +0.00%
github.com/smartcontractkit/chainlink-ccv/pkg 100.00% 100.00% +0.00%
github.com/smartcontractkit/chainlink-ccv/pricer 0.00% 0.00% +0.00%
github.com/smartcontractkit/chainlink-ccv/protocol 63.06% 63.06% +0.00%
github.com/smartcontractkit/chainlink-ccv/tools 43.61% 43.61% +0.00%
github.com/smartcontractkit/chainlink-ccv/verifier 34.37% 34.37% +0.00%
Total 48.90% 48.90% +0.00%

Copilot AI left a comment

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.

Pull request overview

Refactors temporary on-ramp upgrade verifier jobs to isolate runtime identities while retaining canonical aggregator credentials.

Changes:

  • Adds isolated job and verifier ID suffixing.
  • Preserves canonical credential references across verifier topologies.
  • Adds legacy and consolidated topology tests.

Reviewed changes

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

File Description
deployment/changesets/apply_verifier_config.go Implements isolated identity and credential mapping.
deployment/changesets/apply_verifier_config_test.go Tests canonical verifier IDs.
deployment/changesets/apply_verifier_config_onramp_upgrade.go Enables isolation for upgrade jobs.
deployment/changesets/apply_verifier_config_onramp_upgrade_test.go Tests isolated upgrade jobs.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

func WithJobSuffix(suffix string) ApplyVerifierConfigApplyOption {
// WithIsolatedJob creates a distinct job identity and verifier runtime namespace while
// preserving the canonical aggregator credential lookup. This is intended for temporary
// parallel jobs, such as on-ramp upgrade jobs, this avoid sharing durable verifier state
Comment on lines +602 to +610
if overrides.isIsolatedJob() {
verifierCfg.Aggregators = []commit.AggregatorConnection{
{
Name: agg.Name,
SecretName: canonicalVerifierID,
Address: agg.Address,
InsecureConnection: agg.InsecureAggregatorConnection,
},
}
@carte7000 carte7000 changed the title Refactor onramp upgrade cs to include verifier_id chore: Refactor onramp upgrade cs to include verifier_id Aug 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

run-cl-smoke Force run CL smoke tests in PR CI.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants