Op tooling for pre-jovian (v4) & jovian (v5).#11676
Op tooling for pre-jovian (v4) & jovian (v5).#11676Mc01 wants to merge 34 commits intorelease/core-contracts/16from
Conversation
…into mc01/opcm-jovian
…ntract getters The GAME_IMMUTABLE_VARS[42] array was incorrectly populated with PermissionedDisputeGame (type 1) entries. Replace with the actual OPSuccinctFaultDisputeGame immutable getters and add corresponding ABI fragments in rpc.js. Config changes (config.js): - Remove wrong entries: absolutePrestate, maxGameDepth, splitDepth, clockExtension, vm, weth, l2ChainId, proposer, challenger - Add correct entries: maxChallengeDuration, maxProveDuration, disputeGameFactory, sp1Verifier, rollupConfigHash, aggregationVkey, rangeVkeyCommitment, challengerBond, accessManager ABI additions (rpc.js): - maxChallengeDuration/maxProveDuration (uint64 Duration type) - sp1Verifier, rollupConfigHash, aggregationVkey, rangeVkeyCommitment - challengerBond (uint256), accessManager (address) Verified: 10/11 immutables display with real on-chain values on all three networks. SP1 Verifier returns null (deployed contract does not expose sp1Verifier() getter on current deployments). Type 1 regression confirmed clean: all 12 PermissionedGame immutables intact.
Replace separate refs/immutables/paused sections with unified CONTRACT_PROPS architecture. All contract properties now display as chain-pointer arrows under each card with cross-reference validation. - Add CONTRACT_PROPS with comprehensive getters for all 15 contracts - Add PropRow/Props components replacing RefRow/ImmutableRow/PausedBadge - Add 18+ new ABI entries (gasPayingToken, balance, initBonds, etc.) - Add retirementTimestamp() to AnchorStateRegistry - Remove old CONTRACT_REFS, PAUSABLE_CONTRACTS, IMMUTABLE_VARS - Simplify fetchNetworkData phases (superchain/guardian folded into props) - Update compareNetworks to use props for paused/cross-ref checks
|
@copilot please review 🙏 |
Here's the review of the PR changes. Overall the work is well-structured and the upgrade pipeline is sound. A few observations: Bug / Correctness
Consistency / Naming
Minor
CI is green on the branch. Happy to fix any of these if you'd like — just let me know which ones to address. |
There was a problem hiding this comment.
Pull request overview
This PR expands and reorganizes packages/op-tooling to support OP Stack upgrades across multiple eras (pre-Jovian v4.1.0 and Jovian v5.0.0), adds several Safe-multisig Foundry scripts for maintenance/ownership operations, and introduces a new static “x-ray” web dashboard for inspecting deployed contract state across networks.
Changes:
- Reorganize op-deployer scripts into versioned directories (
v3/,v4/,v5/) and add new v4/v5 bootstrap + upgrade pipelines. - Add new exec flows for Jovian upgrades (mainnet + sepolia), plus a base-fee proposal execution script and additional encrypted signer bundles.
- Add new Safe-based Foundry scripts (ownership migration, ASR retirement/reset, DGF pruning) and a static x-ray dashboard deployed via Vercel.
Reviewed changes
Copilot reviewed 47 out of 53 changed files in this pull request and generated 9 comments.
Show a summary per file
| File | Description |
|---|---|
| secrets/.env.signers.v5.enc | Adds encrypted signer bundle for v5 execution flows. |
| secrets/.env.signers.v4.enc | Adds encrypted signer bundle for v4 execution flows. |
| secrets/.env.signers.succinct200.enc | Adds encrypted signer bundle for succinct-v2 (Jovian) execution flows. |
| secrets/.env.signers.basefee.enc | Adds encrypted signer bundle for basefee proposal execution. |
| scripts/key_placer.sh | Adds new signer bundles to decrypt/encrypt workflow. |
| packages/op-tooling/x-ray/vercel.json | Vercel SPA routing + JS headers for the new dashboard. |
| packages/op-tooling/x-ray/README.md | Documents running/deploying the x-ray dashboard. |
| packages/op-tooling/x-ray/.gitignore | Ignores Vercel metadata directory. |
| packages/op-tooling/verify/README.md | Updates verification docs and adds verify-versions.sh documentation. |
| packages/op-tooling/scripts/SafeSystemConfigOwner.s.sol | New Safe tx script to transfer SystemConfig ownership. |
| packages/op-tooling/scripts/SafeRetireASR.s.sol | New Safe tx script to retire ASR by writing packed storage slot. |
| packages/op-tooling/scripts/SafeResetAnchorGame.s.sol | New Safe tx script to override ASR anchorGame slot via temporary impl. |
| packages/op-tooling/scripts/SafePruneGamesFromStorage.s.sol | New Safe tx script to prune DGF games using temporary prunner impl. |
| packages/op-tooling/scripts/README.md | Documents new scripts and expands usage guidance. |
| packages/op-tooling/scripts/MigrateOwnershipToSafe.s.sol | New Foundry script for migrating multiple contract ownerships to a Safe. |
| packages/op-tooling/scripts/migrate-ownership-to-safe.sh | Wrapper script to run the ownership migration with network presets. |
| packages/op-tooling/safe/README.md | Removes deprecated Safe Gateway queue docs. |
| packages/op-tooling/safe/queue-safe.sh | Removes deprecated Safe Gateway queue script. |
| packages/op-tooling/README.md | Updates top-level op-tooling index (adds x-ray, updates op-deployer paths). |
| packages/op-tooling/op-deployer/v5/upgrade.sh | New v5 upgrade driver script (op-deployer upgrade v5.0.0). |
| packages/op-tooling/op-deployer/v5/run_upgrade.sh | New v5 orchestrator script (bootstrap → upgrade). |
| packages/op-tooling/op-deployer/v5/README.md | Documents v5 workflow, config, and network parameters. |
| packages/op-tooling/op-deployer/v5/bootstrap.sh | New v5 bootstrap script with optional verifier support and new flags. |
| packages/op-tooling/op-deployer/v4/upgrade.sh | New v4 upgrade driver script (op-deployer upgrade v4.1.0). |
| packages/op-tooling/op-deployer/v4/run_upgrade.sh | New v4 orchestrator script (bootstrap → upgrade). |
| packages/op-tooling/op-deployer/v4/README.md | Documents v4 workflow, config, and differences from v3. |
| packages/op-tooling/op-deployer/v4/bootstrap.sh | New v4 bootstrap script using updated flags and networks. |
| packages/op-tooling/op-deployer/v3/upgrade.sh | Updates v3 config paths to match new directory layout. |
| packages/op-tooling/op-deployer/v3/run_upgrade.sh | Updates v3 runner to call scripts from version directory. |
| packages/op-tooling/op-deployer/v3/README.md | Adds versioned v3 documentation. |
| packages/op-tooling/op-deployer/v3/bootstrap.sh | Replaces deprecated testnets with sepolia and updates paths. |
| packages/op-tooling/op-deployer/v3/bootstrap-validator.sh | Updates v3 validator bootstrap paths. |
| packages/op-tooling/op-deployer/README.md | Rewrites op-deployer docs as a version index + quick start. |
| packages/op-tooling/impls/SafeSetCeloConfig.s.sol | New Safe tx script to upgrade CeloSuperchainConfig proxy via ProxyAdmin. |
| packages/op-tooling/impls/README.md | Updates docs for renamed/new impl scripts. |
| packages/op-tooling/impls/DeployMIPS.s.sol | Adds/renames Foundry script for deterministic MIPS deployment. |
| packages/op-tooling/impls/DeployCeloConfigImpl.s.sol | New deterministic deployment script for CeloSuperchainConfig impl. |
| packages/op-tooling/fork/README.md | Updates fork docs: removes Holesky and adds mock-sepolia workflow. |
| packages/op-tooling/fork/mock-sepolia.sh | New script to prep sepolia/chaos forks (admin slot fix + ownership transfers). |
| packages/op-tooling/fork/mock-mainnet.sh | Adds ordering validation and fixes minor text. |
| packages/op-tooling/fork/fork_l1.sh | Removes Holesky fork option. |
| packages/op-tooling/exec/README.md | Documents new Jovian execution flows + updated signer file requirements. |
| packages/op-tooling/exec/exec-v2v3.sh | Adds required version argument (v2 or v3) instead of running both. |
| packages/op-tooling/exec/exec-mocked.sh | Extends mocked exec to support v4/v5/succ-v2 and validates signer ordering. |
| packages/op-tooling/exec/exec-jovian.sh | New mainnet Jovian execution script loading signatures from decoded signer files. |
| packages/op-tooling/exec/exec-jovian-sepolia.sh | New sepolia Jovian execution script with hardcoded signatures/nonces. |
| packages/op-tooling/exec/exec-basefee.sh | New direct cLabs Safe execution for base fee update proposal. |
Comments suppressed due to low confidence (1)
packages/op-tooling/impls/README.md:42
- The README section was updated to
DeployMIPS.s.sol, but the example commands still invokeforge script DeployMIPS.sol. Update the examples to use the renamed script filename so the docs are runnable.
**Example Execution:**
```bash
# Using existing oracle
PREIMAGE_ORACLE="0x..." forge script DeployMIPS.sol --root $PATH_TO_OP_REPO/packages/contracts-bedrock --broadcast --private-key $PK --rpc-url $RPC
# Deploying new oracle with MIPS
MIN_PROPOSAL_SIZE=1000 CHALLENGE_PERIOD=3600 forge script DeployMIPS.sol --root $PATH_TO_OP_REPO/packages/contracts-bedrock --broadcast --private-key $PK --rpc-url $RPC
</details>
---
💡 <a href="/celo-org/celo-monorepo/new/master?filename=.github/instructions/*.instructions.md" class="Link--inTextBlock" target="_blank" rel="noopener noreferrer">Add Copilot custom instructions</a> for smarter, more guided reviews. <a href="https://docs.github.com/en/copilot/customizing-copilot/adding-repository-custom-instructions-for-github-copilot" class="Link--inTextBlock" target="_blank" rel="noopener noreferrer">Learn how to get started</a>.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Agent-Logs-Url: https://github.com/celo-org/celo-monorepo/sessions/617d91be-d316-46dd-bf62-ca5c087039bf Co-authored-by: Mc01 <2324400+Mc01@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
… to empty bytes in Safe scripts Agent-Logs-Url: https://github.com/celo-org/celo-monorepo/sessions/b1d768fa-397b-4ad0-84bd-89f2ee49180b Co-authored-by: Mc01 <2324400+Mc01@users.noreply.github.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 33eae327df
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| if (type === 'uint256' || type === 'uint32' || type === 'uint64') { | ||
| return Number(value).toLocaleString() |
There was a problem hiding this comment.
Preserve bigint precision when formatting uint values
formatValue converts uint256/uint64 results with Number(value), but RPC reads return bigint and any value above 2^53-1 is rounded in JavaScript numbers. That causes the dashboard to show incorrect numeric state (notably fields like protocol version integers) and can mislead upgrade verification. Format these values from bigint/string directly instead of coercing through Number.
Useful? React with 👍 / 👎.
| AnchorStateRegistry: { | ||
| '0xe8e958be5a891ff9aac5410c3923dbafd99174bb': 'initial', // Sepolia | ||
| '0x68bc45e9774889efc5a317e9361bba655d33973c': 'initial', // Chaos | ||
| '0x7b465370bb7a333f99edd19599eb7fb1c2d3f2': 'initial', // Mainnet |
There was a problem hiding this comment.
Correct truncated AnchorStateRegistry impl address
The mainnet initial entry for AnchorStateRegistry is a truncated hex literal (0x...c2d3f2), not a full 20-byte address, so implLookup can never match that implementation and will omit/misclassify its version tag. This is an accuracy regression in the dashboard’s version mapping and appears to be a typo (the full address is used elsewhere in-repo).
Useful? React with 👍 / 👎.
Description
Adds op-deployer v4 tooling for the pre-Jovian upgrade (
v4.1.0) and v5 tooling for the Jovian upgrade (v5.0.0/U17), reorganizes the existing op-deployer scripts into versioned subdirectories, and introduces the x-ray web dashboard for inspecting OP Stack contract versions, implementations, and state across networks. Previously, all op-deployer scripts lived flat underop-deployer/; they are now organized asop-deployer/v3/,op-deployer/v4/, andop-deployer/v5/.The v4 scripts target
chaos,sepolia, andmainnetnetworks (replacing the deprecatedalfajores/baklavatestnets), introduce new bootstrap flags (--superchain-proxy-admin,--challenger), use MIPS v7, and simplify the upgrade pipeline by removing thebootstrap-validator.shstep.The v5 scripts build on v4 with updated prestate hash (
0x03caa187...), MIPS v8, the renamed--l1-proxy-admin-ownerflag, and optional contract verification support viaVERIFIER_API_KEYenv var (--verify --verifier-api-key). The upgrade config interface is identical to v4 (both delegate to the v2.0.0UpgradeOPChainInputstruct).Also adds new Safe multisig scripts for DisputeGameFactory pruning, AnchorStateRegistry retirement, SystemConfig ownership transfer, and CeloSuperchainConfig deployment/upgrade — all following the
getTransactionHash()/execTransaction()two-step pattern.Other changes
exec/exec-v2v3.sh: Now accepts a version argument (v2orv3) instead of running both upgrades in sequenceexec/exec-jovian-sepolia.sh: New — Executes OPCM upgrade transactions on Celo Sepolia through the Jovian-era Safe multisig chain (2-of-2: cLabs + Council, no Grand Child). Accepts version argument (v4,v5, orsuccinct-v2) with hardcoded nonces, target addresses, and signatures per version.x-ray/: New — Vercel-hosted web dashboard for inspecting OP Stack contract state across networks. Shows proxy/implementation addresses, version strings, ownership, dispute game details (type 1 PermissionedGame + type 42 OPSuccinctGame), and cross-reference validation. Includes light/dark mode, side navigation, and unified chain-pointer property display.fork/fork_l1.sh: Removed Holesky network support (onlymainnetandsepoliaremain); supportsRPC_URLdirectly withALCHEMY_API_KEYas optional fallbackfork/mock-sepolia.sh: New — Prepares forked testnet environment for Jovian upgrade testing. Fixes SuperchainConfig proxy admin slot, transfers ownership of ProxyAdmin/SystemConfig/DisputeGameFactory/DelayedWETH/ProtocolVersions to the network's deployed Safe via impersonation. Supportssepoliaandchaosnetworks.op-deployer/v3/bootstrap.sh: Replacedalfajores/baklavanetwork configs withsepolia; updated config file paths from./op-deployer/to./to reflect the new directory structureop-deployer/v3/bootstrap-validator.sh,upgrade.sh,run_upgrade.sh: Updated internal paths from./op-deployer/to./op-deployer/v4/andop-deployer/v5/: Addedchaosnetwork support (multisig address, proxy addresses,upgradeSuperchainConfig=true)op-deployer/v5/bootstrap.sh: Fixed unquoted$VERIFIER_API_KEYin the empty-check ([ -z "$VERIFIER_API_KEY" ]) and in the--verifier-api-keyargument to prevent incorrect branch evaluation when the variable is emptyimpls/DeployMIPS.sol: Renamed toDeployMIPS.s.sol(correct Foundry script naming convention)impls/DeployCeloConfigImpl.s.sol: New — Deploys CeloSuperchainConfig implementation using deterministic deployment (DeployUtils.createDeterministic)impls/SafeSetCeloConfig.s.sol: New — Upgrades CeloSuperchainConfig proxy to a new implementation via Safe multisig + ProxyAdminscripts/MigrateOwnershipToSafe.s.sol: New — Foundry script that migrates OP Stack L1 contract ownership from an EOA to a Gnosis Safe. Performs ProxyAdmin, SystemConfig, DisputeGameFactory ownership transfers + SuperchainConfig proxy admin migration in a single broadcast. Currently supportschaosnetwork.scripts/migrate-ownership-to-safe.sh: New — Shell wrapper for the migration script with env var validation; shebang corrected to#!/usr/bin/env bashto support bash-specific features (local, indirect expansion,set -o pipefail)scripts/SafePruneGamesFromStorage.s.sol: New — Safe multisig script to prune games from DisputeGameFactory storage. Deploys DisputeGameFactoryPrunner via CREATE2, performs upgradeAndCall to prune, then restores original impl. Includes MAX_PRUNE=500 limit.SIGdefaults to empty bytes soMissingSignatures()guard fires correctly when no signature is provided.scripts/SafeResetAnchorGame.s.sol: New — Safe multisig version of ResetAnchorGame for resetting anchor state via Safe transaction.SIGdefaults to empty bytes.scripts/SafeRetireASR.s.sol: New — Retires the AnchorStateRegistry via Safe transaction by writing retirementTimestamp into packed storage slot 6, preserving respectedGameType.SIGdefaults to empty bytes.scripts/SafeSystemConfigOwner.s.sol: New — Transfers SystemConfig ownership via Safe transaction (transferOwnership call, with pre/post verification).SIGdefaults to empty bytes.verify/verify-versions.sh: New — Comprehensive OP Stack contract diagnostic tool. Shows proxy/implementation addresses, version strings, ownership, dispute game implementations, and a color-coded upgrade status matrix (v3/Isthmus → v4.1.0/pre-Jovian → v5.0.0/Jovian). Supportssepolia,chaos, andmainnet.safe/: Removedsafe/directory entirely (queue-safe.sh+ README) — no longer neededTested
These are shell scripts, Foundry scripts, and documentation changes — no unit tests apply. The scripts have been validated structurally (correct env var checks, proper network/version case statements, valid contract addresses). The Jovian upgrade has been executed on the Chaos testnet using the v5 scripts with
mock-sepolia.shfor environment preparation. The x-ray dashboard has been deployed to Vercel and verified against all three networks (sepolia, chaos, mainnet).Backwards compatibility
Not backwards compatible for consumers of the flat
op-deployer/script paths — scripts have moved fromop-deployer/bootstrap.shtoop-deployer/v3/bootstrap.sh(and similarly for other v3 scripts). Thesafe/directory has been removed entirely.exec-v2v3.shnow requires a version argument (v2orv3) — previously it ran both in sequence. Internal paths within scripts have been updated accordingly, so running scripts from within their version directories works correctly.Documentation
packages/op-tooling/README.md— Updated op-deployer entry to reference versioned subdirectories; removedsafe/entry; addedx-rayentrypackages/op-tooling/op-deployer/README.md— Rewritten as high-level overview with version table linking to v3, v4, and v5; addedchaosnetwork to v4/v5 rowspackages/op-tooling/op-deployer/v3/README.md— New: Detailed docs for v2.0.0/v3.0.0 upgrade scriptspackages/op-tooling/op-deployer/v4/README.md— New: Detailed docs for v4.1.0 upgrade scripts, including comparison table vs v3; documentschaosnetworkpackages/op-tooling/op-deployer/v5/README.md— New: Detailed docs for v5.0.0 upgrade scripts, including comparison table vs v4, verification support; documentschaosnetworkpackages/op-tooling/fork/README.md— Updated: removed Holesky, documentedRPC_URLsupport, replaced Alfajores with Celo Sepolia; addedmock-sepolia.shdocumentationpackages/op-tooling/exec/README.md— Updated: addedexec-jovian-sepolia.shandexec-succinct.shdocumentation; updatedexec-v2v3.shdocs to reflect version argument; added Succinct execution flowpackages/op-tooling/impls/README.md— Updated: fixedDeployMIPS.sol→DeployMIPS.s.solheading; addedDeployCeloConfigImpl.s.solandSafeSetCeloConfig.s.soldocumentationpackages/op-tooling/verify/README.md— Updated: replaced Baklava/Alfajores references with Sepolia; addedverify-versions.shdocumentationpackages/op-tooling/scripts/README.md— Updated: addedMigrateOwnershipToSafe.s.sol,migrate-ownership-to-safe.sh,SafePruneGamesFromStorage.s.sol,SafeResetAnchorGame.s.sol,SafeRetireASR.s.sol, andSafeSystemConfigOwner.s.soldocumentationpackages/op-tooling/safe/README.md— Removed (directory deleted)