-
Notifications
You must be signed in to change notification settings - Fork 3.6k
op-node/rollup/interop: do not ignore local unsafe reset #16052
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
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #16052 +/- ##
============================================
+ Coverage 81.55% 96.24% +14.68%
============================================
Files 161 106 -55
Lines 8866 4583 -4283
============================================
- Hits 7231 4411 -2820
+ Misses 1502 172 -1330
+ Partials 133 0 -133
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
07aed9d
to
8b710d5
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR fixes an issue in managed-mode interop where the op-node was ignoring the local unsafe field during a reset, which could lead to inconsistencies after L1 reorganizations.
- Update the Reset method to retrieve the latest valid local unsafe block instead of using an empty reference.
- Introduce a new function (scanL2ForLatestLocalUnsafe) to scan the L2 chain and validate the L1 origins.
- Add new methods to the L2Source and L1Source interfaces to support block retrieval by label and by number.
8b710d5
to
7b632f4
Compare
7b632f4
to
590a420
Compare
590a420
to
1221f7a
Compare
Due to |
0b9e712
to
965af03
Compare
c3360e3
to
8cc0668
Compare
8cc0668
to
957c538
Compare
Description
This PR is:
SequencerConfDepth
In
managed-mode
in interop networks, it is theop-supervisor
that monitors the L1 chain, and is the source-of-truth for the networks view for theop-node
. At the moment when it issues a reset, theop-node
is ignoring theLocalUnsafe
field within the reset event.This means that if the L2 chain has progressed on an incorrect chain due to L1 reorg, its unsafe ref is not rewound back to a block using a valid L1 ref after the reorg.
Tests
This functionality is tested with
TestL2ReorgAfterL1Reorg
from #16105If you comment out the update to
LocalUnsafe
field, the test will fail, and you can inspect the logs and see that L1Origin ref for the L2 chain blocks is stuck on a reorged L1 block.I haven't added the test to this PR, as the
op-test-sequencer
L1-mode needs more work in order to be ready for review, but this bugfix and the test itself are ready.Follow-up
In a separate PR, as a follow-up:
op-test-sequencer
so that we can run the test multiple times. when running with-count=2
, no reorg on L1 is triggered at the momentop-supervisor
as source-of-truth for L1 origin selector (op-node.rollup.sequencing.L1OriginSelector
)Additional context
Found as part of #15331