Skip to content

op-supervisor,op-node: Handle non-genesis Interop #16008

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
May 30, 2025

Conversation

sebastianst
Copy link
Member

@sebastianst sebastianst commented May 19, 2025

Description

The op-node and op-supervisor are taught to handle a non-Genesis Interop activation timestamp properly in managed mode. In essence, the op-supervisor just does less while the op-node does a bit more pre-Interop:

  • Before Interop is active, the op-node locally auto-promotes local-(un)safe to cross(un)safe blocks (as before).
  • Only L1 derivation is driven by the op-supervisor pre-Interop.
    • ExhaustL1 events are answered by new L1 blocks as they become available.
    • Reset requests are answered by the supervisor with a special ResetPreInterop response.
  • When the supervisor detects the (unsafe and safe) activation blocks, it initiates the (events and derivation) DBs.
  • If a post-Interop reset bisection cannot find a consistent block, i.e. not even the anchor block stored in the DB is consistent with the node's view, then a pre-Interop reset is initiated as well.

The explicit notion of the anchor block is also mostly removed already in this PR.

  • The full supervisor config set includes genesis information, so the op-supervisor tests at startup whether the genesis block already has Interop active. If so, it will locally initiate the DB from genesis information, not querying AnchorBlock on the managed nodes.
  • If genesis hasn't Interop active yet, it is assumed that the activation block passes by the supervisor via its block subscription on its manages nodes.

This PR also makes the logs DB check itself whether it is initialized so that the ChainsDB initialized markers are only used to denote a fully initialized ChainsDB from a safe activation block.

Tests

The action test TestInteropUpgrade at op-e2e/actions/interop/interop_fork_test.go already runs Interop through an activation and asserts that the Interop activation block is properly sequenced and derived. This implicitly confirms that the activation logic in op-node/op-supervisor functions properly around the Interop activation timestamp. Some modifications were done to this test since it had some false logic that only worked with the previous pseudo-pre-Interop logic that the supervisor was following.

A post-genesis Interop variant of TestBackendLifetime was also added, and the previous tests adapted.

More action and acceptance tests will be added in future work.

Additional context

In a followup, full reorg support around the activation block is added. It probably wouldn't work right now, will be worked out in #15774

A few proofs tests or checks had to be commented out because the op-challenger (and probably other bits) still need some more work to make non-genesis activation work. This will be resolved with #16166

