ethereum-optimism / optimism

Optimism is Ethereum, scaled.
https://optimism.io
MIT License
5.56k stars 3.22k forks source link

Interop: cross-safe head verification within L1-view #12075

Open protolambda opened 6 days ago

protolambda commented 6 days ago

The cross-safe depends on view (= known blocks of L1): the L2 blocks have cross-safe dependencies that may only be batch-submitted much later, outside of the current view. The cross-safety updater logic needs to apply these L1-view constraints to cross-L2 safety checks.

We can modify the events-db iterator to conditionally stop, and then bind the conditional iterator to not iterate outside of a L1-view. This way we can pre-fill the database with unsafe L2 blocks, and newer local-safe data, but still perform accurate cross-safe verification that is constrained by a particular set of L1 inputs.

See https://github.com/ethereum-optimism/optimism/pull/12058 for example of conditional iterator.