Skip to content

feat: Simplify op-deployer scripts: Switch from legacy to the new scripts for DeploySuperchain & DeployImplementations [17/N] #15551

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

Merged
merged 14 commits into from
May 22, 2025

Conversation

janjakubnanista
Copy link
Contributor

@janjakubnanista janjakubnanista commented Apr 24, 2025

Description

This PR serves as a step-by-step guide for the op-deployer script migration. To follow the steps, please follow the commits and their messages. Some of the steps might not apply in your particular case.

Questions

Q: There are regression tests that point to incompatible artifacts for existing networks.

@mslipper any opinions on this? Should we keep the tests (which also means we can't delete the old implementations of the scripts)? In general we are introducing a breaking change so at some point we'll drop the support for the old artifacts, the question is when.

A: The tests will be marked as skipped and will be unskipped once the new contract artifacts have been published

Notes

There was one particular concerning find in this PR, you can see it in this CI run. The legacy code in deploy.go was not being passed the SuperchainProxyAdmin that was supposed to be required by the contracts (this should have failed) - see implementations.go for an example of correct usage.

After upgrading to the new script, we got a correct EVM revert and a fix was introduced. The concerning thing is that this has not been caught in the CI, and no extra require statements have been added to trigger this.

Copy link

codecov bot commented Apr 24, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.24%. Comparing base (90064ef) to head (3ca78f9).
Report is 3 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff              @@
##           develop   #15551       +/-   ##
============================================
+ Coverage    47.06%   96.24%   +49.17%     
============================================
  Files         1360      106     -1254     
  Lines       109447     4575   -104872     
============================================
- Hits         51512     4403    -47109     
+ Misses       54279      172    -54107     
+ Partials      3656        0     -3656     
Flag Coverage Δ
cannon-go-tests-64 ?
contracts-bedrock-tests 96.24% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

see 1250 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@janjakubnanista janjakubnanista force-pushed the jan/op-deployer--017 branch 2 times, most recently from 252a54f to e5604f9 Compare April 24, 2025 19:10
@janjakubnanista janjakubnanista self-assigned this Apr 25, 2025
@janjakubnanista janjakubnanista marked this pull request as ready for review April 25, 2025 17:48
@janjakubnanista janjakubnanista requested review from a team as code owners April 25, 2025 17:48
@janjakubnanista janjakubnanista requested a review from bitwiseguy May 6, 2025 15:54
@janjakubnanista janjakubnanista force-pushed the jan/op-deployer--017 branch from 15d6f8d to 535a007 Compare May 9, 2025 16:55
Copy link
Collaborator

@mslipper mslipper left a comment

Choose a reason for hiding this comment

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

Reviewed by manually comparing the new Deploy* scripts with their 2 counterparts on develop.

Copy link
Collaborator

@mslipper mslipper left a comment

Choose a reason for hiding this comment

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

Will re-approve once compilation errors are fixed.

@mslipper mslipper added this pull request to the merge queue May 22, 2025
Merged via the queue into develop with commit c22f8d2 May 22, 2025
59 checks passed
@mslipper mslipper deleted the jan/op-deployer--017 branch May 22, 2025 22:54
maurelian added a commit that referenced this pull request Jun 17, 2025
… new scripts for DeploySuperchain & DeployImplementations [17/N] (#15551)"

This reverts commit c22f8d2.
mslipper added a commit that referenced this pull request Jun 17, 2025
… new scripts for DeploySuperchain & DeployImplementations [17/N] (#15551)"

This reverts commit c22f8d2.
mds1 pushed a commit that referenced this pull request Jun 18, 2025
… new scripts for DeploySuperchain & DeployImplementations [17/N] (#15551)" (#16489)

This reverts commit c22f8d2.
iquidus pushed a commit to Layr-Labs/optimism that referenced this pull request Jul 24, 2025
…ipts for DeploySuperchain & DeployImplementations [17/N] (ethereum-optimism#15551)

* step 1: Delete old scripts & tests; Remove the "2" from the file names & contract names of the new scripts

* step 2: Update the downstream scripts

* step 3: Delete the old opcm script wrappers; Remove the "2" from the filenames & types of the new wrappers

* step 4.1: Create OPCM scripts struct in pipeline and ad it to Env struct. This step might not be necessary anymore

* step 4.2: Adjust the pipeline scripts to use the new scripts

* step 4.3: Adjust op-chain-ops

* step 4.4: Adjust bootstrap scripts. In this case there is only one deployment per CLI target so the Scripts struct needs to be created for every CLI target

* step 5: Skip the regression tests so that we can publish the new contract artifacts, after which the tests need to be updated and regression tests unskipped

* rebase: Remove unused imports

* fix: Misrebase

* fix: Misrebase

* fix: Misrebase

* fix test

---------

Co-authored-by: Matthew Slipper <me@matthewslipper.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants