-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
op-node/rollup: Promote all attributes to safe post-Holocene #12724
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## seb/holocene-invalid-payloads #12724 +/- ##
=================================================================
- Coverage 64.86% 63.85% -1.02%
=================================================================
Files 54 55 +1
Lines 4460 4606 +146
=================================================================
+ Hits 2893 2941 +48
- Misses 1391 1483 +92
- Partials 176 182 +6
Flags with carried forward coverage won't be shown. Click here to find out more. |
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.
Marked the actual changes. Everything else is just renaming IsLastInSpan
to Safe
.
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.
The PR also renames fields IsLastInSpan to Safe in many structs because that's semantically clearer. That a last batch in a span batch is pre-Holocene the indicator for a safe block promotion is an implementation detail. It's better to name the effect rather than the reason. And in some deriver events, it was already called Safe.
While I generally agree with the effect vs reason naming, unfortunately it does not work so well here:
- I find "safe" to be confusing with the "pending safe" concept.
- "safe" (as RPC label) is equal to cross-safe in interop, whereas deriving it for the chain without cross-L2 checks is only considered "local safe" in interop, and thus shouldn't be confused with "safe"
And so since the functionality is actively changing, the effect is not the same across forks, and thus I much prefer the naming based on the reason.
Alternatively, we can name it "stableDerived" or maybe just "stable", or something that makes it clear it's not a pending attribute (nor a sequencer unsafe attribute). (Named after the original 'stable batch derivation' feature name)
3313459
to
5349b3e
Compare
e986259
to
35056d2
Compare
5349b3e
to
b113b3e
Compare
Also renames fields `IsLastInSpan` to `Safe` because that's semantically clearer. That a last batch in a span batch is pre-Holocene the indicator for a safe block promotion is an implementation detail. It's better to name the effect rather than the reason.
b113b3e
to
b92bcc2
Compare
Also renames fields `IsLastInSpan` to `Safe` because that's semantically clearer. That a last batch in a span batch is pre-Holocene the indicator for a safe block promotion is an implementation detail. It's better to name the effect rather than the reason.
…m-optimism#12724) Also renames fields `IsLastInSpan` to `Safe` because that's semantically clearer. That a last batch in a span batch is pre-Holocene the indicator for a safe block promotion is an implementation detail. It's better to name the effect rather than the reason.
Description
Holocene removes backwards-invalidation by span batches. So all derived attributes can immediately be promoted to safe. This is the only change in logic of this PR.
The PR also renames fields
IsLastInSpan
toConcluding
in many structs because that's semantically clearer. That a last batch in a span batch is pre-Holocene the indicator for a safe block promotion is an implementation detail. It's better to name the effect rather than the reason. Concluding was chosen, since these attributes conclude the pending phase.Tests
Changed an assertion in a test from using pending safe to safe to test this change. It failed before.
Additional context
Holocene skips overlapping span batch checks, which in a constructed malicious sequencer setting can lead to a local chain split of nodes that force-restarted mid-way through block derivation. However, the same situation can already be applied pre-Holocene with singular batches, because they are also fast-dropped and overlapping singular batches are not tested to match an existing safe chain. So we may actually want to change the mechanics of safe chain promotion from pending safe to only promote after a full L1 block has been derived. This is reserved for a follow, more details can be found here: #12695