Reapply "Implement disable lane (#1741)" (#1752)#1764
Conversation
There was a problem hiding this comment.
Pull request overview
This PR re-applies the “disable lane” capability by introducing a DisableLane changeset and chain-specific implementations (EVM + Solana) that disable a remote chain’s send/receive configuration, plus an integration test to validate the disabled state.
Changes:
- Add a new
DisableLanechangeset that disables both directions of a lane via per-chain adapter sequences. - Extend the
LaneAdapterinterface withDisableRemoteChain()and implement it for EVM and Solana (v1.6.0). - Add an integration test that connects an EVM↔SVM lane and asserts the lane is disabled correctly on both sides.
Reviewed changes
Copilot reviewed 7 out of 8 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| integration-tests/deployment/connect_chains_test.go | Adds checkLaneDisabled helper and a TestDisableLane_EVM2SVM integration test. |
| deployment/lanes/product.go | Extends LaneAdapter interface with DisableRemoteChain(). |
| deployment/lanes/disable_lane.go | Adds new DisableLane changeset + input/config types. |
| chains/solana/deployment/v1_6_0/sequences/disable_remote_chain.go | Adds Solana disable-remote-chain sequence wiring to new operations. |
| chains/solana/deployment/v1_6_0/operations/offramp/offramp.go | Adds DisableSourceChain operation for Solana OffRamp. |
| chains/solana/deployment/v1_6_0/operations/fee_quoter/fee_quoter.go | Adds DisableDestChain operation for Solana FeeQuoter. |
| chains/evm/deployment/v1_6_0/sequences/disable_remote_chain.go | Adds EVM disable-remote-chain sequence via router ramp updates. |
| .gitignore | Ignores .claude. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| // EVM Router: OffRamp must be removed for the remote chain | ||
| offRampDestAddr, err := evmAdapter.GetOffRampAddress(e.DataStore, evmChain.Selector) | ||
| require.NoError(t, err, "must get offRamp from evmAdapter") | ||
| isOffRamp, err := routerOnDest.IsOffRamp(nil, solanaChain.Selector, common.Address(offRampDestAddr)) |
There was a problem hiding this comment.
offRampDestAddr is a []byte from GetOffRampAddress, so common.Address(offRampDestAddr) is an invalid conversion and will not compile. Convert using common.BytesToAddress(offRampDestAddr) (or equivalent) before passing it to IsOffRamp.
| isOffRamp, err := routerOnDest.IsOffRamp(nil, solanaChain.Selector, common.Address(offRampDestAddr)) | |
| isOffRamp, err := routerOnDest.IsOffRamp(nil, solanaChain.Selector, common.BytesToAddress(offRampDestAddr)) |
| chainAAdapter, exists := laneRegistry.GetLaneAdapter(chainAFamily, lane.Version) | ||
| if !exists { | ||
| return cldf.ChangesetOutput{}, fmt.Errorf("no LaneAdapter registered for chain family '%s' version %s", chainAFamily, lane.Version) | ||
| } |
There was a problem hiding this comment.
lane.Version is a pointer and can be nil in DisableLaneConfig. As written, a nil Version will cause a panic during adapter lookup (and in the %s formatting in the error message). Add explicit input validation (e.g., return an error when lane.Version == nil) before calling GetLaneAdapter / formatting it.
|
This reverts commit f21cb2f.
merge once #1615 merges