github ethereum-optimism/optimism op-contracts/v9.0.0-rc.1

pre-release4 hours ago

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, AnchorStateRegistry and DelayedWETH read pause state and the guardian from the chain's ETHLockbox, which reads them from its SuperchainConfig. ETHLockbox, AnchorStateRegistry and DelayedWETH no longer expose systemConfig(); use ETHLockbox.superchainConfig(), and ethLockbox() on the registry and DelayedWETH. Initializers now take a SuperchainConfig (ETHLockbox) or an ETHLockbox (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 new SuperchainConfig.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.finalizeWithdrawalTransaction now reverts with OptimismPortal_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). L1CrossDomainMessenger now reserves 135,000 gas (was 40,000) after the relay call and uses a 15,000 gas check buffer (was 5,000), so baseGas for L2-to-L1 messages is higher. Integrators that hard-code gas limits for L2-to-L1 messages should use baseGas. The L2 messenger values are unchanged.
  • startingAnchorRoot override removed from OPCM upgrade() (#22959). Upgrades can no longer rewrite a chain's anchor root.
  • setInteropDisputeGames removed from OPCM (#22457). Call upgrade on 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 the OPTIMISM_PORTAL_INTEROP dev feature, so interop migration is available through OPCM on every OPCM deployment (#23524). The dev feature still controls the interop predeploys on L2 genesis and L2ContractsManager upgrades. OPContractsManagerMigrator_InteropNotEnabled is removed.
  • Interop migration is hardened (#22807, #22441, #23131):
    • migrate() reverts for chains that already have INTEROP enabled, 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_PERMISSIONED and non-zero otherwise, non-zero absolute prestate for permissionless games, and the starting respected game type must be one of the supplied configs.
    • SystemConfig.setFeature refuses to disable INTEROP, so a member cannot clear the flag and migrate again.
  • ZK dispute game configs are validated by OPCM deploy, upgrade and migrate(): zero or uint64-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 ETHLockbox is now enabled on every chain, not only interop chains. OPCM deploy() and upgrade() 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 the ETHLockbox permitted proxy deployment instruction on upgrade. Custom gas token chains get a lockbox but keep gas-token custody in the portal (#22805).
  • ETH_LOCKBOX can no longer be disabled on SystemConfig, and OptimismPortal2.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: OptimismPortal2 accounts 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 resolved CHALLENGER_WINS or was blacklisted, emitting WithdrawalProofDeleted. Replay protection is unaffected (#22669).
  • The OptimismPortal_L1CDMCallFailed() revert is described under Breaking changes (676ffde).

SafeCall and cross-domain messengers

  • SafeCall.callWithMinGas reserves 183,600 gas (NEW_ACCOUNT_STATE_GAS) when it sends value to an account with no code, balance or nonce, detected with EXTCODEHASH, so the target still receives its minimum gas under Glamsterdam. Callers of callWithMinGas with value to possibly-new accounts must supply that extra gas (78e222a).
  • L1CrossDomainMessenger 2.13.0 and L2CrossDomainMessenger 2.4.0 split relay gas into local and remote constants, because baseGas is computed on the sending chain but budgets relayMessage on the receiving chain. A shared GasConstants file defines each chain's relay budgets. The public RELAY_* getters are kept (aliasing the remote values), so the messenger interface is unchanged (8fdb277). L1 values change as described under Breaking changes.

Standard validator

  • OPContractsManagerStandardValidator 4.1.1 gains assertions for the respected game type being one the chain validates (ASR-RGT), a game's DelayedWETH matching SystemConfig.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, ETHLockbox and DelayedWETH are 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

  • ZKDisputeGame 2.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).
  • AnchorStateRegistry 4.0.0 and DelayedWETH 2.0.0 take their pause source from the lockbox (#22760).

Miscellaneous

  • SuperchainConfig 2.5.0 adds isLocalOrGlobalPaused(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

Don't miss a new optimism release

NewReleases is sending notifications on new releases.