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 upgrade of superchain singletons #13814

Merged
merged 26 commits into from
Jan 25, 2025

Conversation

maurelian
Copy link
Contributor

@maurelian maurelian commented Jan 16, 2025

TL;DR

Added support for upgrading SuperchainConfig and ProtocolVersions contracts through the OPContractsManager.

What changed?

  • Added superchainConfigImpl and protocolVersionsImpl to the OPContractsManager's Implementations struct. This also requires adding those values to DeploySuperchain, DeployImplementations and DeployOPCM.
  • Modified the upgrade function in OPContractsManager to handle upgrading superchain contracts.

Copy link
Contributor Author

maurelian commented Jan 16, 2025

Copy link

codecov bot commented Jan 16, 2025

Codecov Report

Attention: Patch coverage is 20.00000% with 8 lines in your changes missing coverage. Please review.

Project coverage is 45.38%. Comparing base (80eff00) to head (258223c).
Report is 1 commits behind head on develop.

Files with missing lines Patch % Lines
...es/contracts-bedrock/src/L1/OPContractsManager.sol 22.22% 7 Missing ⚠️
...racts-bedrock/src/L1/OPContractsManagerInterop.sol 0.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop   #13814      +/-   ##
===========================================
- Coverage    46.67%   45.38%   -1.30%     
===========================================
  Files          973      916      -57     
  Lines        81444    76782    -4662     
  Branches       756      757       +1     
===========================================
- Hits         38015    34845    -3170     
+ Misses       40471    39152    -1319     
+ Partials      2958     2785     -173     
Flag Coverage Δ
cannon-go-tests-32 ?
cannon-go-tests-64 ?
contracts-bedrock-tests 90.46% <20.00%> (+0.27%) ⬆️

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

Files with missing lines Coverage Δ
op-deployer/pkg/deployer/opcm/implementations.go 0.00% <ø> (ø)
op-deployer/pkg/deployer/opcm/opcm.go 0.00% <ø> (ø)
...racts-bedrock/src/L1/OPContractsManagerInterop.sol 71.42% <0.00%> (ø)
...es/contracts-bedrock/src/L1/OPContractsManager.sol 70.42% <22.22%> (-1.08%) ⬇️

... and 73 files with indirect coverage changes

@maurelian maurelian force-pushed the opcm-up/upgrade-asr branch from ad84635 to b633209 Compare January 16, 2025 20:42
@maurelian maurelian force-pushed the opcm-up/superchain-singletons branch from a943dc7 to 6a8bc7b Compare January 16, 2025 20:42
@maurelian maurelian marked this pull request as ready for review January 16, 2025 20:45
@maurelian maurelian requested a review from a team as a code owner January 16, 2025 20:45
@maurelian maurelian requested review from Inphi and removed request for a team January 16, 2025 20:45
@maurelian maurelian force-pushed the opcm-up/upgrade-asr branch from b633209 to c16b824 Compare January 16, 2025 21:12
@maurelian maurelian requested review from a team as code owners January 16, 2025 21:12
@maurelian maurelian requested review from zhwrd and protolambda and removed request for a team January 16, 2025 21:12
@maurelian maurelian force-pushed the opcm-up/upgrade-asr branch from c16b824 to ba91c25 Compare January 16, 2025 21:27
@maurelian maurelian force-pushed the opcm-up/superchain-singletons branch from 6a8bc7b to 3a1e775 Compare January 16, 2025 21:27
@maurelian maurelian force-pushed the opcm-up/upgrade-asr branch 2 times, most recently from 96ed2e1 to 0e8e8dd Compare January 17, 2025 17:59
@maurelian maurelian force-pushed the opcm-up/superchain-singletons branch from 3a1e775 to 2425249 Compare January 17, 2025 17:59
@maurelian maurelian force-pushed the opcm-up/upgrade-asr branch from 0e8e8dd to cdf0556 Compare January 17, 2025 18:11
@maurelian maurelian force-pushed the opcm-up/superchain-singletons branch from 2425249 to 33a9849 Compare January 17, 2025 18:11
@maurelian maurelian force-pushed the opcm-up/upgrade-asr branch 2 times, most recently from 32b4bfe to ee640d2 Compare January 17, 2025 21:30
@maurelian maurelian force-pushed the opcm-up/superchain-singletons branch from 9a77caf to 08bb8a1 Compare January 25, 2025 04:06
@maurelian maurelian force-pushed the opcm-up/superchain-singletons branch from 21cfde9 to 7266b01 Compare January 25, 2025 16:08
@maurelian maurelian added this pull request to the merge queue Jan 25, 2025
Merged via the queue into develop with commit c4390fb Jan 25, 2025
43 of 44 checks passed
@maurelian maurelian deleted the opcm-up/superchain-singletons branch January 25, 2025 17:32
samlaf pushed a commit to Layr-Labs/optimism that referenced this pull request Jan 27, 2025
* feat: Add upgrade of superchain singletons

* feat: assert on sc upgrade

* feat: update snapshots

* feat: dedupe .anchorStateRegistry() calls

save 170 bytes

* Fix IOpcm Implementations struct

* fix: view visibility on getAnchorStateRegistry()

* fix: use internal visibility on library func for DeploySuperchainImplementations

* fix: use correct SuperchainConfigProxy name for address retrieval

* fix: use correct SuperchainConfigProxy name for address retrieval

* snapshots

* fix: remove superchain contracts from DII

* feat: use 1967Helper to get sc impls

* fix: sc and pv names

* fix: sc contracts on dio

* feat: undeduplicate deploySuperchainImplementations

* feat: fix DeployOPCM tests

* wip

* fix: IOPCM iface

* feat: Add only owner revert tests

* lint

* bump semver

* ci fixes

* fix: OPCMInterop semver

* feat: Add SCC and PV to go structs in opd

* fix: Add SC and PV impls to interopgen

* go lint
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