op-node: ensure sequencer selects L1 origin within sequencer time drift and use conf depth util#4808
Merged
mergify[bot] merged 1 commit intodevelopfrom Jan 31, 2023
Merged
Conversation
and use conf depth util
|
trianglesphere
approved these changes
Jan 31, 2023
Contributor
trianglesphere
left a comment
There was a problem hiding this comment.
nice works. Thanks for the fix.
Contributor
|
This PR has been added to the merge queue, and will be merged soon. |
Contributor
|
This PR is next in line to be merged, and will be merged as soon as checks pass. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Subset of original #4758
As sequencer it didn't follow the safety-over-liveness priority, and ignored the sequencer conf depth to try and handle sequencer time drift.
This however is dangerous because of the recent verifier "fix" in (good fix, but incomplete):
This means that as a verifier you end up dropping the empty batch with old origin, causing a halt (of safe blocks) until the sequencer window forces an empty block to be created. This already went wrong once due to a L1 RPC outage on Goerli
And aside from halting as such, it risks adopting the next L1 origin differently than the sequencer, causing a reorg of the unsafe chain.
Tests
TestOriginSelectorRespectsMaxSeqDriftintoTestOriginSelectorStrictConfDepthto enforce conf depth.TestOriginSelectorHandlesLateL1Blocksto cover the case when the L1 block time gap is larger than the sequencer time drift. It preserves the time invariant in favor of the timedrift invariant. Note: the safe-head progress would be bricked after this (assuming L1 does not reorg out the gap), as one of the two invariants breaks. We need some sort of derivation change like in the original PR.Invariants
L2 timestamp >= L1 origin timestampinvariant. This can happen if L1 blocks have a huge time gap, larger than the sequencer time drift. This was fixed in op-node: fix sequencer time drift edge case, strictly enforce sequencer conf depth #4758 but will now be split into a different PR because it affects derivation. In such case I believe it's best to allow the sequencer to continue, but only until the L1 origin can be introduced without breaking the (L2 timestamp >= L1 origin timestamp` invariant, and disable tx inclusion by sequencer to avoid L2 activity that has to be submitted in such risky L1 situation (large L1 gaps = likely trouble including batch data).Additional context
See #4758 and #3861 (comments too) for additional context.
Metadata
Fix ENG-3285