Skip to content

op-supervisor: Cross-safe updates [rebased]#12624

Merged
protolambda merged 6 commits intodevelopfrom
cross-safe-updates-new
Oct 25, 2024
Merged

op-supervisor: Cross-safe updates [rebased]#12624
protolambda merged 6 commits intodevelopfrom
cross-safe-updates-new

Conversation

@protolambda
Copy link
Copy Markdown
Contributor

@protolambda protolambda commented Oct 24, 2024

Description

The cross-safe update routines part, and some integration fixes, of #12460

Based on top of #12623

Tests

Additional context

Metadata
Commits in Squash (copied from commit body):
op-supervisor: experimental cross-safety, with hazard detection
tweak: Add some errors/error returns in backend/cross.
wip: Chain index <> ID mapping.
fix: Check parent instead of re-checking hazardBlock.
Remove Hazard Work
Write missing DB Bindings OpenBlock, LocallyDerivedFrom, CrossDerivedFrom
Configurable WorkFn for Workers
op-supervisor: move chain-index <> chain ID translation into dependency set, fix some interfaces
op-supervisor: update cross-safety worker routine
op-supervisor: update more error handling
op-supervisor: move errors to types package
op-supervisor: check CanExecuteAt and CanInitiateAt
op-supervisor: determine cross-safe candidate and L1 scope, and more fixes
todo L1 scope increment
op-supervisor: cross-safe L1 scope bump
op-supervisor: dependency set getter
op-supervisor: L1 scope increment fix
op-supervisor: fix cross-safe updates typing
op-node: signal L1 traversal of derivation to supervisor
op-supervisor: fromda fixes and tests
op-supervisor: fix OpenBlock, fix/add missing interface methods, hook up cross-safe worker routines
OpenBlock to return map[uint32]ExecutingMessage
Add Frontier Unit Tests
fix WithParent panic
op-node: register L1 traversal with op-supervisor
op-node,op-supervisor: add logging, temp work around for interop local-safe updates
Add safe_start_test, unsafe_start_test
Add safe_update_test and unsafe_update_test
add worker_test
op-supervisor: fix cross-safe L1 scope bumping
op-supervisor: fix logs DB test

@protolambda protolambda added this to the Interop: Devnet MVP milestone Oct 24, 2024
@protolambda protolambda requested review from a user and axelKingsley October 24, 2024 14:44
Base automatically changed from op-supervisor-depset to develop October 24, 2024 16:46
op-supervisor: experimental cross-safety, with hazard detection

tweak: Add some errors/error returns in backend/cross.

wip: Chain index <> ID mapping.

fix: Check parent instead of re-checking hazardBlock.

Remove Hazard Work

Write missing DB Bindings OpenBlock, LocallyDerivedFrom, CrossDerivedFrom

Configurable WorkFn for Workers

op-supervisor: move chain-index <> chain ID translation into dependency set, fix some interfaces

op-supervisor: update cross-safety worker routine

op-supervisor: update more error handling

op-supervisor: move errors to types package

op-supervisor: check CanExecuteAt and CanInitiateAt

op-supervisor: determine cross-safe candidate and L1 scope, and more fixes

todo L1 scope increment

op-supervisor: cross-safe L1 scope bump

op-supervisor: dependency set getter

op-supervisor: L1 scope increment fix

op-supervisor: fix cross-safe updates typing

op-node: signal L1 traversal of derivation to supervisor

op-supervisor: fromda fixes and tests

op-supervisor: fix OpenBlock, fix/add missing interface methods, hook up cross-safe worker routines

OpenBlock to return map[uint32]ExecutingMessage

Add Frontier Unit Tests

fix WithParent panic

op-node: register L1 traversal with op-supervisor

op-node,op-supervisor: add logging, temp work around for interop local-safe updates

Add safe_start_test, unsafe_start_test

Add safe_update_test and unsafe_update_test

add worker_test

op-supervisor: fix cross-safe L1 scope bumping

op-supervisor: fix logs DB test

Co-authored-by: axelKingsley <axel.kingsley@gmail.com>
Co-authored-by: Tyler Smith <mail@tcry.pt>
@axelKingsley axelKingsley force-pushed the cross-safe-updates-new branch from a8a0812 to fd55193 Compare October 24, 2024 18:32
Copy link
Copy Markdown
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.

