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

Reseed Deployment Redesign #1115

Merged
merged 7 commits into from
Sep 26, 2024
Merged

Conversation

nickkatsios
Copy link
Contributor

@nickkatsios nickkatsios commented Sep 24, 2024

This PR refactors the reseedL2 script to use an already deployed diamond and facets, reducing the steps in the migration and eliminating a number of points of failure. This modifies the flow of the reseed as follows:

  1. The beanstalk deployer deploys at a time prior to the migration the beanstalk diamond contract at a vanity address along with all the facets on the L2. The facets are deployed as standalone contracts at first and are not linked to the diamond.
  2. The beanstalk deployer upgrades the diamond with a diamond cut adding the OwnershipFacet and proposing the L2 BCM as the new owner. At this point the diamond only has the OwnershipFacet linked to it.
  3. At the time of the reseed, the deployer runs the reseed script on the L2 and sets all the state of the diamond via consecutive diamond cuts.
  4. At the last step, before adding the facets, the L2 BCM accepts the ownership of the beanstalk diamond and performs the last diamond cut to link the already deployed facets to the diamond, before completing the migration.

Also

  • Removes unused ReseedSun contract.
  • Adds support for contract verification on arbitrum.

  • NOTE: Do not merge this until the facets and diamond are already deployed on the L2.

@nickkatsios nickkatsios changed the title Diamond Deployment Redesign Resseed Deployment Redesign Sep 24, 2024
@nickkatsios nickkatsios changed the title Resseed Deployment Redesign Reseed Deployment Redesign Sep 24, 2024
@nickkatsios nickkatsios merged commit 7019a63 into beanstalk-3 Sep 26, 2024
2 checks passed
@nickkatsios nickkatsios deleted the diamond-deployment-redisign branch September 26, 2024 07:00
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