Skip to content
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

Merged
merged 1 commit into from
Oct 31, 2024

Conversation

sebastianst
Copy link
Member

@sebastianst sebastianst commented Oct 29, 2024

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 to Concluding 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

@sebastianst sebastianst added the M-do-not-merge Meta: Do not merge label Oct 29, 2024
@sebastianst sebastianst added this to the Holocene: Derivation milestone Oct 29, 2024
@sebastianst sebastianst self-assigned this Oct 29, 2024
Copy link

codecov bot commented Oct 29, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 63.85%. Comparing base (5e8dbc0) to head (3313459).
Report is 92 commits behind head on seb/holocene-invalid-payloads.

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     
Flag Coverage Δ
cannon-go-tests 63.85% <ø> (-1.02%) ⬇️

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

see 1 file with indirect coverage changes

Copy link
Member Author

@sebastianst sebastianst left a 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.

Copy link
Contributor

@protolambda protolambda left a 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)

@sebastianst sebastianst force-pushed the seb/holocene-fast-safe branch from 3313459 to 5349b3e Compare October 30, 2024 21:24
@sebastianst sebastianst force-pushed the seb/holocene-invalid-payloads branch from e986259 to 35056d2 Compare October 30, 2024 21:24
Base automatically changed from seb/holocene-invalid-payloads to develop October 31, 2024 07:14
@sebastianst sebastianst force-pushed the seb/holocene-fast-safe branch from 5349b3e to b113b3e Compare October 31, 2024 15:29
@sebastianst sebastianst removed the M-do-not-merge Meta: Do not merge label Oct 31, 2024
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.
@sebastianst sebastianst force-pushed the seb/holocene-fast-safe branch from b113b3e to b92bcc2 Compare October 31, 2024 15:38
@sebastianst sebastianst enabled auto-merge October 31, 2024 15:47
@sebastianst sebastianst added this pull request to the merge queue Oct 31, 2024
Merged via the queue into develop with commit 72c11da Oct 31, 2024
48 checks passed
@sebastianst sebastianst deleted the seb/holocene-fast-safe branch October 31, 2024 16:01
axelKingsley pushed a commit that referenced this pull request Oct 31, 2024
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.
samlaf pushed a commit to samlaf/optimism that referenced this pull request Nov 10, 2024
…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.
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.

3 participants