Conversation
SuperchainConfig held the pause state and the Guardian/Incident Responder roles for a single chain, while every pausable contract reached it by hopping through SystemConfig. Collapsing the two removes a proxy, a shared ProxyAdmin, and an indirection from every `paused()` read. SystemConfig now owns: - `GUARDIAN` / `INCIDENT_RESPONDER` immutables, set via the constructor. - `pauseTimestamps` and the `pause`/`unpause`/`extend` API. - `paused(address)`, `pausable`, `expiration`, and `pauseExpiry` views. The former `superchainConfig` storage slot becomes `spacer_108_0_20` so existing deployments keep their layout, and `pauseTimestamps` is appended. Callers lose their `superchainConfig()` passthroughs (`config()` on DelayedWETH) and read pause state straight off SystemConfig, so their ABIs change and they take major version bumps. `initialize` also drops its `_superchainConfig` argument. Deploy tooling drops the whole superchain stage: no SuperchainConfig implementation, proxy, or dedicated ProxyAdmin, and no separate upgrade step for the shared proxy. The `superchainConfigGuardian` and `superchainConfigIncidentResponder` deploy-config keys are renamed to `guardian` and `incidentResponder` and now feed the SystemConfig constructor. Pause coverage from SuperchainConfig.t.sol moves into SystemConfig.t.sol. Co-authored-by: Cursor <cursoragent@cursor.com>
🟡 Heimdall Review Status
|
Co-authored-by: Codex <codex-noreply@coinbase.com>
Co-authored-by: Codex <codex-noreply@coinbase.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Codex <codex-noreply@coinbase.com>
…merge-superchainconfig-into-systemconfig Co-authored-by: Cursor <cursoragent@cursor.com> # Conflicts: # snapshots/semver-lock.json # src/L1/SystemConfig.sol # test/deploy/SystemDeploy.t.sol
| /// @notice Rejects a migration from SuperchainConfig until its global and chain-specific pause records are cleared. | ||
| /// @dev A pause submitted after this check and before the upgrade can be lost; coordinate migrations with | ||
| /// guardians. | ||
| function _assertLegacySuperchainConfigNotPaused(ISystemConfig _systemConfigProxy) internal view { |
There was a problem hiding this comment.
Please update the PR description and this migration warning to say that upgrades must be coordinated with both the Guardian and Incident Responder, since either role can pause during this window.
| DeployUtils.assertValidContractAddress(_impls.superchainConfigImpl); | ||
| DeployUtils.assertValidContractAddress(_impls.l1ERC721BridgeImpl); | ||
| DeployUtils.assertValidContractAddress(_impls.optimismPortalImpl); | ||
| DeployUtils.assertValidContractAddress(_impls.systemConfigImpl); |
There was a problem hiding this comment.
Please validate the SystemConfig implementation’s immutable Guardian and Incident Responder against the expected roles before deploying or upgrading, otherwise a stale or supplied implementation can install incorrect pause authorities.
|
|
||
| /// @notice Returns the SuperchainConfig contract. | ||
| /// @return ISuperchainConfig The SuperchainConfig contract. | ||
| function superchainConfig() external view returns (ISuperchainConfig) { |
There was a problem hiding this comment.
Removing superchainConfig() is a breaking ABI change, so OptimismPortal2 should receive a major version bump like the other affected contracts.
| assertEq(address(l1ERC721Bridge.otherBridge()), Predeploys.L2_ERC721_BRIDGE); | ||
| assertEq(address(l1ERC721Bridge.systemConfig()), address(systemConfig)); | ||
| assertEq(address(l1ERC721Bridge.superchainConfig()), address(systemConfig.superchainConfig())); | ||
| assertEq(address(l1ERC721Bridge.systemConfig()), address(systemConfig)); |
There was a problem hiding this comment.
Please remove this duplicate SystemConfig assertion; the same redundant replacement also appears in L1StandardBridge.t.sol and DelayedWETH.t.sol.
main bumped OptimismPortal2 5.2.0 -> 6.0.0 in #438 for the ETHLockbox removal, and this branch independently bumped 5.2.0 -> 6.0.0 for dropping `superchainConfig()`. After merging main both ABIs declare 6.0.0 while differing by that getter, which is the same divergence #438 and #440 set out to remove. Major rather than minor: the removal is a breaking ABI change, matching the reason Co-authored-by: Cursor <cursoragent@cursor.com> #438 took the portal major in the first place.
Porting the `superchainConfig()` assertions onto `systemConfig()` left three getter tests asserting the same address twice in a row. Co-authored-by: Cursor <cursoragent@cursor.com>
The Guardian and Incident Responder are now constructor immutables on the SystemConfig implementation, so when `deploy` is handed a prebuilt implementation set it never reads `implementationsInput.guardian` or `.incidentResponder` at all. A stale implementation therefore installs its own pause authorities and the deploy input silently has no effect. Require a supplied implementation to carry the configured roles, and apply the same non-zero Guardian check that freshly deployed implementations already get, so a chain cannot deploy with nobody able to unpause it. Co-authored-by: Cursor <cursoragent@cursor.com>
Legacy `SuperchainConfig.pause` is gated on `_assertOnlyGuardianOrIncidentResponder`, so the Incident Responder can also open a pause in the window between the check and the upgrade. Co-authored-by: Cursor <cursoragent@cursor.com>
A `just snapshots-check-no-build` run after the test-profile build rewrote the ProtocolVersions and TEEProverRegistry initCodeHashes from those artifacts, and they were committed alongside the OptimismPortal2 bump. Regenerated with `just semver-lock`, which force-builds the source graph first. Co-authored-by: Cursor <cursoragent@cursor.com>
What changed? Why?
Merged the chain-local
SuperchainConfigintoSystemConfig, soSystemConfignow owns the Guardian and Incident Responder roles and the system-wide pause state. This removes the separateSuperchainConfigimplementation, proxy, sharedProxyAdmin, and deployment/upgrade stage, while removing an indirection from pause checks.The deployment config keys are renamed from
superchainConfigGuardianandsuperchainConfigIncidentRespondertoguardianandincidentResponder; the values now constructSystemConfigdirectly.Notes to reviewers
SystemConfig.initializeno longer accepts_superchainConfig; its constructor now accepts the Guardian and Incident Responder.superchainConfig()and the related passthrough getters on pausable contracts are removed, so consumers read pause state and roles fromSystemConfig.superchainConfigstorage slot remains as a spacer to preserve layout, andpauseTimestampis appended at slot 110.SystemConfigand the affected pausable contracts receive major-version changes.OptimismPortal2goes to7.0.0rather than6.0.0. #438 took the portal to6.0.0onmainfor the ETHLockbox removal while this branch had independently taken it to6.0.0for droppingsuperchainConfig(), so after mergingmainthe two differing ABIs would otherwise both declare6.0.0.SystemDeploy.deploynow rejects a suppliedsystemConfigImplwhose roles do not match the deploy input. Previously those inputs were read only when the script built the implementations itself, so a prebuilt implementation silently installed its own pause authorities.SystemDeployverifies that the legacy global and OptimismPortal pause records are clear, including expired pause records. A pause can still be submitted after that check and before the upgrade, and either the Guardian or the Incident Responder can submit it, so upgrades must be coordinated with both.How has it been tested?
SuperchainConfig.t.soltoSystemConfig.t.sol.SystemConfigimplementations that carry the wrong Guardian, the wrong Incident Responder, or no Guardian at all.just lint-check,just snapshots, and the semver-lock diff check pass.