Skip to content
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

feat(deployment): add view for new mcms state #16290

Merged
merged 1 commit into from
Feb 20, 2025

Conversation

gustavogama-cll
Copy link
Contributor

@gustavogama-cll gustavogama-cll commented Feb 8, 2025

This PR updates the MCMS state view by (1) migrating the existing types and functions to the new MCMS library and (2) adding a view for the MCMS Solana state.

Copy link
Contributor

github-actions bot commented Feb 8, 2025

AER Report: CI Core ran successfully ✅

aer_workflow , commit

AER Report: Operator UI CI ran successfully ✅

aer_workflow , commit

@gustavogama-cll gustavogama-cll force-pushed the ggama/feat-add-view-for-new-mcms-state branch 2 times, most recently from 93ac134 to 4b0609b Compare February 19, 2025 14:57
@gustavogama-cll gustavogama-cll marked this pull request as ready for review February 19, 2025 15:35
@gustavogama-cll gustavogama-cll requested review from a team as code owners February 19, 2025 15:35
Copy link
Contributor

@ecPablo ecPablo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@gustavogama-cll gustavogama-cll force-pushed the ggama/feat-add-view-for-new-mcms-state branch from 4b0609b to 977b46f Compare February 19, 2025 16:15
@gustavogama-cll
Copy link
Contributor Author

sorry @ecPablo , I had to push an update removing an old, commented out block of code in the tests.

@@ -19,7 +20,7 @@ func DeployMCMSWithTimelockProgramsSolana(
config commontypes.MCMSWithTimelockConfigV2,
) (*state.MCMSWithTimelockStateSolana, error) {
addresses, err := e.ExistingAddresses.AddressesForChain(chain.Selector)
if err != nil {
if err != nil && !errors.Is(err, deployment.ErrChainNotFound) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if the chain is not found, is it still worth continuing in this function? Wouldnt MaybeLoadMCMSWithTimelockChainStateSolana fail too?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no, I don't think so. Our integration tests pass at the moment.

What this is doing in practice is accepting an empty address book. I believe in other places we require the address book to have an entry with the chain selector (pointing to an empty list of addresses). But I honestly don't see why we require that and added this workaround (which, tbh, was copied from one of the ccip changesets).

If you think this may break something, please let me know and I'll drop it.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I dont know enough here too, but just tracing the code, if chain is not found, address will be nil and this will fail here when it tries to load the state?

Copy link
Contributor Author

@gustavogama-cll gustavogama-cll Feb 20, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think so. The only way we use the addresses variable in AddressesContainsBundle (and MaybeLoadMCMSWithTimelockChainStateSolana) is in a for loop.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But I'll create an empty addressbook to be on the safe side. Your point is valid.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i mean the end result is probably the same regardless if that error check is there or not. So we can continue with the change if it is consistent with the other code?

@gustavogama-cll gustavogama-cll added this pull request to the merge queue Feb 20, 2025
Merged via the queue into develop with commit 2f30383 Feb 20, 2025
162 checks passed
@gustavogama-cll gustavogama-cll deleted the ggama/feat-add-view-for-new-mcms-state branch February 20, 2025 03:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants