Repository navigation
Description
Sibling of #20441 under parent #20309. Deletes the on-chain ProtocolVersions contract end-to-end and removes the corresponding storage slot from OPContractsManagerContainer.Implementations, plus all deploy-script and test wiring.
Functional payload (op-node halting on protocol mismatch) gone since #20258. Go-side wiring landed in #20441, with placeholder values for ABI fields the Solidity script still asserts non-zero on. PR 2 deletes the contract atomically with those Solidity asserts and then strips the Go placeholders.
Why this needs contracts-team review
Breaking ABI change to OPCM:
OPContractsManagerContainer.sol:26dropsaddress protocolVersionsImpl;from theImplementationsstruct. Layout shift cascades to OPCMv2, Utils, StandardValidator, Migrator. Major semver bumps required.- Deploy scripts (
DeploySuperchain.s.sol,DeployImplementations.s.sol,Deploy.s.sol,ChainAssertions.sol) drop input/output PV fields and the non-zero asserts atDeploySuperchain.s.sol:199-208andDeployImplementations.s.sol:723.
Scope
Solidity (delete)
src/L1/ProtocolVersions.solinterfaces/L1/IProtocolVersions.soltest/L1/ProtocolVersions.t.solsnapshots/abi/ProtocolVersions.jsonsnapshots/storageLayout/ProtocolVersions.json
OPCM (edit + major version bumps)
src/L1/opcm/OPContractsManagerContainer.sol+ interface — dropprotocolVersionsImplfromImplementations. Major bump.src/L1/opcm/OPContractsManagerV2.sol— drop the field fromsetImplementationscallers andgetImplementationsconsumers. Major bump.src/L1/opcm/OPContractsManagerUtils.sol— drop the field. Major bump.src/L1/OPContractsManagerStandardValidator.sol— drop validation checks. Minor bump.src/L1/opcm/OPContractsManagerMigrator.sol— drop migration code if present. Minor bump.
Deploy scripts
scripts/deploy/DeploySuperchain.s.sol— dropprotocolVersionsOwner/required/recommendedfrom input; dropprotocolVersionsProxy/Implfrom output; drop the contract deploy + initialization; drop asserts at L199, L201, L205, L234, L236, L267, L274.scripts/deploy/DeployImplementations.s.sol— dropprotocolVersionsProxyinput field + L723 assertion + the field flowed into the Container.scripts/deploy/Deploy.s.sol— dropprotocolVersionsOwner: cfg.finalSystemOwner()and any other PV deployment steps.scripts/deploy/ChainAssertions.sol— drop PV assertions.scripts/deploy/DeployOPChain.s.sol,ReadSuperchainDeployment.s.sol,VerifyOPCM.s.sol,DeployConfig.s.sol,libraries/Types.sol,getting-started/config.sh— drop refs.
Tests
test/opcm/{DeploySuperchain,DeployImplementations,DeployOPChain}.t.soltest/L1/opcm/{OPContractsManagerContainer,OPContractsManagerUtils}.t.soltest/setup/{Setup.sol,ForkL1Live.s.sol}test/vendor/Initializable.t.sol
Snapshots
After Solidity compiles cleanly: mise x -- just snapshots regenerates ABI / storage-layout / semver-lock for OPCMv2, Container, Utils, StandardValidator, Migrator, MigrationValidator.
Go-side placeholder removal (cleanup of #20441's fixup commit)
Strip every "PR 2 of #20309" TODO/comment introduced by 38c451e98e:
op-deployer/pkg/deployer/opcm/{superchain,implementations}.go— drop the restoredProtocolVersions*fields and thecommon.Hashversion field types.op-chain-ops/addresses/contracts.go— dropProtocolVersionsProxyandProtocolVersionsImplfromSuperchainContracts.op-chain-ops/interopgen/{deployments,deploy}.go— dropProtocolVersionsImplfield,common.Hash{0x01}placeholders,ProtocolVersionsProxypassthrough.op-deployer/pkg/deployer/pipeline/{superchain,implementations}.go— drop thedeprecatedProtocolVersionsPlaceholdervar and all placeholder field assignments.op-deployer/pkg/deployer/bootstrap/{superchain,implementations}.go— drop placeholder field assignments.op-deployer/pkg/deployer/opcm/{superchain_test,implementations_test}.go,op-deployer/pkg/deployer/pipeline/superchain_test.go— drop placeholder fields from struct literals.
Docs / misc
book/src/contributing/opcm.md, docs/public-docs/..., anywhere rg -i protocolversion still lights up.
Definition of Done
rg -i 'protocolversion' packages/contracts-bedrock/→ empty.rg -i 'protocolversion'from repo root → only the four documented exclusions:op-service/apis/p2p.goandop-node/p2p/rpc_server.go(libp2p peer protocol version, unrelated).rust/kona/tests/node/common/rpc_test.go(consumes the libp2p field).op-core/superchain/superchain_test.go(regression test added in PR 1 — provesBurntSushi/tomlignores the legacyprotocol_versions_addrkey).
mise x -- just prpasses (full pre-PR suite).mise exec -- go build ./...andmise exec -- just lint-goclean.- All affected OPCM contracts have bumped
@custom:semver(OPCMv2, Container, Utils → major; StandardValidator, Migrator → minor). - PR description summarises regenerated snapshots and version bumps.
Coordination
Needs sign-off from contracts-bedrock owners on:
- The OPCM
Implementationsstruct shape change (storage layout, ABI). - Major version bumps on OPCMv2 / Container / Utils.
- Whether OPCMv1 (if any artifacts remain) needs a deprecation path or can be dropped outright.
Dependencies
Stacks on #20441. Cannot merge until #20441 lands on develop.
Plan
Full plan with phased acceptance gates: plans/2026-04-29-refactor-protocol-versions-solidity-removal-plan.md in the op-claude repo (8 phases: leaves → OPCM struct → deploy scripts → tests → snapshots → version bumps → Go cleanup → docs sweep).
🤖 Generated by Claude Code
Activity