-
Notifications
You must be signed in to change notification settings - Fork 192
feat(tests): add worst-case benchmark for MOD
#1151
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
Conversation
marioevz
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should rather create a marker, e.g.:
@pytest.mark.benchmarkAnd then you can place these tests in tests/frontier/opcodes/ but still select them with uv run fill -m benchmark.
How do you see the clients consuming these tests for benchmarks? Is there a command in evmone to run benchmark state tests?
|
Sorry, I didn't put a proper description of this yet. But here are my thoughts about benchmarks in EEST.
|
|
@chfast I like the idea, and basically everything you mention is somewhat easily doable in EEST. One question, for (6), is there a pass/fail condition? Or is this something that is left to the client test consumer discretion? |
In the example The additional |
MODMOD
|
Adapted to the zkevm task. |
jsign
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left some comments for your consideration, but overall LGTM.
Cycles:
tests/zkevm/test_worst_compute.py::test_worst_mod[fork_Cancun-blockchain_test-mod_bits_63]-1 3918422193
tests/zkevm/test_worst_compute.py::test_worst_mod[fork_Cancun-blockchain_test-mod_bits_255]-1 6321807633
tests/zkevm/test_worst_compute.py::test_worst_mod[fork_Cancun-blockchain_test-mod_bits_127]-1 6559030064
tests/zkevm/test_worst_compute.py::test_worst_mod[fork_Cancun-blockchain_test-mod_bits_191]-1 8734621043
ea4c288 to
426b758
Compare
|
Added also |
Add a worst-case test running a block with as many MOD instructions with arguments of the parametrized range.
marioevz
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks!
Add a worst-case test running a block with as many MOD instructions with arguments of the parametrized range.
ποΈ Description
Add a worst-case test running a block with as many MOD instructions with arguments of the parametrized range.
π Related Issues
#1571
β Checklist
mkdocs servelocally and verified the auto-generated docs for new tests in the Test Case Reference are correctly formatted.