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

Improve evmzero unit-testing. #494

Open
LuisPH3 opened this issue Jun 4, 2024 · 0 comments
Open

Improve evmzero unit-testing. #494

LuisPH3 opened this issue Jun 4, 2024 · 0 comments
Milestone

Comments

@LuisPH3
Copy link
Contributor

LuisPH3 commented Jun 4, 2024

The interpreter unit test presents a series of issues:

It assumes instruction behavior is Istanbul unless other is specified. This assumption has leaked some untested behaviors, namely the different semantics for SELFDESTRUCT across Istanbul, Berlin, & London.
It is 5000+ plus lines, turns difficult to maintain. And it takes a long time to compile as well.

A replacement should, at least:

  • Test the normal operation for each instruction on each Revision.
  • Use fixtures/parametrized tests to avoid repetition. This could be tricky with Mocks.
  • Multiple files

From @HerbertJordan feedback:

  • it needs to be a structured approach; just having test defined for each pair of operation and revision is not sufficient; value-parameterized tests may be an option
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

No branches or pull requests

2 participants