-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ccip-4110 migration test #15854
base: develop
Are you sure you want to change the base?
Ccip-4110 migration test #15854
Changes from all commits
ded3f4c
10314c8
5f14bf0
75c676f
b31ec5a
5f6d2d5
65616ff
6dd9c4a
813cc6e
a299e7c
1837b21
bda53fc
e171316
f8574e7
950caa3
0b75a79
1216211
e45b045
dfe7a2a
f0ecc26
d5d1df3
843e228
ec2391a
810fda5
7558959
7d74ac6
06cbc31
d9f7594
f48873e
f8c83b3
c8f0217
fcecd8f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -792,8 +792,14 @@ func (cfg UpdateRouterRampsConfig) Validate(e deployment.Environment) error { | |
if chainState.OffRamp == nil { | ||
return fmt.Errorf("missing onramp onramp for chain %d", chainSel) | ||
} | ||
if err := commoncs.ValidateOwnership(e.GetContext(), cfg.MCMS != nil, e.Chains[chainSel].DeployerKey.From, chainState.Timelock.Address(), chainState.Router); err != nil { | ||
return err | ||
if cfg.TestRouter { | ||
if err := commoncs.ValidateOwnership(e.GetContext(), cfg.MCMS != nil, e.Chains[chainSel].DeployerKey.From, chainState.Timelock.Address(), chainState.TestRouter); err != nil { | ||
return err | ||
} | ||
} else { | ||
if err := commoncs.ValidateOwnership(e.GetContext(), cfg.MCMS != nil, e.Chains[chainSel].DeployerKey.From, chainState.Timelock.Address(), chainState.Router); err != nil { | ||
return err | ||
} | ||
} | ||
Comment on lines
+795
to
803
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. q: if TestRouter is enabled why not validate ownership of it + the real router? Instead of either/or There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The real router can be owned by MCMS and test router can be owned by deployer key. |
||
|
||
for source := range update.OffRampUpdates { | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -65,7 +65,7 @@ func TestUpdateRMNConfig(t *testing.T) { | |
} | ||
|
||
func updateRMNConfig(t *testing.T, tc updateRMNConfigTestCase) { | ||
e := NewMemoryEnvironment(t) | ||
e, _ := NewMemoryEnvironment(t) | ||
|
||
state, err := LoadOnchainState(e.Env) | ||
require.NoError(t, err) | ||
|
@@ -220,7 +220,7 @@ func buildRMNRemoteAddressPerChain(e deployment.Environment, state CCIPOnChainSt | |
|
||
func TestSetRMNRemoteOnRMNProxy(t *testing.T) { | ||
t.Parallel() | ||
e := NewMemoryEnvironment(t, WithNoJobsAndContracts()) | ||
e, _ := NewMemoryEnvironment(t, WithNoJobsAndContracts()) | ||
allChains := e.Env.AllChainSelectors() | ||
mcmsCfg := make(map[uint64]commontypes.MCMSWithTimelockConfig) | ||
var err error | ||
|
@@ -265,6 +265,8 @@ func TestSetRMNRemoteOnRMNProxy(t *testing.T) { | |
CallProxy: state.Chains[chain].CallProxy, | ||
} | ||
} | ||
envNodes, err := deployment.NodeInfo(e.Env.NodeIDs, e.Env.Offchain) | ||
require.NoError(t, err) | ||
e.Env, err = commonchangeset.ApplyChangesets(t, e.Env, timelockContractsPerChain, []commonchangeset.ChangesetApplication{ | ||
// transfer ownership of RMNProxy to timelock | ||
{ | ||
|
@@ -274,6 +276,19 @@ func TestSetRMNRemoteOnRMNProxy(t *testing.T) { | |
MinDelay: 0, | ||
}, | ||
}, | ||
|
||
{ | ||
Changeset: commonchangeset.WrapChangeSet(DeployHomeChain), | ||
Config: DeployHomeChainConfig{ | ||
HomeChainSel: e.HomeChainSel, | ||
RMNDynamicConfig: NewTestRMNDynamicConfig(), | ||
RMNStaticConfig: NewTestRMNStaticConfig(), | ||
NodeOperators: NewTestNodeOperator(e.Env.Chains[e.HomeChainSel].DeployerKey.From), | ||
NodeP2PIDsPerNodeOpAdmin: map[string][][32]byte{ | ||
"NodeOperator": envNodes.NonBootstraps().PeerIDs(), | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is "NodeOperator" the name of the nop or something? Would be nice as a constant or determined via some other way? |
||
}, | ||
}, | ||
}, | ||
{ | ||
Changeset: commonchangeset.WrapChangeSet(DeployChainContracts), | ||
Config: DeployChainContractsConfig{ | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Haha we removed this and now its back, I actually copy/pasted the above code for my PR but I guess having this helper is fine.