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-supervisor: cleanup cross-L2 safety types #12098

Merged
merged 2 commits into from
Sep 26, 2024
Merged

Conversation

protolambda
Copy link
Contributor

@protolambda protolambda commented Sep 24, 2024

Description

This:

  • removes cross-finalized/local-finalized difference. Finality depends on cross-safe limited to a view of irreversible L1 blocks. Taking a combination of local-finalized chains is not the same. And having two levels of finality is confusing.
  • make RPC string constants consistent with RPC
  • be explicit about local/cross difference in the Go type naming.

@axelKingsley
Copy link
Contributor

While the explicit local/cross difference is nice, the safety-labels should just match the RPC labels for consistency.

Why not change the RPC labels for explicit local/cross, so that way they're consistent and fully qualified?

@protolambda protolambda requested a review from a team as a code owner September 26, 2024 22:13
Copy link
Contributor

@axelKingsley axelKingsley left a comment

Choose a reason for hiding this comment

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

TY!

@axelKingsley
Copy link
Contributor

I've approved, but some test expectations aren't matching:

mock: Unexpected Method Call
-----------------------------

Emit(engine.PromoteSafeEvent)
                0: engine.PromoteSafeEvent{Ref:eth.L2BlockRef{Hash:0xe7973076740a7c768f5583ea7207491f3ed19154eacb8fdd0a37567e0574a602, Number:0x739a77238d883876, ParentHash:0xf9a03dce23d3e099633bf1ca9ac8d0aad7586969195be733026758119801ed31, Time:0xb74eb752aba9d754, L1Origin:eth.BlockID{Hash:0x0000000000000000000000000000000000000000000000000000000000000000, Number:0x0}, SequenceNumber:0xb07331de8eabee7b}, DerivedFrom:eth.L1BlockRef{Hash:0x8ba9bdc82a6f09b8e0ec2076274673b42410c3af47d6a12187b850ffddc5eadd, Number:0x7a38aca9c395c34f, ParentHash:0x8aa813de57c92a8128804d56e80b332142b9d718d3b5e0dd26198e2da31b24f2, Time:0x86efd31d39c17ab1}}

The closest call I have is: 

Emit(engine.RequestCrossUnsafeEvent)
                0: engine.RequestCrossUnsafeEvent{}


Diff: 0: FAIL:  (engine.PromoteSafeEvent=promote-safe) != (engine.RequestCrossUnsafeEvent=request-cross-unsafe) [recovered]
        panic: 

mock: Unexpected Method Call
-----------------------------

@protolambda protolambda added this pull request to the merge queue Sep 26, 2024
Merged via the queue into develop with commit 0561fd4 Sep 26, 2024
62 of 64 checks passed
@protolambda protolambda deleted the interop-safety-types branch September 26, 2024 22:56
samlaf pushed a commit to samlaf/optimism that referenced this pull request Nov 10, 2024
* op-supervisor: cleanup cross-L2 safety types

* op-node: fix interop test
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.

2 participants