add topology free deploy#1127
Conversation
de57b6e to
00d8cd4
Compare
There was a problem hiding this comment.
Pull request overview
This PR refactors deployment changesets to support “topology-free” operation by removing the need to pass an *adapters.Registry into changesets and instead relying on per-adapter-type singleton registries. It also introduces new onchain changesets for deploying core chain contracts and wiring/promoting lanes, and updates devenv wiring and dependencies accordingly.
Changes:
- Refactor many changesets to drop
registry *adapters.Registryparameters and use per-adapter singleton registries (Get*Registry()). - Add new onchain changesets:
DeployChainContracts,LaneExpansion, andPromoteLaneRouter, plus validation tests. - Update devenv callers and bump
chainlink-ccip/*dependency versions to match the new changeset/adapters APIs.
Reviewed changes
Copilot reviewed 30 out of 31 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| deployment/changesets/remove_nop_from_committee.go | Updates committee NOP removal changesets to use singleton adapter registries and discovery helpers. |
| deployment/changesets/remove_nop_from_committee_test.go | Updates tests to register adapters via new per-adapter registries. |
| deployment/changesets/promote_lane_router.go | Adds a new onchain-only changeset to promote a lane from TestRouter to production Router. |
| deployment/changesets/lane_expansion.go | Adds a new onchain-only lane wiring changeset plus shared validation/apply helpers. |
| deployment/changesets/lane_expansion_test.go | Adds validation/unit tests for lane expansion and router promotion input handling. |
| deployment/changesets/increase_threshold.go | Refactors threshold-increase changesets to use singleton registries and updated scan helpers. |
| deployment/changesets/generate_token_verifier_config.go | Refactors token-verifier config generation to use token verifier registry singleton. |
| deployment/changesets/generate_indexer_config.go | Refactors indexer config generation to use indexer registry singleton and updated emptiness checks. |
| deployment/changesets/generate_aggregator_config.go | Refactors aggregator config generation to use aggregator/onchain registries directly. |
| deployment/changesets/deploy_committee_verifier.go | Refactors committee verifier deployment to use the deploy-adapter registry singleton. |
| deployment/changesets/deploy_committee_verifier_test.go | Updates deployment tests to register deploy adapters using the new registry singleton. |
| deployment/changesets/deploy_chain_contracts.go | Adds a new onchain changeset to deploy core CCIP protocol contracts per chain via adapters. |
| deployment/changesets/deploy_chain_contracts_test.go | Adds validation tests for the new chain-contract deployment changeset. |
| deployment/changesets/decrease_threshold.go | Refactors threshold-decrease changesets to use singleton registries and updated scan helpers. |
| deployment/changesets/apply_verifier_config.go | Refactors verifier job-spec publishing to use singleton registries; updates helper signatures. |
| deployment/changesets/apply_verifier_config_test.go | Updates tests to register onchain adapters using the new singleton registries. |
| deployment/changesets/apply_executor_config.go | Refactors executor job-spec publishing to use singleton registries and updated discovery helpers. |
| deployment/changesets/apply_executor_config_test.go | Updates tests for new changeset constructor signature (no registry param). |
| deployment/changesets/add_nop_to_committee.go | Refactors committee NOP add changesets to use singleton registries and updated helpers. |
| deployment/changesets/add_nop_to_committee_test.go | Updates tests to register adapters in per-adapter registries (onchain/aggregator/verifier). |
| deployment/adapters/registry.go | Replaces the old bundled Registry with typed FamilyRegistry[T] singletons per adapter interface and new discovery helpers. |
| deployment/adapters/lane_config.go | Introduces the LaneConfigAdapter interface and lane configuration input/output types. |
| deployment/adapters/chain_contracts_deploy.go | Introduces the ChainContractsDeployAdapter interface and deploy input/output types. |
| build/devenv/go.sum | Updates dependency checksums for new chainlink-ccip/* versions. |
| build/devenv/go.mod | Bumps chainlink-ccip/* and chainlink-ccv/deployment dependency versions. |
| build/devenv/evm/impl.go | Adjusts types used for lane profiles/config overrides to match updated CCIP v2 adapters/changesets APIs. |
| build/devenv/environment.go | Updates devenv to call changesets without passing an adapters registry. |
| build/devenv/environment_phased.go | Updates phased devenv to call changesets without passing an adapters registry. |
| build/devenv/environment_monolith.go | Updates monolith devenv to call changesets without passing an adapters registry. |
| build/devenv/components/protocol_contracts/component.go | Updates protocol contracts component to call changesets without passing an adapters registry. |
| build/devenv/cciptestinterfaces/interface.go | Updates lane profile interface to reference updated CCIP v2 adapters types. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Code coverage report:
|
| // -------------------------------------------------------------------- | ||
| // Per-adapter-type singletons | ||
| // -------------------------------------------------------------------- |
There was a problem hiding this comment.
nit: why not use the init function instead of dealing with sync.Once?
| // Onchain-first ordering is safe because adding a new signer does not raise the quorum | ||
| // requirement — the existing signers already satisfy the current threshold. | ||
| func AddNOPToCommittee(registry *adapters.Registry) deployment.ChangeSetV2[AddNOPToCommitteeInput] { | ||
| func AddNOPToCommittee() deployment.ChangeSetV2[AddNOPToCommitteeInput] { |
There was a problem hiding this comment.
Are you concerned that using globals would make it more difficult to unit test these functions?
Description
Testing
Checklist
changelogdirectory)just lint fix- no new lint errorsjust generate- mocks and protobufs are up to date