ethereum-optimism / superchain-ops

29 stars 23 forks source link

tasks(sep/base): add Base Sepolia MCP L1 playbook #229

Closed sbvegan closed 3 weeks ago

sbvegan commented 1 month ago

This PR adds the Base Sepolia MCP L1 upgrade task.

Review instructions:

  1. Follow this folder's instructions to execute playbook and make sure it does not revert
  2. Verify:
    1. That the Validations file is exactly what you see on Tenderly
    2. That the Validations file is consistent with what we'd expect via our notion analysis
    3. That the hardcoded values in ./tasks/sep/base-001-MCP-L1/SignFromJson.s.sol are all accurate and sensible
  3. Diff the new tasks/sep/metal-001-MCP-L1/SignFromJson.s.sol against the existing tasks/sep/base-001-MCP-L1/SignFromJson.s.sol to better see the changes, since most of the file is a copy/paste of that.
sbvegan commented 4 weeks ago

Description

We’re putting together Base Sepolia’s MCP upgrade transaction and during the validation of the Safe bundle there were unexpected storage layout changes. This is a point where we want to pause and take a close look at the changes to make sure we're confident in the expected results of the upgrade. The following points can be used to ensure the storage layout changes are a non-issue:

L1 Contract Comparison

The following l1 contracts are changing in this upgrade. They’ve been pulled from the `VALIDATION.md file, which is what the Tenderly simulation UI shows from the safe bundle simulated state changes.

Relevant Commits

Deployment commit compared with MCP

L1StandardBridge upgrade commit compared with MCP

Note: The GitHub commit diff tool doesn’t allow you to compare on the file level, so I just searched the contract name in the Files changed tab.


0x21eFD066e581FA55Ef105170Cc04d74386a09190 (L1ERC721BridgeProxy)

Links:

Diff: https://github.com/ethereum-optimism/optimism/compare/a7ff5a811612fa338d0a6d6dd72dc2ec9badef6d...e6ef3a900c42c8722e72c2e2314027f85d12ced5


0x49f53e41452c74589e85ca1677426ba426459e85 (OptimismPortalProxy)

Links:

Diff: https://github.com/ethereum-optimism/optimism/compare/a7ff5a811612fa338d0a6d6dd72dc2ec9badef6d...e6ef3a900c42c8722e72c2e2314027f85d12ced5


0x709c2B8ef4A9feFc629A8a2C1AF424Dc5BD6ad1B (AddressManager)

Links:

Diff:


0x84457ca9d0163fbc4bbfe4dfbb20ba46e48df254 (L2OutputOracleProxy)

Links:

Diff:


0xb1efB9650aD6d0CC1ed3Ac4a0B7f1D5732696D37 (OptimismMintableERC20FactoryProxy)

Links:

Diff:


0x5D335Aa7d93102110879e3B54985c5F08146091E (L1CrossDomainMessengerProxy)

Links:

Diff:


0xf272670eb55e895584501d564AfEB048bEd26194 (SystemConfigProxy)

Links:

Diff:


0xfd0Bf71F60660E2f608ed56e1659C450eB113120 (L1StandardBridgeProxy)

Links:

Commits:

Diff:

sbvegan commented 3 weeks ago

After review, all of these state changes look safe and expected. There is one specific call out from taking a close look at the implementation contracts. In regard to the SystemConfig, similar to OptimismPortal, the removed variable does not have a storage setter call meaning we’ll have a dangling storage value. Unlike OptimismPortal, no future upgrade would clear this. Having this dangling storage poses no risk currently, but is just a bit dirty and is possible (but unlikely) to be an issue in the future if we forget about it.

Safe now, but may be unsafe in the future, for Sepolia only. We could manually add an additional storage setter to the input.json transaction bundle to clear this. However this can always be cleared in a separate, future, dedicated “upgrade” that Base does, which is probably the best approach.