-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
[DPA-1367]: feat(deployment/mcms): update test helpers #16248
Conversation
AER Report: CI Core ran successfully ✅AER Report: Operator UI CI ran successfully ✅ |
9957c47
to
13d91cd
Compare
The base branch was changed.
|
||
timelockAddress := mcmsState.Timelock.Address().Hex() | ||
|
||
proposerAddressPerChain[uint64(chainID)] = mcmsState.ProposerMcm.Address().Hex() |
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.
this is confusing; why not use chainSelector
instead of uint64(chainID)
?
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.
Good catch, i was copy pasting from the original implementation. Fixed it!
|
||
allBatches := []mcmstypes.BatchOperation{} | ||
for chainSelector := range cfg.Transfers { | ||
chainID := mcmstypes.ChainSelector(chainSelector) |
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.
[nit] I'm not sure we need this variable. And the name is misleading, as we typically use "chain id" to refer to EVM's chain ids...
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.
Thanks, i cleaned it up by inlining it since it was used in 1 place only
13d91cd
to
1591e75
Compare
Add equivalent test helpers which use the new MCMS library Also updated the changeset link transfer to use the new helpers as a way to test the new changes. JIRA: https://smartcontract-it.atlassian.net/browse/DPA-1367 Co-authored-by: ajaskolski <[email protected]>
1591e75
to
6b75737
Compare
} | ||
|
||
proposalutils.ExecuteMCMSProposalV2(t, e, p, sel) | ||
proposalutils.ExecuteMCMSTimelockProposalV2(t, e, &prop, sel) |
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.
are you sure we should execute the timelock proposal here? I think we have to wait until the operation is ready, no? My understanding is this would be done through the CI.
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.
this is the test helper, so we use this helper in tests to execute the changeset immediately so we can verify the behaviour
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.
so the line proposalutils.ExecuteMCMSProposalV2
makes the timelock proposal ready for execution, then ExecuteMCMSTimelockProposalV2
executes it.
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.
I thought the line proposalutils.ExecuteMCMSProposalV2
would only schedule the batch.
Anyways, if you say that's correct I trust you.
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.
I think you are still correct, i had the same question before and this is what pablo said
The execute actually calls the timelock contracts scheduleBatch and we still need to call the timelocks execute function so the transfer actually goes on.
so through testing, what it shows is that proposalutils.ExecuteMCMSProposalV2
calls would schedule the batch , marking it as ready and then calling proposalutils.ExecuteMCMSProposalV2
would execute the changeset.
Hope this make sense!
|
Add equivalent test helpers which use the new MCMS library Also updated the changeset link transfer to use the new helpers as a way to test the new changes. JIRA: https://smartcontract-it.atlassian.net/browse/DPA-1367 Co-authored-by: ajaskolski <[email protected]>
Add equivalent test helpers which use the new MCMS library
Also updated the changeset link transfer to use the new helpers as a way to test the new changes.
JIRA: https://smartcontract-it.atlassian.net/browse/DPA-1367