ethereum-optimism / optimism

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

Interop Devnet 1 Architecture #11298

Open protolambda opened 3 months ago

protolambda commented 3 months ago

For devnet 1, reorgs are out of scope.

What this really means is that the integration design-doc, with the superchain safe-db, is out of scope.

Yet, we want an architecture that is more forward compatible; to follow up with reorg-support without redoing the stack.

Conceptually, the final supervisor looks like:

To support the “happy path” for devnet 1, we can model this structure as Go interfaces in the op-supervisor, but dramatically simplify a few things:

Then, for devnet 2, we can implement the DA safety-index, implement the write-API, and reorg support, without changing most of the devnet 1 architecture.

axelKingsley commented 3 months ago

[Safety Index] A write API: inserts new data into the index.

I think given the interactions we've defined, there doesn't need to be an explicit write operation for Safe Indexes. When a Chain asks the supervisor for safety information regarding some messages, it can include with it the head it is trying to promote. When the Supervisor builds the response, it can also conditionally update its own view.

No write API in safety-index

Oh, nice 😜 . But I'm thinking that maybe even into the future we don't need this. 🤔 .

Upon global reads, when checking dependencies, just check that the dependencies are older than the latest safe head (RPC block label), rather than using an actual index.

If the dependencies are older than the latest safe head, they may still belong to an invalid chain-split, right?

tynes commented 1 month ago

Some thoughts on the design can be found here: https://www.notion.so/oplabs/Interop-Reasoning-about-Cross-Safety-Management-and-Reorgs-65f2d84c663947e88acfdb7a3023e91b