Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

interop: experimental sequencer executing message check support #372

Draft
wants to merge 3 commits into
base: optimism
Choose a base branch
from

Conversation

protolambda
Copy link
Collaborator

@protolambda protolambda commented Aug 27, 2024

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:

CheckMessages(ctx context.Context, messages []interoptypes.Message, minSafety interoptypes.SafetyLevel) error

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

eth/interop/interop.go Outdated Show resolved Hide resolved
miner/worker.go Show resolved Hide resolved
miner/worker.go Show resolved Hide resolved
core/types/interoptypes/interop.go Show resolved Hide resolved
cmd/utils/flags.go Outdated Show resolved Hide resolved
eth/ethconfig/gen_config.go Outdated Show resolved Hide resolved
miner/worker.go Outdated Show resolved Hide resolved
Includes miner change, to mark invalid interop transactions as rejected
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.

Interop: block building (sequencer update)
2 participants