interop: experimental sequencer executing message check support #372
+323
−2
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
As sequencer (i.e. when
noTxs == false
), and when interop is active, make the block-building code-path check executing message logs with the interop RPC. And revert the tx otherwise.If block building runs out of time to check the interop RPC, then quit the block building loop.
Note: changed the RPC to
interop_checkMessages
, with signature:Since some transactions may consume multiple interop messages, and it's more efficient to check them in batches.
Long term I'd like to replace this with a streaming protocol, with optimized message entries, attached to the block-building with a tracer hook, but for now this works well enough at a per-tx level.
When the executing messages of a tx are checked, and when they appear to be invalid, the tx is marked as rejected (using the new conditional-tx functionality), which should cause it to drop out of the tx-pool, so that it's not considered for building of future blocks (unless re-submitted, which should be rate-limited outside of the sequencer).
Tests
Work in progress. This is a draft for monorepo integration tests to build on top of.
Metadata
Fix ethereum-optimism/optimism#10891