-
Notifications
You must be signed in to change notification settings - Fork 412
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
Add owner to Replica #32
Conversation
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.
Would you mind outlining in the PR description how to get the tests running until it works out of the box in CI? Also might be nice to link to the specific line/PR in which we do the CRITICAL owner setting
typescript/optics-tests/test/cross-chain/governanceRouter.test.ts
Outdated
Show resolved
Hide resolved
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.
v minor nit
This PR adds an
owner
storage variable to Replica that is used to permission Replica updater rotations. It removes the concept of "benign" double updates in favor of updater rotation.Note that when the
owner
is the null address, anyone can act as the owner. This allows the owner to be set post-facto (rather than in the initializer) so that existing Replicas can be upgraded.It is thus CRITICAL that when upgrading to this new implementation, their owners are set in the same transaction.
Note that the upgradability gap was not reduced in Replica, as it is in actuality one size smaller than it should have been. Effectively increasing the size of the upgradability gap is safe because no contracts are inheriting from Replica.
This PR also fully moves away from @optics-xyz/ts-interface and @optics-xyz/deploy in favor of optics-ts-interface and optics-deploy, respectively.