ethereum-optimism / ethereum-optimism/optimism

test(kona-proof-interop): cover deposit-only block re-execution

Open
#21,798 0 comments 0 reactions 0 assignees View on GitHub
proofs: ZK
Dominant language
Go
Stars
6.5k
Forks
4k
Avg merge
2d 15h
Merged PRs (30d)
145

Description

The `kona-interop` unit tests thoroughly cover detecting invalid executing messages and cyclic dependencies. Native Kona acceptance tests also exercise invalid-block replacement end to end. However, there is no focused test in `kona-proof-interop` that verifies what happens after `MessageGraph` reports an invalid block.

Add a unit test around `SuperchainConsolidator::consolidate` that constructs an invalid executing message and verifies that the affected optimistic block is re-executed using only deposit transactions. The test should confirm that the pending transition state is updated with the replacement block and output root, and that consolidation completes after excluding the replaced chain from further message validation.

We just need to mock an in-memory oracle and minimal trie fixture to do this. The test does not need to reproduce the full host or fault-proof environment; those remain covered by the acceptance tests.

Contributor guide

Open the contributing guide

Research direction

Start in the kona-proof-interop unit tests and inspect SuperchainConsolidator::consolidate together with MessageGraph handling. Build the mentioned in-memory oracle and minimal trie fixture, then verify that an invalid executing message causes deposit-only re-execution, updates the pending transition with the replacement block and output root, and allows consolidation to finish after excluding the replaced chain.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
blockchain, testing
Issue type
Refactor
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.