Annotating as I go:

  • LocalSafeUpdateEvents are now described as InteropPendingSafeChangedEvents, and the LastL2 informs the Ref
  • Processors in the backend 👍 (I am already very familiar with this)
  • Hazard*FrontierChecks 👍
  • Cross*Hazards 👍
  • Cross*Update 👍
  • Worker 👍

I wrote unit tests across all the cross package, so I am already familiar with its behavior and functionality. There is an issue with changed expectations in an Action Test which need to be fixed, but besides that this LGTM 🚀 .

@semgrep-app
Copy link
Copy Markdown
Contributor

semgrep-app bot commented Oct 25, 2024

Semgrep found 3 sol-style-malformed-revert findings:

  • packages/contracts-bedrock/test/universal/Proxy.t.sol
  • packages/contracts-bedrock/test/mocks/Callers.sol
  • packages/contracts-bedrock/test/invariants/FaultDisputeGame.t.sol

Malformed revert statement style.

Ignore this finding from sol-style-malformed-revert.

Semgrep found 9 sol-style-malformed-require findings:

  • packages/contracts-bedrock/test/safe-tools/CompatibilityFallbackHandler_1_3_0.sol
  • packages/contracts-bedrock/test/invariants/OptimismSuperchainERC20/helpers/MockL2ToL2CrossDomainMessenger.t.sol
  • packages/contracts-bedrock/test/invariants/OptimismSuperchainERC20/handlers/Protocol.t.sol
  • packages/contracts-bedrock/test/dispute/FaultDisputeGame.t.sol
  • packages/contracts-bedrock/test/dispute/AnchorStateRegistry.t.sol
  • packages/contracts-bedrock/test/L2/GasPriceOracle.t.sol
  • packages/contracts-bedrock/test/L1/SystemConfigInterop.t.sol

"Hash not approved" Malformed require statement style.

Ignore this finding from sol-style-malformed-require.

@protolambda protolambda added this pull request to the merge queue Oct 25, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Oct 25, 2024
@protolambda protolambda enabled auto-merge October 25, 2024 13:40
@protolambda protolambda added this pull request to the merge queue Oct 25, 2024
Merged via the queue into develop with commit da4c33c Oct 25, 2024
@protolambda protolambda deleted the cross-safe-updates-new branch October 25, 2024 13:55
samlaf pushed a commit to samlaf/optimism that referenced this pull request Nov 10, 2024
* op-supervisor: cross-safe-updates PR squashed

op-supervisor: experimental cross-safety, with hazard detection

tweak: Add some errors/error returns in backend/cross.

wip: Chain index <> ID mapping.

fix: Check parent instead of re-checking hazardBlock.

Remove Hazard Work

Write missing DB Bindings OpenBlock, LocallyDerivedFrom, CrossDerivedFrom

Configurable WorkFn for Workers

op-supervisor: move chain-index <> chain ID translation into dependency set, fix some interfaces

op-supervisor: update cross-safety worker routine

op-supervisor: update more error handling

op-supervisor: move errors to types package

op-supervisor: check CanExecuteAt and CanInitiateAt

op-supervisor: determine cross-safe candidate and L1 scope, and more fixes

todo L1 scope increment

op-supervisor: cross-safe L1 scope bump

op-supervisor: dependency set getter

op-supervisor: L1 scope increment fix

op-supervisor: fix cross-safe updates typing

op-node: signal L1 traversal of derivation to supervisor

op-supervisor: fromda fixes and tests

op-supervisor: fix OpenBlock, fix/add missing interface methods, hook up cross-safe worker routines

OpenBlock to return map[uint32]ExecutingMessage

Add Frontier Unit Tests

fix WithParent panic

op-node: register L1 traversal with op-supervisor

op-node,op-supervisor: add logging, temp work around for interop local-safe updates

Add safe_start_test, unsafe_start_test

Add safe_update_test and unsafe_update_test

add worker_test

op-supervisor: fix cross-safe L1 scope bumping

op-supervisor: fix logs DB test

Co-authored-by: axelKingsley <axel.kingsley@gmail.com>
Co-authored-by: Tyler Smith <mail@tcry.pt>

* op-node: fix interop deriver test

* op-e2e: fix interop action test

* op-supervisor: improve map init

* op-node: link interop TODO comment to issue, in engine events emitter

* op-supervisor: cleanup Worker instances of tests

---------

Co-authored-by: axelKingsley <axel.kingsley@gmail.com>
Co-authored-by: Tyler Smith <mail@tcry.pt>
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