ethereum-optimism / optimism

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

Interop: block building #10891

Open tynes opened 4 months ago

tynes commented 4 months ago

Update the block building code in op-geth to use the superchain backend to validate executing messages. It should work with unsafe messages since we are optimizing for low latency.

This looks like adding an RPC client for op-supervisor into the op-geth block building code here that drops transactions that include invalid executing messages. If a block is built that includes an invalid executing message, it will result in the block being considered invalid. See https://github.com/ethereum-optimism/specs/discussions/128#discussioncomment-9811556 for some thoughts on the topic.

On PBS API

We want to add in a PBS API per https://github.com/ethereum-optimism/specs/pull/116. We don't need to utilize the PBS API as part of interop directly. If we did want to utilize it, we would fork op-geth into op-geth-interop and add the block building code there and then use that geth to build blocks. This seems like it just adds extra infra + dev requirements that aren't necessary, its easier to just add the diff to op-geth directly

axelKingsley commented 4 days ago

We want to add in a PBS API per https://github.com/ethereum-optimism/specs/pull/116. We don't need to utilize the PBS API as part of interop directly. If we did want to utilize it, we would fork op-geth into op-geth-interop and add the block building code there and then use that geth to build blocks. This seems like it just adds extra infra + dev requirements that aren't necessary, its easier to just add the diff to op-geth directly

Totally agree, PBS would be the location for this work, but wouldn't change the work significantly.

Another way of framing this is that filtering out invalid "executing messages" is a matter of protocol, not of policy. Therefore, delivering only protocol-acceptable transactions to the block builder is a concern which lives outside of the block builder.