Skip to content

op-node: managed mode pre-interop #16071

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

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from
Open

Conversation

protolambda
Copy link
Contributor

@protolambda protolambda commented May 21, 2025

Description

Implements some simple changes to configure op-node in managed-mode before an interop activation time is set.

The test-setup needed some changes: to create the interop composition, without configuring interop itself.

Tests

Adds a new test that runs the interop-style infra configuration with managed mode and multiple chains, before any interop hardfork time is scheduled. And tests that it finalizes new L2 blocks.

Additional context

Metadata

Fix #15756

@protolambda protolambda requested a review from sebastianst May 21, 2025 23:37
Copy link

codecov bot commented May 21, 2025

Codecov Report

Attention: Patch coverage is 43.13725% with 29 lines in your changes missing coverage. Please review.

Project coverage is 45.79%. Comparing base (e5f32b3) to head (86db2db).
Report is 2 commits behind head on develop.

Files with missing lines Patch % Lines
op-devstack/sysgo/l2_challenger.go 20.00% 8 Missing ⚠️
op-node/rollup/interop/config.go 0.00% 4 Missing and 2 partials ⚠️
...visor/supervisor/backend/depset/full_config_set.go 0.00% 6 Missing ⚠️
op-node/node/node.go 0.00% 5 Missing ⚠️
op-node/node/config.go 0.00% 2 Missing ⚠️
op-devstack/sysgo/l2_proposer.go 66.66% 1 Missing ⚠️
op-node/rollup/interop/managed/system.go 0.00% 1 Missing ⚠️

❗ There is a different number of reports uploaded between BASE (e5f32b3) and HEAD (86db2db). Click for more details.

HEAD has 3 uploads less than BASE
Flag BASE (e5f32b3) HEAD (86db2db)
cannon-go-tests-64 2 0
contracts-bedrock-tests 2 1
Additional details and impacted files
@@             Coverage Diff              @@
##           develop   #16071       +/-   ##
============================================
- Coverage    81.40%   45.79%   -35.61%     
============================================
  Files          161     1313     +1152     
  Lines         8812   105791    +96979     
============================================
+ Hits          7173    48444    +41271     
- Misses        1506    53895    +52389     
- Partials       133     3452     +3319     
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.

Files with missing lines Coverage Δ
op-devstack/presets/interop.go 100.00% <100.00%> (ø)
op-devstack/sysgo/deployer.go 94.84% <ø> (ø)
op-devstack/sysgo/supervisor.go 93.65% <100.00%> (ø)
op-devstack/sysgo/system.go 55.55% <100.00%> (ø)
op-devstack/sysgo/l2_proposer.go 92.94% <66.66%> (ø)
op-node/rollup/interop/managed/system.go 0.00% <0.00%> (ø)
op-node/node/config.go 0.00% <0.00%> (ø)
op-node/node/node.go 0.36% <0.00%> (ø)
op-node/rollup/interop/config.go 41.17% <0.00%> (ø)
...visor/supervisor/backend/depset/full_config_set.go 0.00% <0.00%> (ø)
... and 1 more

... and 1251 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.

@protolambda protolambda force-pushed the op-node-managed-start branch from 0890f39 to 3c6f3ce Compare May 27, 2025 22:29
@protolambda protolambda requested a review from ajsutton May 27, 2025 22:57
@protolambda protolambda marked this pull request as ready for review May 27, 2025 22:57
@protolambda protolambda requested review from a team as code owners May 27, 2025 22:57
@protolambda protolambda requested a review from tynes May 27, 2025 22:57
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.

LGTM. I think the question around how to setup challenger could be ignored for now - there's some separate work to fix the setup and actually call migrate so it's using a real interop system. We can then hopefully update the WithUnscheduledInterop to also skip calling migrate and it will be on the pre-interop fault proof system. We're not actually testing the fault proof system in devstack yet anyway so its fine as-is.

Comment on lines +24 to +25
t.Require().LessOrEqual(uint64(5), status.Chains[sys.L2ChainA.ChainID()].Finalized.Number, "must have synced A")
t.Require().LessOrEqual(uint64(5), status.Chains[sys.L2ChainB.ChainID()].Finalized.Number, "must have synced B")
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm unclear why this is LessOrEqual - shouldn't we be expecting Finalized to be GreaterOrEqual than 5 (ie it should have progressed to at least 5 and it's possible it will have progressed further before this check actually runs since the chain is progressing in the background).

Comment on lines -262 to -265
interopTime := wb.outL2Genesis[id].Config.InteropTime
if interopTime == nil {
continue
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Probably not for this PR but we should be able to get rid of this method and always use the dependency set from op-deployer. It now always generates one and there's no activation time anymore. I can take a look at that.

Copy link
Contributor

Choose a reason for hiding this comment

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

Yep, can be removed: #16138

@@ -82,7 +82,8 @@ func WithL2Challenger(challengerID stack.L2ChallengerID, l1ELID stack.L1ELNodeID

dir := p.TempDir()
var cfg *config.Config
if interopScheduled {
// If interop is scheduled, or if we cannot do the pre-interop connection, then set up with supervisor
if interopScheduled || l2CLID == nil {
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not entirely sure this is the right framing. Really the decision of which way to configure things is based on which dispute game we're using (FaultDisputeGame vs SuperDisputeGame). It used to be that interopScheduled meant we would be using SuperDisputeGame but that's not necessarily the case.

That said, the protocol fork schedule and contract deployments aren't in sync right now. We're never calling migrate so the dispute games aren't shared, but I think we used addGameType somewhere to deploy the SuperDisputeGame. And the new test is only changing the rollup config to unschedule interop but not ensuring the contracts are setup for pre-interop.

I don't think that needs to block this landing but I think we've managed to make a mess of our test setup...

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.

Interop: op-node: handle fork-time CLI config cases
2 participants