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: Add OPCM upgrades FMA #173

Merged
merged 12 commits into from
Jan 17, 2025
Merged

feat: Add OPCM upgrades FMA #173

merged 12 commits into from
Jan 17, 2025

Conversation

maurelian
Copy link
Contributor

@maurelian maurelian commented Nov 29, 2024

FMA associated with OPCM Upgrades.

@mds1 mds1 requested a review from blmalone December 2, 2024 22:54
Copy link
Contributor

@blmalone blmalone left a comment

Choose a reason for hiding this comment

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

I'm working my way through this, got to FM1. Will continue soon.

security/fma-l1-upgrades.md Outdated Show resolved Hide resolved
security/fma-l1-upgrades.md Outdated Show resolved Hide resolved
security/fma-l1-upgrades.md Outdated Show resolved Hide resolved
security/fma-l1-upgrades.md Outdated Show resolved Hide resolved
Copy link
Contributor

@blmalone blmalone left a comment

Choose a reason for hiding this comment

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

few questions mostly for my understanding.

security/fma-l1-upgrades.md Show resolved Hide resolved
security/fma-l1-upgrades.md Outdated Show resolved Hide resolved
security/fma-l1-upgrades.md Outdated Show resolved Hide resolved
security/fma-l1-upgrades.md Outdated Show resolved Hide resolved
security/fma-l1-upgrades.md Show resolved Hide resolved
security/fma-l1-upgrades.md Show resolved Hide resolved
security/fma-l1-upgrades.md Show resolved Hide resolved
security/fma-l1-upgrades.md Outdated Show resolved Hide resolved
security/fma-l1-upgrades.md Show resolved Hide resolved
security/fma-l1-upgrades.md Show resolved Hide resolved
@blmalone blmalone self-requested a review December 4, 2024 21:40
Copy link
Contributor

@blmalone blmalone left a comment

Choose a reason for hiding this comment

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

Looks good to me, not hitting approve just yet as I know you're still working on this.

security/fma-l1-upgrades.md Outdated Show resolved Hide resolved
security/fma-l1-upgrades.md Show resolved Hide resolved
security/fma-l1-upgrades.md Outdated Show resolved Hide resolved
security/fma-l1-upgrades.md Outdated Show resolved Hide resolved
security/fma-l1-upgrades.md Outdated Show resolved Hide resolved
security/fma-l1-upgrades.md Outdated Show resolved Hide resolved
security/fma-l1-upgrades.md Outdated Show resolved Hide resolved
security/fma-l1-upgrades.md Show resolved Hide resolved
@maurelian maurelian changed the title feat: Add L1 upgrades fma feat: Add OPCM upgrades FMA Dec 10, 2024
Copy link
Contributor

@blmalone blmalone left a comment

Choose a reason for hiding this comment

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

Did my second pass of this pr. Not approving just yet as I've left some question that will help me better understand some sections.

Out of all the failure modes 'FM4: Failure to follow upgrade path' jumps out to me as the most likely to hit (mainly because humans are heavily involved). Making sure that the superchain-registry is properly updated is super important here. I think we may need to define a process around this to make sure it always contains the correct list of OPCM addresses.

security/fma-l1-upgrades.md Outdated Show resolved Hide resolved
#### Action items:

- [ ] Expose the upgraded state of the contracts being upgraded.
- [ ] Add a check to the OPCM to verify the upgraded state of the contracts being upgraded.
Copy link
Contributor

Choose a reason for hiding this comment

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

What does this look like in practice? Can you give me an example to help me understand?

I see the spec contains a comment in the OPCM upgrade function:

// run safety assertions to validate the upgrade

Is this comment related to this action item?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

the current upgrade doesn't give us much that we can make assertions on, at least not without going into the nitty-gritty details (ie. checking all the getters, etc).

We are not yet able to check init'd status on-chain.
We could check that semvers are set as expected?

At the least we should create an internal _postCheck() function in the OPCM which prompts developers to define whatever checks are appropriate while creating an upgrade.

security/fma-l1-upgrades.md Show resolved Hide resolved
security/fma-l1-upgrades.md Show resolved Hide resolved
security/fma-l1-upgrades.md Outdated Show resolved Hide resolved
security/fma-l1-upgrades.md Outdated Show resolved Hide resolved
| Author | Maurelian |
| Created at | 2024-03-26 |
| Initial Reviewers | @blmalone |
| Need Approval From | [TBD] |
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Suggested change
| Need Approval From | [TBD] |
| Need Approval From | @blmalone |

Copy link
Contributor

@blmalone blmalone left a comment

Choose a reason for hiding this comment

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

looks good!

@maurelian maurelian merged commit 201c702 into main Jan 17, 2025
@maurelian maurelian deleted the maur/fma-l1-upgrades branch January 17, 2025 21:33
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.

2 participants