evm-diff icon indicating copy to clipboard operation
evm-diff copied to clipboard

feat: add tests for opcode behavior

Open mds1 opened this issue 1 year ago • 0 comments

For precompiles, we verify their existence with a test case that includes input calldata and an expected response. We should do something similar for opcodes. A few examples of why this is valuable:

  • create/create2 are supported on most chains, but some have different behavior (i.e. deploying to different addresses, like zksync).
  • On L2s, many opcodes behave differently by e.g. returning constants. For examples, see optimism docs and arbitrum docs

Ethereum mainnet should be considered the source of truth for what opcodes are expected to return. When there are deviations in a behavior, the UI should indicate this (for example, color the cell yellow on the /features page)

If feasible, consider reporting on the gas usage as well to facilitate gas comparisons.

cc @fvictorio

mds1 avatar May 20 '24 03:05 mds1