Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
89c1fb7
upgrade controller removed from OPCM
alcueca Sep 30, 2025
dbc2ee2
renamed upgradeController to l1PAO in DeployImplementations.Input
alcueca Sep 30, 2025
63c7a36
Update semver
alcueca Sep 30, 2025
e2b08c7
Remove upgradeController from the docs
alcueca Sep 30, 2025
3d0a30b
Fix VerifyOPCM
alcueca Sep 30, 2025
2bdfb9f
Did quite the find and replace here
alcueca Sep 30, 2025
97eac5b
The OPCM constructor only takes 24 slots now
alcueca Oct 1, 2025
f25e9b3
Some straggler renamings
alcueca Oct 1, 2025
f0d85c3
Fix: semver-lock
alcueca Oct 1, 2025
c1a69f8
Doh
alcueca Oct 1, 2025
380ea50
Snapshots?
alcueca Oct 1, 2025
9e42f2d
lint
alcueca Oct 1, 2025
f68ca7d
Fixed the last of the lint with the power of regex
alcueca Oct 2, 2025
5c905a1
fixed linting
alcueca Oct 2, 2025
81cbf6f
Merge branch 'develop' into alcueca/remove-upgrade-controller
alcueca Oct 2, 2025
4c8b340
L1PAO == SuperchainProxyAdminOwner
alcueca Oct 2, 2025
54d19ee
We shouldn't need to pass the upgrade controller to op-deployer to de…
alcueca Oct 2, 2025
9bb5196
L1PAO != SuperchainPAO
alcueca Oct 2, 2025
d95ce99
Let's accept both the backwards compatible UPGRADE_CONTROLLER and the…
alcueca Oct 2, 2025
248be96
Maybe I'll need to drop UPGRADE_CONTROLLER
alcueca Oct 2, 2025
20a88e5
addressed comments from @bitwiseguy
alcueca Oct 3, 2025
237795e
Needed the three dots, it seems
alcueca Oct 4, 2025
33fbbd0
Merge branch 'develop' into alcueca/remove-upgrade-controller
alcueca Oct 4, 2025
7ecb7df
Shortened form of L1PAO not used in code anymore
alcueca Oct 6, 2025
ad02682
update semver-lock and opcm bytecode
alcueca Oct 6, 2025
182a644
*sigh*
alcueca Oct 6, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion op-chain-ops/interopgen/deploy.go
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ func DeploySuperchainToL1(l1Host *script.Host, opcmScripts *opcm.Scripts, superC
SuperchainProxyAdmin: superDeployment.SuperchainProxyAdmin,
SuperchainConfigProxy: superDeployment.SuperchainConfigProxy,
ProtocolVersionsProxy: superDeployment.ProtocolVersionsProxy,
UpgradeController: superCfg.ProxyAdminOwner,
L1ProxyAdminOwner: superCfg.ProxyAdminOwner,
Challenger: superCfg.Challenger,
})
if err != nil {
Expand Down
4 changes: 2 additions & 2 deletions op-deployer/justfile
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ export NETWORK := env_var_or_default("NETWORK", "sepolia")
export PROTOCOL_VERSIONS_PROXY := if NETWORK == "mainnet" { "0x8062AbC286f5e7D9428a0Ccb9AbD71e50d93b935" } else if NETWORK == "sepolia" { "0x79ADD5713B383DAa0a138d3C4780C7A1804a8090" } else { "" }
export SUPERCHAIN_CONFIG_PROXY := if NETWORK == "mainnet" { "0x95703e0982140D16f8ebA6d158FccEde42f04a4C" } else if NETWORK == "sepolia" { "0xC2Be75506d5724086DEB7245bd260Cc9753911Be" } else { "" }
export SUPERCHAIN_PROXY_ADMIN := if NETWORK == "mainnet" { "0x543ba4aadbab8f9025686bd03993043599c6fb04" } else if NETWORK == "sepolia" { "0x189abaaaa82dfc015a588a7dbad6f13b1d3485bc" } else { "" }
export UPGRADE_CONTROLLER := if NETWORK == "mainnet" { "0x5a0Aae59D09fccBdDb6C6CcEB07B7279367C3d2A" } else if NETWORK == "sepolia" { "0x1Eb2fFc903729a0F03966B917003800b145F56E2" } else { "" }
export L1_PROXY_ADMIN_OWNER := if NETWORK == "mainnet" { "0x5a0Aae59D09fccBdDb6C6CcEB07B7279367C3d2A" } else if NETWORK == "sepolia" { "0x1Eb2fFc903729a0F03966B917003800b145F56E2" } else { "" }
export CHALLENGER := if NETWORK == "mainnet" { "0x9BA6e03D8B90dE867373Db8cF1A58d2F7F006b3A" } else if NETWORK == "sepolia" { "0xfd1D2e729aE8eEe2E146c033bf4400fE75284301" } else { "" }

# This command should be called before any deployment or verification commands.
Expand All @@ -91,7 +91,7 @@ deploy-opcm release="dev" locator="$DEFAULT_LOCATOR": _validate_rpc
--mips-version 7 \
--protocol-versions-proxy $PROTOCOL_VERSIONS_PROXY \
--superchain-config-proxy $SUPERCHAIN_CONFIG_PROXY \
--upgrade-controller $UPGRADE_CONTROLLER \
--l1-proxy-admin-owner $L1_PROXY_ADMIN_OWNER \
--l1-contracts-release {{release}} \
--superchain-proxy-admin $SUPERCHAIN_PROXY_ADMIN \
--challenger $CHALLENGER \
Expand Down
11 changes: 6 additions & 5 deletions op-deployer/pkg/deployer/bootstrap/flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -124,10 +124,11 @@ var (
Usage: "Protocol versions proxy.",
EnvVars: deployer.PrefixEnvVar("PROTOCOL_VERSIONS_PROXY"),
}
UpgradeControllerFlag = &cli.StringFlag{
Name: "upgrade-controller",
Usage: "Upgrade controller.",
EnvVars: deployer.PrefixEnvVar("UPGRADE_CONTROLLER"),
L1ProxyAdminOwnerFlag = &cli.StringFlag{
Name: "l1-proxy-admin-owner",
Aliases: []string{"upgrade-controller"},
Usage: "L1 ProxyAdmin Owner.",
EnvVars: append(deployer.PrefixEnvVar("L1_PROXY_ADMIN_OWNER"), deployer.PrefixEnvVar("UPGRADE_CONTROLLER")...),
}
SuperchainProxyAdminFlag = &cli.StringFlag{
Name: "superchain-proxy-admin",
Expand Down Expand Up @@ -160,7 +161,7 @@ var ImplementationsFlags = []cli.Flag{
DisputeGameFinalityDelaySecondsFlag,
SuperchainConfigProxyFlag,
ProtocolVersionsProxyFlag,
UpgradeControllerFlag,
L1ProxyAdminOwnerFlag,
SuperchainProxyAdminFlag,
ChallengerFlag,
}
Expand Down
8 changes: 4 additions & 4 deletions op-deployer/pkg/deployer/bootstrap/implementations.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ type ImplementationsConfig struct {
FaultGameMaxClockDuration uint64 `cli:"fault-game-max-clock-duration"`
SuperchainConfigProxy common.Address `cli:"superchain-config-proxy"`
ProtocolVersionsProxy common.Address `cli:"protocol-versions-proxy"`
UpgradeController common.Address `cli:"upgrade-controller"`
L1ProxyAdminOwner common.Address `cli:"l1-proxy-admin-owner"`
SuperchainProxyAdmin common.Address `cli:"superchain-proxy-admin"`
Challenger common.Address `cli:"challenger"`
CacheDir string `cli:"cache-dir"`
Expand Down Expand Up @@ -115,8 +115,8 @@ func (c *ImplementationsConfig) Check() error {
if c.ProtocolVersionsProxy == (common.Address{}) {
return errors.New("protocol versions proxy must be specified")
}
if c.UpgradeController == (common.Address{}) {
return errors.New("upgrade controller must be specified")
if c.L1ProxyAdminOwner == (common.Address{}) {
return errors.New("l1 proxy admin owner must be specified")
}
if c.SuperchainProxyAdmin == (common.Address{}) {
return errors.New("superchain proxy admin must be specified")
Expand Down Expand Up @@ -232,7 +232,7 @@ func Implementations(ctx context.Context, cfg ImplementationsConfig) (opcm.Deplo
SuperchainConfigProxy: cfg.SuperchainConfigProxy,
ProtocolVersionsProxy: cfg.ProtocolVersionsProxy,
SuperchainProxyAdmin: cfg.SuperchainProxyAdmin,
UpgradeController: cfg.UpgradeController,
L1ProxyAdminOwner: cfg.L1ProxyAdminOwner,
Challenger: cfg.Challenger,
},
); err != nil {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ func testImplementations(t *testing.T, forkRPCURL string, cacheDir string) {
SuperchainConfigProxy: superchain.SuperchainConfigAddr,
ProtocolVersionsProxy: superchain.ProtocolVersionsAddr,
SuperchainProxyAdmin: proxyAdminOwner,
UpgradeController: proxyAdminOwner,
L1ProxyAdminOwner: proxyAdminOwner,
Challenger: common.Address{'C'},
CacheDir: cacheDir,
})
Expand Down
2 changes: 1 addition & 1 deletion op-deployer/pkg/deployer/integration_test/apply_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ func TestEndToEndBootstrapApply(t *testing.T) {
DevFeatureBitmap: common.Hash{},
SuperchainConfigProxy: bstrap.SuperchainConfigProxy,
ProtocolVersionsProxy: bstrap.ProtocolVersionsProxy,
UpgradeController: superchainPAO,
L1ProxyAdminOwner: superchainPAO,
SuperchainProxyAdmin: bstrap.SuperchainProxyAdmin,
CacheDir: testCacheDir,
Logger: lgr,
Expand Down
2 changes: 1 addition & 1 deletion op-deployer/pkg/deployer/opcm/implementations.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ type DeployImplementationsInput struct {
SuperchainConfigProxy common.Address
ProtocolVersionsProxy common.Address
SuperchainProxyAdmin common.Address
UpgradeController common.Address
L1ProxyAdminOwner common.Address
Challenger common.Address
}

Expand Down
2 changes: 1 addition & 1 deletion op-deployer/pkg/deployer/opcm/implementations_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ func TestNewDeployImplementationsScript(t *testing.T) {
SuperchainConfigProxy: proxyAddress,
ProtocolVersionsProxy: protocolVersionsAddress,
SuperchainProxyAdmin: proxyAdminAddress,
UpgradeController: common.BigToAddress(big.NewInt(13)),
L1ProxyAdminOwner: common.BigToAddress(big.NewInt(13)),
Challenger: common.BigToAddress(big.NewInt(14)),
})

Expand Down
2 changes: 1 addition & 1 deletion op-deployer/pkg/deployer/pipeline/implementations.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ func DeployImplementations(env *Env, intent *state.Intent, st *state.State) erro
SuperchainConfigProxy: st.SuperchainDeployment.SuperchainConfigProxy,
ProtocolVersionsProxy: st.SuperchainDeployment.ProtocolVersionsProxy,
SuperchainProxyAdmin: st.SuperchainDeployment.SuperchainProxyAdminImpl,
UpgradeController: st.SuperchainRoles.SuperchainProxyAdminOwner,
L1ProxyAdminOwner: st.SuperchainRoles.SuperchainProxyAdminOwner,
Challenger: st.SuperchainRoles.Challenger,
},
)
Expand Down
7 changes: 1 addition & 6 deletions op-deployer/pkg/deployer/verify/constructors_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -144,11 +144,6 @@ func TestCalculateTypeSlots(t *testing.T) {
"internalType": "address"
}
]
},
{
"name": "_upgradeController",
"type": "address",
"internalType": "address"
}
]`

Expand All @@ -161,6 +156,6 @@ func TestCalculateTypeSlots(t *testing.T) {
totalSlots += calculateTypeSlots(arg.Type)
}

require.Equal(t, 25, totalSlots)
require.Equal(t, 24, totalSlots)
})
}
39 changes: 4 additions & 35 deletions op-e2e/bindings/opcontractsmanager.go

Large diffs are not rendered by default.

3 changes: 1 addition & 2 deletions packages/contracts-bedrock/book/src/contributing/opcm.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,7 @@ corresponding smart contract release, and upgrading existing chains from one ver
smart contract release. Chains that are multiple versions behind must be upgraded in multiple stages across multiple
OPCMs.

The OPCM supports upgrading Superchain-wide contracts like `ProtocolVersions` and the `SuperchainConfig`. The OPCM will
perform the upgrade when the user calling the `upgrade` method is also the `UpgradeController`.
The OPCM supports upgrading Superchain-wide contracts like `ProtocolVersions` and the `SuperchainConfig`.

## Usage

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -314,8 +314,7 @@ interface IOPContractsManager {
IOPContractsManagerStandardValidator _opcmStandardValidator,
ISuperchainConfig _superchainConfig,
IProtocolVersions _protocolVersions,
IProxyAdmin _superchainProxyAdmin,
address _upgradeController
IProxyAdmin _superchainProxyAdmin
)
external;

Expand Down Expand Up @@ -390,6 +389,4 @@ interface IOPContractsManager {

/// @notice Returns the implementation contract addresses.
function implementations() external view returns (Implementations memory);

function upgradeController() external view returns (address);
}
2 changes: 1 addition & 1 deletion packages/contracts-bedrock/scripts/deploy/Deploy.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ contract Deploy is Deployer {
protocolVersionsProxy: IProtocolVersions(artifacts.mustGetAddress("ProtocolVersionsProxy")),
superchainConfigProxy: superchainConfigProxy,
superchainProxyAdmin: superchainProxyAdmin,
upgradeController: superchainProxyAdmin.owner(),
l1ProxyAdminOwner: superchainProxyAdmin.owner(),
challenger: cfg.l2OutputOracleChallenger()
})
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ contract DeployImplementations is Script {
ISuperchainConfig superchainConfigProxy;
IProtocolVersions protocolVersionsProxy;
IProxyAdmin superchainProxyAdmin;
address upgradeController;
address l1ProxyAdminOwner;
address challenger;
}

Expand Down Expand Up @@ -205,8 +205,7 @@ contract DeployImplementations is Script {
_output.opcmStandardValidator,
_input.superchainConfigProxy,
_input.protocolVersionsProxy,
_input.superchainProxyAdmin,
_input.upgradeController
_input.superchainProxyAdmin
)
)
);
Expand Down Expand Up @@ -632,7 +631,7 @@ contract DeployImplementations is Script {
(
opcmImplementations,
_input.superchainConfigProxy,
_input.upgradeController, // Proxy admin owner
_input.l1ProxyAdminOwner,
_input.challenger,
_input.withdrawalDelaySeconds,
_input.devFeatureBitmap
Expand Down Expand Up @@ -697,7 +696,7 @@ contract DeployImplementations is Script {
require(
address(_input.superchainProxyAdmin) != address(0), "DeployImplementations: superchainProxyAdmin not set"
);
require(address(_input.upgradeController) != address(0), "DeployImplementations: upgradeController not set");
require(address(_input.l1ProxyAdminOwner) != address(0), "DeployImplementations: L1ProxyAdminOwner not set");
}

function assertValidOutput(Input memory _input, Output memory _output) private {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,6 @@ contract VerifyOPCM is Script {
expectedGetters["protocolVersions"] = "EXPECTED_PROTOCOL_VERSIONS";
expectedGetters["superchainConfig"] = "EXPECTED_SUPERCHAIN_CONFIG";
expectedGetters["superchainProxyAdmin"] = "EXPECTED_SUPERCHAIN_PROXY_ADMIN";
expectedGetters["upgradeController"] = "EXPECTED_UPGRADE_CONTROLLER";

// Getters for OPCM sub-contracts (addresses verified via bytecode comparison)
expectedGetters["opcmDeployer"] = "SKIP"; // Address verified via bytecode comparison
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,6 @@
"internalType": "contract IProxyAdmin",
"name": "_superchainProxyAdmin",
"type": "address"
},
{
"internalType": "address",
"name": "_upgradeController",
"type": "address"
}
],
"stateMutability": "nonpayable",
Expand Down Expand Up @@ -824,19 +819,6 @@
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "upgradeController",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
Expand Down
4 changes: 2 additions & 2 deletions packages/contracts-bedrock/snapshots/semver-lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
"sourceCodeHash": "0xfca613b5d055ffc4c3cbccb0773ddb9030abedc1aa6508c9e2e7727cc0cd617b"
},
"src/L1/OPContractsManager.sol:OPContractsManager": {
"initCodeHash": "0xfc9b6327dc3fae8c26ce9d3ae8072b53845f2b8d992bc77a50f04134f0b0a7cc",
"sourceCodeHash": "0xa11523c7a9e71e2acee453e84cc981070881050ae6100aea7453188e0ca48796"
"initCodeHash": "0x9f9a3738b05cae6597ea9a5c5747f7dbd3a5328b05a319955054fbd8b1aaa791",
"sourceCodeHash": "0x154c764083f353e2a56337c0dd5cbcd6f2e12c21966cd0580c7a0f96c4e147dd"
},
"src/L1/OPContractsManagerStandardValidator.sol:OPContractsManagerStandardValidator": {
"initCodeHash": "0x57d6a6729d887ead009d518e8f17fa0d26bfc97b8efe1494ab4ef8dbb000d109",
Expand Down
11 changes: 3 additions & 8 deletions packages/contracts-bedrock/src/L1/OPContractsManager.sol
Original file line number Diff line number Diff line change
Expand Up @@ -1837,9 +1837,9 @@ contract OPContractsManager is ISemver {

// -------- Constants and Variables --------

/// @custom:semver 3.8.0
/// @custom:semver 4.0.0
function version() public pure virtual returns (string memory) {
return "3.8.0";
return "4.0.0";
}

OPContractsManagerGameTypeAdder public immutable opcmGameTypeAdder;
Expand All @@ -1865,9 +1865,6 @@ contract OPContractsManager is ISemver {
/// which is intended to be DELEGATECALLed.
OPContractsManager internal immutable thisOPCM;

/// @notice The address of the upgrade controller.
address public immutable upgradeController;

// -------- Errors --------

/// @notice Thrown when an address is the zero address.
Expand Down Expand Up @@ -1919,8 +1916,7 @@ contract OPContractsManager is ISemver {
OPContractsManagerStandardValidator _opcmStandardValidator,
ISuperchainConfig _superchainConfig,
IProtocolVersions _protocolVersions,
IProxyAdmin _superchainProxyAdmin,
address _upgradeController
IProxyAdmin _superchainProxyAdmin
) {
_opcmDeployer.assertValidContractAddress(address(_superchainConfig));
_opcmDeployer.assertValidContractAddress(address(_protocolVersions));
Expand All @@ -1938,7 +1934,6 @@ contract OPContractsManager is ISemver {
protocolVersions = _protocolVersions;
superchainProxyAdmin = _superchainProxyAdmin;
thisOPCM = this;
upgradeController = _upgradeController;
}

/// @notice Validates the configuration of the L1 contracts.
Expand Down
12 changes: 3 additions & 9 deletions packages/contracts-bedrock/test/L1/OPContractsManager.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,7 @@ contract OPContractsManager_Harness is OPContractsManager {
OPContractsManagerStandardValidator _opcmStandardValidator,
ISuperchainConfig _superchainConfig,
IProtocolVersions _protocolVersions,
IProxyAdmin _superchainProxyAdmin,
address _upgradeController
IProxyAdmin _superchainProxyAdmin
)
OPContractsManager(
_opcmGameTypeAdder,
Expand All @@ -80,8 +79,7 @@ contract OPContractsManager_Harness is OPContractsManager {
_opcmStandardValidator,
_superchainConfig,
_protocolVersions,
_superchainProxyAdmin,
_upgradeController
_superchainProxyAdmin
)
{ }

Expand Down Expand Up @@ -332,7 +330,6 @@ contract OPContractsManager_TestInit is CommonTest {
vm.setEnv("EXPECTED_SUPERCHAIN_CONFIG", vm.toString(address(opcm.superchainConfig())));
vm.setEnv("EXPECTED_PROTOCOL_VERSIONS", vm.toString(address(opcm.protocolVersions())));
vm.setEnv("EXPECTED_SUPERCHAIN_PROXY_ADMIN", vm.toString(address(opcm.superchainProxyAdmin())));
vm.setEnv("EXPECTED_UPGRADE_CONTROLLER", vm.toString(opcm.upgradeController()));
}

/// @notice Helper function to deploy a new set of L1 contracts via OPCM.
Expand Down Expand Up @@ -428,7 +425,6 @@ contract OPContractsManager_ChainIdToBatchInboxAddress_Test is Test {
ISuperchainConfig superchainConfigProxy = ISuperchainConfig(makeAddr("superchainConfig"));
IProtocolVersions protocolVersionsProxy = IProtocolVersions(makeAddr("protocolVersions"));
IProxyAdmin superchainProxyAdmin = IProxyAdmin(makeAddr("superchainProxyAdmin"));
address upgradeController = makeAddr("upgradeController");
OPContractsManager.Blueprints memory emptyBlueprints;
OPContractsManager.Implementations memory emptyImpls;
vm.etch(address(superchainConfigProxy), hex"01");
Expand All @@ -453,8 +449,7 @@ contract OPContractsManager_ChainIdToBatchInboxAddress_Test is Test {
),
_superchainConfig: superchainConfigProxy,
_protocolVersions: protocolVersionsProxy,
_superchainProxyAdmin: superchainProxyAdmin,
_upgradeController: upgradeController
_superchainProxyAdmin: superchainProxyAdmin
});
}

Expand Down Expand Up @@ -1249,7 +1244,6 @@ contract OPContractsManager_Upgrade_Test is OPContractsManager_Upgrade_Harness {
vm.setEnv("EXPECTED_SUPERCHAIN_CONFIG", vm.toString(address(opcm.superchainConfig())));
vm.setEnv("EXPECTED_PROTOCOL_VERSIONS", vm.toString(address(opcm.protocolVersions())));
vm.setEnv("EXPECTED_SUPERCHAIN_PROXY_ADMIN", vm.toString(address(opcm.superchainProxyAdmin())));
vm.setEnv("EXPECTED_UPGRADE_CONTROLLER", vm.toString(opcm.upgradeController()));

// Run the upgrade test and checks
runCurrentUpgrade(upgrader);
Expand Down
Loading