Skip to content

chore: Remove Optimism_SpokePool & related contracts - #1500

Merged
pxrl merged 2 commits into
masterfrom
pxrl/byeOptimism
Jul 31, 2026
Merged

chore: Remove Optimism_SpokePool & related contracts#1500
pxrl merged 2 commits into
masterfrom
pxrl/byeOptimism

Conversation

@pxrl

@pxrl pxrl commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

Optimism_SpokePool was required as an extension of Ovm_SpokePool in order to support Optimism-specific bridges for early ERC20 tokens - notably DAI and SNX. Both of these tokens have been deprecated by Across and the SpokePool no longer holds any balances for them. Reverting to the OP_SpokePool contract is a simplification in terms of code surface area and deployment overhead.

Optimism_SpokePool was required as an extension of Ovm_SpokePool in
order to support Optimism-specific bridges for early ERC20 tokens -
notably DAI and SNX. Both of these tokens have been deprecated by Across
and the SpokePool no longer holds any balances for them. Reverting to
the OP_SpokePool contract is a simplification in terms of code surface
area and deployment overhead.
@pxrl

pxrl commented Jul 21, 2026

Copy link
Copy Markdown
Contributor Author

@droplet-rl Verify that there are no storage layout changes by updating the Optimism SpokePool to an OP_SpokePool implementation. Be absolutely critical and justify your conclusion.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 7cd339e9df

ℹ️ About Codex in GitHub

Your team has set up Codex to 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 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread contracts/spoke-pools/Optimism_SpokePool.sol
@droplet-rl

Copy link
Copy Markdown
Contributor

Verified: no storage layout changes. Optimism_SpokePool and OP_SpokePool produce byte-identical compiler-generated storage layouts. Evidence, from weakest to strongest:

1. Checked-in snapshots match. The deleted storage-layouts/Optimism_SpokePool.json vs the existing storage-layouts/OP_SpokePool.json: identical except the contract-name path in each entry's contract field.

2. Fresh compilation at the merge base (fed107d0), where both contracts coexist. I ran forge inspect <Contract> storageLayout --json (solc 0.8.30 per foundry.toml) for both and diffed the full output — including the types section and struct member encodings that checkStorageLayout.sh strips via jq del(.type)/del(.types). This matters: the CI check alone could not catch a same-slot/same-label type change, so I deliberately compared the unstripped layouts. After normalizing only astId (compiler-run noise) and the contract-name string, the layouts are identical across all 33 entries: every slot, offset, label, type encoding, and struct member matches, ending at the inherited __gap at slot 3166.

3. Compilation at this PR's HEAD. OP_SpokePool compiled at 7cd339e9 is identical to Optimism_SpokePool compiled at base — i.e., nothing this PR removes affects the surviving contract's layout. The only non-deletion source change in contracts/ is a comment edit in chain-adapters/CrossDomainEnabled.sol, which is not in the spoke pool inheritance chain.

Why this is structurally expected: neither contract declares any storage of its own. Optimism_SpokePool differed from OP_SpokePool only by two constants (SYNTHETIX_BRIDGE, SNX — constants are inlined, never stored) and a function override (code, not storage). Both inherit their entire layout from the same Ovm_SpokePoolSpokePool + CircleCCTPAdapter chain, compiled from the same sources, and both call __OvmSpokePool_init(..., Lib_PredeployAddresses.OVM_ETH).

What layout equality does not cover — three caveats for the upgrade itself:

initialize() is textually identical in both, and moot regardless — the proxy is already initialized and the initializer modifier blocks re-execution.

Conclusion: upgrading the Optimism SpokePool proxy to an OP_SpokePool implementation is storage-layout-safe. No code changes needed on this PR for that purpose.

@droplet-rl

Copy link
Copy Markdown
Contributor

🔎 View trace

@pxrl
pxrl merged commit 63cc698 into master Jul 31, 2026
9 checks passed
@pxrl
pxrl deleted the pxrl/byeOptimism branch July 31, 2026 15:33
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.

3 participants