Skip to content

Conversation

devin-ai-integration[bot]
Copy link
Contributor

Remove ProtocolVersions smart contract entirely

Summary

This PR completely removes the ProtocolVersions smart contract and all related functionality from the Optimism repository. The ProtocolVersions contract was previously used to manage superchain protocol version information (required and recommended versions), but is being removed entirely.

Key changes:

  • Deleted core contract files: ProtocolVersions.sol, IProtocolVersions.sol, and associated tests
  • Updated OPContractsManager: Removed protocolVersions immutable field and constructor parameter
  • Modified deployment scripts: Removed ProtocolVersions deployment logic across multiple scripts
  • Updated Go runtime config: Removed protocol version loading and handling from op-node
  • Cleaned up integrations: Removed protocol version handling from superchain logic and E2E tests

Review & Testing Checklist for Human

⚠️ HIGH RISK - This is a large-scale removal that touches critical system components

  • End-to-end system testing: Deploy and run a complete devnet to verify the system works without ProtocolVersions
  • Codebase reference audit: Search the entire codebase for any remaining "ProtocolVersions" references that might have been missed
  • Node operation verification: Test that op-node starts up correctly and handles runtime configuration without protocol version data
  • Deployment script validation: Run deployment scripts in test environments to ensure they work without ProtocolVersions
  • Protocol upgrade mechanism check: Verify that any existing superchain protocol coordination still functions correctly without the ProtocolVersions contract

Notes

  • This change removes a core mechanism previously used for superchain protocol coordination
  • The system should continue to function normally, but thorough testing is essential given the scope
  • Some generated files and snapshots may need additional cleanup (mentioned in implementation but not visible in diff)

Session details: Requested by gh.owner.kfichter@oplabs.co
Link to Devin run: https://app.devin.ai/sessions/af5872289edb4b0888c4ebf3cab9b90b

- Delete core ProtocolVersions contract, interface, and test files
- Remove ProtocolVersions from OPContractsManager and IOPContractsManager
- Update deployment scripts to remove ProtocolVersions deployment logic
- Remove ProtocolVersions assertions from ChainAssertions
- Remove protocol version handling from op-node runtime config
- Delete protocol versions test file from op-e2e
- Clean up unused imports and fix compilation errors

This completely removes the ProtocolVersions contract and all related
functionality from the codebase while maintaining system functionality.

Co-Authored-By: gh.owner.kfichter@oplabs.co <gh.owner.kfichter@oplabs.co>
Copy link
Contributor Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR that start with 'DevinAI'.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

- Remove remaining ProtocolVersions artifact files and snapshots
- Update OPContractsManager version from 3.2.0 to 4.0.0 due to breaking changes
- Fix semver lock generation issues
- All pre-PR checks now pass successfully

Co-Authored-By: gh.owner.kfichter@oplabs.co <gh.owner.kfichter@oplabs.co>
Comment on lines 214 to +217
DeploySuperchain.Input({
guardian: cfg.superchainConfigGuardian(),
// TODO: when DeployAuthSystem is done, finalSystemOwner should be replaced with the Foundation Upgrades
// Safe
protocolVersionsOwner: cfg.finalSystemOwner(),
superchainProxyAdminOwner: cfg.finalSystemOwner(),
paused: false,
recommendedProtocolVersion: bytes32(cfg.recommendedProtocolVersion()),
requiredProtocolVersion: bytes32(cfg.requiredProtocolVersion())
guardian: cfg.superchainConfigGuardian(),
paused: false
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Logic consistency error: The comment describes 'The Superchain system has 1 singleton contract' but then lists '1. The SuperchainConfig contract' suggesting there should be more items. The numbering implies a list but only has one item, creating confusion about the system architecture.

Spotted by Diamond

Fix in Graphite


Is this helpful? React 👍 or 👎 to let us know.

- Remove ProtocolVersionsAddress from rollup config
- Remove ProtocolVersions fields from L1Deployments struct
- Remove ProtocolVersions assignments in CreateL1DeploymentsFromContracts
- All pre-commit checks now pass

Co-Authored-By: gh.owner.kfichter@oplabs.co <gh.owner.kfichter@oplabs.co>
@devin-ai-integration devin-ai-integration bot requested a review from a team as a code owner September 11, 2025 23:58
Copy link
Contributor Author

Closing due to inactivity for more than 7 days. Configure here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0 participants