Overview
Important
This is a release candidate of the op-contracts release for Upgrade 21 (U21). It contains the Glamsterdam gas-constant changes to OptimismPortal2, SafeCall and the cross-domain messengers, ETHLockbox on every chain with lockbox-based pause resolution, interop migration through OPCM migrate(), and ZK dispute game hardening.
This is a pre-release. Contracts and addresses may change before op-contracts/v9.0.0.
Breaking changes
- Pause state now resolves through
ETHLockbox(#22760).OptimismPortal2,SystemConfig,AnchorStateRegistryandDelayedWETHread pause state and the guardian from the chain'sETHLockbox, which reads them from itsSuperchainConfig.ETHLockbox,AnchorStateRegistryandDelayedWETHno longer exposesystemConfig(); useETHLockbox.superchainConfig(), andethLockbox()on the registry andDelayedWETH. Initializers now take aSuperchainConfig(ETHLockbox) or anETHLockbox(AnchorStateRegistry,DelayedWETH); the selectors are unchanged, so old calldata fails at runtime rather than at decode. Monitoring and deputy-pause configuration keyed on the portal address must move to the lockbox address, and should call the newSuperchainConfig.isLocalOrGlobalPaused(address)to cover both local and global pauses. - Portal finalization can revert for L2CrossDomainMessenger withdrawals (676ffde). If the L1CrossDomainMessenger call fails for a withdrawal sent by the
L2CrossDomainMessenger,OptimismPortal2.finalizeWithdrawalTransactionnow reverts withOptimismPortal_L1CDMCallFailed()and leaves the withdrawal unfinalized, so it can be finalized again with more gas. Finalizers and relayers must handle the revert and retry. Other withdrawals behave as before. - L1 messenger relay gas increased (8fdb277).
L1CrossDomainMessengernow reserves 135,000 gas (was 40,000) after the relay call and uses a 15,000 gas check buffer (was 5,000), sobaseGasfor L2-to-L1 messages is higher. Integrators that hard-code gas limits for L2-to-L1 messages should usebaseGas. The L2 messenger values are unchanged. startingAnchorRootoverride removed from OPCMupgrade()(#22959). Upgrades can no longer rewrite a chain's anchor root.setInteropDisputeGamesremoved from OPCM (#22457). Callupgradeon any member of a migrated interop set with the new dispute game config instead; it applies to the whole set.
Other changes
OP Contracts Manager and upgrade path
- OPCM V2 is now 9.0.3.
migrate()no longer requires theOPTIMISM_PORTAL_INTEROPdev feature, so interop migration is available through OPCM on every OPCM deployment (#23524). The dev feature still controls the interop predeploys on L2 genesis andL2ContractsManagerupgrades.OPContractsManagerMigrator_InteropNotEnabledis removed.- Interop migration is hardened (#22807, #22441, #23131):
migrate()reverts for chains that already haveINTEROPenabled, so it cannot run twice, and for chains not on this OPCM's release.- Every supplied dispute game config is validated: super-root game types only, enabled, zero init bond for
SUPER_PERMISSIONEDand non-zero otherwise, non-zero absolute prestate for permissionless games, and the starting respected game type must be one of the supplied configs. SystemConfig.setFeaturerefuses to disableINTEROP, so a member cannot clear the flag and migrate again.
- ZK dispute game configs are validated by OPCM deploy, upgrade and
migrate(): zero oruint64-overflowing challenge and prove durations and a zero challenger bond are rejected (#23239). - Batch upgrades use less gas (14-chain batch: 16.97M to 15.94M gas) (#22919).
ETHLockbox and pause
- An
ETHLockboxis now enabled on every chain, not only interop chains. OPCMdeploy()andupgrade()load or deploy it; the portal's ETH is migrated into it the first time it is enabled, and chains in an interop set keep their shared lockbox. Chains without a lockbox need theETHLockboxpermitted proxy deployment instruction on upgrade. Custom gas token chains get a lockbox but keep gas-token custody in the portal (#22805). ETH_LOCKBOXcan no longer be disabled onSystemConfig, andOptimismPortal2.migrateLiquidity()requires a configured lockbox and reverts on custom gas token chains (#22805).- Pause resolution changes are described under Breaking changes (#22760).
OptimismPortal2
- Gas constants and new-account reserve:
OptimismPortal2accounts for the EIP-8037 state gas charged when a withdrawal sends value to a new account. The extra gas is taken from the finalizing transaction, not the withdrawal's gas limit, and is unused when no charge applies. Version 6.1.0 (78e222a, 8fdb277). deleteProvenWithdrawal(bytes32,address)lets anyone delete a proven withdrawal whose dispute game resolvedCHALLENGER_WINSor was blacklisted, emittingWithdrawalProofDeleted. Replay protection is unaffected (#22669).- The
OptimismPortal_L1CDMCallFailed()revert is described under Breaking changes (676ffde).
SafeCall and cross-domain messengers
SafeCall.callWithMinGasreserves 183,600 gas (NEW_ACCOUNT_STATE_GAS) when it sends value to an account with no code, balance or nonce, detected withEXTCODEHASH, so the target still receives its minimum gas under Glamsterdam. Callers ofcallWithMinGaswith value to possibly-new accounts must supply that extra gas (78e222a).L1CrossDomainMessenger2.13.0 andL2CrossDomainMessenger2.4.0 split relay gas into local and remote constants, becausebaseGasis computed on the sending chain but budgetsrelayMessageon the receiving chain. A sharedGasConstantsfile defines each chain's relay budgets. The publicRELAY_*getters are kept (aliasing the remote values), so the messenger interface is unchanged (8fdb277). L1 values change as described under Breaking changes.
Standard validator
OPContractsManagerStandardValidator4.1.1 gains assertions for the respected game type being one the chain validates (ASR-RGT), a game'sDelayedWETHmatchingSystemConfig.delayedWETH()(DWETH-70), non-zero init bonds for permissionless game types (-160) and the ZK game (ZKDG-160), and a non-zero ZK anchor root (ZKDG-120);PORTAL-30, which compared a value with itself, is removed (#22471).- ZK game challenge and prove durations are bounded at
type(uint32).max(#22328). - Migrated interop members now validate: the shared
DisputeGameFactory,AnchorStateRegistry,ETHLockboxandDelayedWETHare checked against the shared ProxyAdmin, whose owner must be the expected L1 PAO multisig (SHARED-PROXYA-10) (#23134). - Lockbox is required on every chain (
LOCKBOX-00,LOCKBOX-05) (#22805).
Dispute games
ZKDisputeGame2.1.0: a game created while ZK is the respected game type must build on a parent that was also respected at creation, so claims made while ZK was not respected cannot become withdrawal-eligible through a respected child (#23210).AnchorStateRegistry4.0.0 andDelayedWETH2.0.0 take their pause source from the lockbox (#22760).
Miscellaneous
SuperchainConfig2.5.0 addsisLocalOrGlobalPaused(address)(#22760).
Contract versions
| Contract | v8.0.0 | v9.0.0-rc.1 |
|---|---|---|
AnchorStateRegistry
| 3.9.0 | 4.0.0 |
DelayedWETH
| 1.5.1 | 2.0.0 |
ETHLockbox
| 1.3.1 | 2.0.0 |
L1CrossDomainMessenger
| 2.11.1 | 2.13.0 |
L2CrossDomainMessenger
| 2.2.1 | 2.4.0 |
OPContractsManagerStandardValidator
| 3.3.0 | 4.1.1 |
OPContractsManagerV2
| 8.0.1 | 9.0.3 |
OptimismPortal2
| 5.8.0 | 6.1.0 |
SuperchainConfig
| 2.4.3 | 2.5.0 |
SystemConfig
| 4.0.0 | 4.3.0 |
ZKDisputeGame
| 2.0.1 | 2.1.0 |
Full Changelog: op-contracts/v8.0.0...op-contracts/v9.0.0-rc.1