ethereum-optimism / ethereum-optimism/optimism

op-challenger: Enhance run-trace subcommand to check EVM step result

Open
#11,400 0 comments 0 reactions 0 assignees View on GitHub
A-op-challenger
Dominant language
Go
Stars
6.5k
Forks
4k
Avg merge
2d 18h
Merged PRs (30d)
134

Description

`op-challenger run-trace` subcommand allows repeatedly running VM implementations to verify real chain data as part of continuously testing that the VM and fault proof program correctly validate the chain. However this only tests the native implementation of the FP VM, not the EVM version.

Given the EVM version is significantly slower, executing every instruction in the EVM isn't realistic, however executing a sampling of transactions would be viable.

* Add a `--evm-execution-interal` option to the `run-trace` subcommand to allow users to specify an interval to execute EVM instructions and confirm they match the native result. This should accept an integer - ie 10000 to execute every 10,000th step in the EVM
* Adapt the execution of of the VM to create a proof file at the specified interval
* For each proof file, execute it using the on-chain VM (the use the actual `vm()` deployed on chain)
* Skip executing steps that require a preimage (to avoid having to pay to upload the preimage)

Contributor guide

Open the contributing guide

Research direction

Start at the run-trace subcommand and trace how the native VM executes chain data and produces proof files. Define the EVM execution interval, then verify each eligible proof with the on-chain vm() while skipping steps that require a preimage; done means sampled EVM results are checked against the native result.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
blockchain, testing-qa
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.