github ethereum-optimism/optimism op-contracts/v8.0.0

latest releases: op-reth/v2.10.0-rc.4, op-supernode/v1.2.0-rc.3, kona-node/v1.12.0-rc.3...
one month ago

Overview

Important

This is the op-contracts release for Upgrade 20. It moves chains from Output Root to Super Root Dispute Games, removes deprecated SystemConfig functions and the ProtocolVersions contract, and tightens OPCM and StandardValidator checks.

Breaking changes

  • Super Root Dispute Games become the respected game types (#21689). OPCM.upgrade() now always takes the Super Root path: a permissioned chain moves to SUPER_PERMISSIONED (game type 5) and a permissionless chain to SUPER_CANNON_KONA (game type 9). Their root claim is a Super Root, not an Output Root, and their l2SequenceNumber is an L2 timestamp, not a block number. Integrations that read dispute game root claims directly must recognise game types 5 and 9 and use rootClaimByChainId(uint256) to get the chain's Output Root. Games created before the upgrade still resolve, and OptimismPortal2 accepts withdrawal proofs from both formats.
  • SystemConfig.batchInbox() and SystemConfig.setGasConfig(uint256,uint256) removed (#21641). Both now revert. Read the batch inbox address from the rollup config or the superchain registry, and use setGasConfigEcotone(uint32,uint32) to set fee scalars. overhead() remains but is deprecated and returns zero, and the first word of the FEE_SCALARS ConfigUpdate event is now always zero. SystemConfig.initialize no longer takes a batch inbox and clears the legacy slot.
  • ProtocolVersions contract removed (#20527). OPCM no longer deploys or upgrades it. Tooling that reads ProtocolVersions must stop doing so.
  • OPContractsManagerContainer.Implementations struct changed (#20527, #22218). protocolVersionsImpl is gone and sp1PlonkAdapterImpl is new, so tooling that decodes OPCM's implementations() must use the new ABI.
  • SuperPermissionedDisputeGame is a new, simplified game (#20641, #21513). It no longer runs a bisection game: only the proposer can create one, for a Super Root newer than the anchor, and it resolves DEFENDER_WINS at creation. The fault dispute game interface (attack, defend, move, step, claimData, credit, claimCredit, challenger, the clock and bond getters, and so on) is removed from it, and it takes no bonds. The GameTypes.SUPER_PERMISSIONED_CANNON constant is renamed SUPER_PERMISSIONED; the game type value 5 is unchanged.
  • OPCM v8 upgrade inputs (#22096). OPCM.upgrade() no longer permits the PermittedProxyDeployment instruction for DelayedWETH, and reverts with OPContractsManagerV2_InvalidUpgradeInstruction if it is passed; drop it from upgrade calls and templates. The upgrade also reverts for a chain that was not last upgraded by an OPCM v7, so a chain must be on op-contracts/v7.0.0 before it upgrades to this release.

Other changes

OPCM

  • OPCM.upgrade() accepts an overrides.cfg.startingAnchorRoot instruction, so the Super Root upgrade can set the starting anchor (#21689)
  • New chains start with Super Root Dispute Games: OPCM.deploy() accepts only SUPER_PERMISSIONED or SUPER_CANNON_KONA as enabled initial game types. A permissionless initial game needs a real starting anchor root rather than the 0xdead placeholder, a nonzero absolute prestate and a starting sequence number below 2^64 (#21720, #21588)
  • Stricter dispute game config checks: an enabled game needs a nonzero init bond (and SUPER_PERMISSIONED must have a zero one), and an enabled game type with no deployed implementation reverts with OPContractsManagerV2_ZeroGameImplementation (#20548)
  • SUPER_CANNON (game type 4) is retired. OPCM rejects configs for it, and upgrade() clears any existing registration of it in the DisputeGameFactory (#20363)
  • upgrade() reverts with OPContractsManagerUtils_OZv5InitializableUnsupported if a new implementation uses OpenZeppelin v5 Initializable storage, which OPCM cannot reset (#21070)
  • The CANNON_KONA and L2CM DevFeatures bits are retired, and SUPER_ROOT_GAMES_MIGRATION always reports enabled (#21663, #21591, #21689)

Dispute games

  • SuperPermissionedDisputeGame rejects a nonzero msg.value at creation, so ETH cannot be trapped in a game that has no bond accounting (#22410)

StandardValidator

  • Checks that each registered dispute game implementation is the release implementation by address, not only by its reported version (-150) (#22365)
  • Checks that SystemConfig.l2ChainId() matches the expected chain ID (SYSCON-140) (#22366)
  • Checks that the dispute games use the same AnchorStateRegistry as the OptimismPortal (-ANCHORP-70) (#22412)
  • Requires the legacy CANNON game type to be unregistered (PLDG-NOSHAPE) (#21621)
  • Validates the new SuperPermissionedDisputeGame and its args (#20641)

L2 contracts

  • New FeeVault.setWithdrawalRoute() sets the recipient and withdrawal network in one call, for all fee vaults (#20982)
  • L2ContractsManager gains a deploy() entrypoint, and L2 genesis now uses it to initialise predeploys (#21477)
  • L2ContractsManager upgrades now also cover ConditionalDeployer and L2DevFeatureFlags, and assume the chain is already on Karst (#19847, #20313)
  • L2DevFeatureFlags.isDevFeatureEnabled now reports the real bitmap for the retired L2CM and CANNON_KONA bits, and always reports SUPER_ROOT_GAMES_MIGRATION as enabled (#21591, #21663, #21689)
  • The Lagoon upgrade bundle has higher gas limits for the ConditionalDeployer deployment and the L2ProxyAdmin upgrade transaction (#20977, #20986, #21444)

Contract versions

Contract v7.0.0 v8.0.0
BaseFeeVault 1.6.1 1.7.0
CrossL2Inbox 1.0.2 1.1.0
ETHLiquidity 1.1.0 1.1.1
L1FeeVault 1.6.1 1.7.0
L2ContractsManager 1.8.0 1.14.0
L2DevFeatureFlags 1.0.0 1.3.0
L2ProxyAdmin 1.0.0 1.1.0
L2ToL2CrossDomainMessenger 1.3.1 1.3.2
OPContractsManagerStandardValidator 2.9.1 3.3.0
OPContractsManagerV2 7.1.17 8.0.1
OperatorFeeVault 1.1.1 1.2.0
OptimismPortal2 5.6.1 5.8.0
ProtocolVersions 1.1.2 —
SequencerFeeVault 1.6.1 1.7.0
SuperFaultDisputeGame 0.7.2 0.8.0
SuperPermissionedDisputeGame 0.7.0 1.1.0
SuperchainConfig 2.4.2 2.4.3
SystemConfig 3.14.2 4.0.0
ZKDisputeGame 1.1.0 2.0.1

Full Changelog: op-contracts/v7.0.0...op-contracts/v8.0.0

Don't miss a new optimism release

NewReleases is sending notifications on new releases.