This PR breaks mutli-node support, which we decided to drop. So a few tests had to be skipped because of this. They will either be removed or fixed (#16187).

This PR also doesn't fully remove the notion of the anchor block yet. This is reserved for future work #16140

Metadata

Fixes #13732

Copy link

codecov bot commented May 19, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.24%. Comparing base (e7e42d2) to head (b968b00).
Report is 3 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff              @@
##           develop   #16008       +/-   ##
============================================
+ Coverage    81.54%   96.24%   +14.69%     
============================================
  Files          161      106       -55     
  Lines         8858     4575     -4283     
============================================
- Hits          7223     4403     -2820     
+ Misses        1502      172     -1330     
+ Partials       133        0      -133     
Flag Coverage Δ
cannon-go-tests-64 ?
contracts-bedrock-tests 96.24% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

see 55 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@sebastianst sebastianst force-pushed the seb/non-genesis-interop branch from 41b7a73 to 32027ef Compare May 20, 2025 13:43
@sebastianst sebastianst force-pushed the seb/non-genesis-interop branch from 32027ef to b38f129 Compare May 21, 2025 12:24
@sebastianst sebastianst changed the base branch from develop to seb/interop-rollup-config-set May 21, 2025 12:24
@sebastianst sebastianst force-pushed the seb/interop-rollup-config-set branch from 9676c92 to 37efba7 Compare May 22, 2025 09:33
@sebastianst sebastianst force-pushed the seb/non-genesis-interop branch from b38f129 to fd49b32 Compare May 22, 2025 09:33
@sebastianst sebastianst force-pushed the seb/interop-rollup-config-set branch from 37efba7 to cc3f2da Compare May 22, 2025 12:29
@sebastianst sebastianst force-pushed the seb/non-genesis-interop branch 2 times, most recently from 012d530 to 4989a3a Compare May 22, 2025 12:57
@sebastianst sebastianst force-pushed the seb/interop-rollup-config-set branch from cc3f2da to dc7a668 Compare May 22, 2025 12:57
@sebastianst sebastianst force-pushed the seb/non-genesis-interop branch from 4989a3a to c0efb56 Compare May 22, 2025 13:18
@sebastianst sebastianst force-pushed the seb/interop-rollup-config-set branch from 9b6edc5 to 536d2e9 Compare May 22, 2025 14:45
@sebastianst sebastianst force-pushed the seb/non-genesis-interop branch 2 times, most recently from b6255d1 to e8a5f15 Compare May 22, 2025 16:23
@sebastianst sebastianst force-pushed the seb/interop-rollup-config-set branch 2 times, most recently from 22e1736 to 3a77926 Compare May 22, 2025 16:24
@sebastianst sebastianst force-pushed the seb/non-genesis-interop branch 2 times, most recently from 3015158 to 80a58d1 Compare May 22, 2025 16:47
@sebastianst sebastianst force-pushed the seb/interop-rollup-config-set branch from 3a77926 to 5076a14 Compare May 22, 2025 16:47
@sebastianst sebastianst force-pushed the seb/non-genesis-interop branch from 80a58d1 to 6f50ae2 Compare May 22, 2025 16:59
@sebastianst sebastianst force-pushed the seb/interop-rollup-config-set branch 2 times, most recently from 44744c1 to 7ce1497 Compare May 22, 2025 17:02
@sebastianst sebastianst force-pushed the seb/non-genesis-interop branch 2 times, most recently from 1699dfc to 7e03ab1 Compare May 22, 2025 18:58
@sebastianst sebastianst force-pushed the seb/interop-rollup-config-set branch from 7ce1497 to 3ea8c9d Compare May 22, 2025 18:58
@sebastianst sebastianst force-pushed the seb/non-genesis-interop branch 2 times, most recently from 3cb35d3 to e748e5e Compare May 22, 2025 20:15
@sebastianst sebastianst force-pushed the seb/non-genesis-interop branch from 5924920 to 5581657 Compare May 29, 2025 17:05
@sebastianst sebastianst marked this pull request as ready for review May 29, 2025 17:47
@sebastianst sebastianst requested review from a team as code owners May 29, 2025 17:47
@sebastianst sebastianst requested a review from protolambda May 29, 2025 17:47
Copy link
Contributor

@ajsutton ajsutton left a comment

Choose a reason for hiding this comment

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

Took a look at the challenger failures and it looks like this change has broken the key requirement challenger has on it's API that optimism_superRootAtTimestamp will return a valid super root for any timestamp up to at least the current safe head. It is critical that it can return a super root even prior to interop activating, because the new anchor state we set will be from before interop hard fork activates and any block after that can be disputed. So challenger has to be able to get the valid super root for timestamps from that anchor state forwards in order to post correct claims.

sebastianst and others added 3 commits May 30, 2025 13:00
@sebastianst sebastianst force-pushed the seb/non-genesis-interop branch from 6c08249 to b968b00 Compare May 30, 2025 11:02
@sebastianst sebastianst added this pull request to the merge queue May 30, 2025
Merged via the queue into develop with commit 002dc4a May 30, 2025
60 of 61 checks passed
@sebastianst sebastianst deleted the seb/non-genesis-interop branch May 30, 2025 12:40
ajsutton added a commit that referenced this pull request Jun 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
H-interop Hardfork: change planned for interop upgrade
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Interop: op-supervisor handle interop upgrade
4 participants