feat(benchmarks): fix benchmark for SELFDESTRUCT of created accounts for Osaka#1906
Conversation
|
Maybe idea to help quickly debug these (also for sanity check, for instance here check if SELFDESTRUCT is ran a lot of times), use the opcode counter report? #1353 |
@jochem-brouwer , Oh, interesting. Trying this this way:
But I see: This doesn't make much sense to me, since there is no SELFDESTRUCT there. Feels I'm misusing the opcode counter or might have a bug? |
jochem-brouwer
left a comment
There was a problem hiding this comment.
Some more comments 😄 👍
|
RE: opcode counter. This seems to report the wrong block? It's just guessing here, I'd assume Geth is reporting on the wrong block. One of my hunches could be the system contracts (beacon root storing / blockhash storing), but CALLER is only applied once so that does not seem to be the case 🤔 |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## forks/amsterdam #1906 +/- ##
===================================================
+ Coverage 82.61% 86.26% +3.64%
===================================================
Files 417 538 +121
Lines 26862 34557 +7695
Branches 2492 3222 +730
===================================================
+ Hits 22193 29809 +7616
+ Misses 4230 4161 -69
- Partials 439 587 +148
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
7c1e35b to
78c214b
Compare
LouisTsai-Csie
left a comment
There was a problem hiding this comment.
Thanks @jsign and @jochem-brouwer , i add some comments for the root cause of the failing benchmark CI, there is some gas mismatch. After applying the suggested changes it should work as expected for both fill and execute!
|
Regarding the opcode count feature, currently, when filling the tests with Given this, do you think we still need the opcode-count sanity check here? Personally, I think:
That said, if you feel additional checks are still necessary, I’m happy to explore further options here. |
Co-authored-by: 蔡佳誠 Louis Tsai <72684086+LouisTsai-Csie@users.noreply.github.com>
I think as is it should be okay -- eventually we can keep adding checks if we feel they can provide extra safety checks. |
|
@LouisTsai-Csie, applied some extra changes reg the last review -- maybe you want to do a final check before merging! |
LouisTsai-Csie
left a comment
There was a problem hiding this comment.
One more minor suggestion to fix the failing CI!
Ah, I think the comment might get lost? Edit: found the problem, pushed the fix. |
LouisTsai-Csie
left a comment
There was a problem hiding this comment.
Sorry, i indeed missed to submit the suggested changes...
LGTM, thanks a lot
🗒️ Description
This PR fixes the
test_selfdestruct_createdbenchmark to work in Osaka.Filling in this PR for Osaka and Prague for 45M target:
test_system.py::test_selfdestruct_created[fork_Osaka-blockchain_test-value_bearing_False]36M cyclestest_system.py::test_selfdestruct_created[fork_Osaka-blockchain_test-value_bearing_True]36M cyclestest_system.py::test_selfdestruct_created[fork_Prague-blockchain_test-value_bearing_False]37M cyclestest_system.py::test_selfdestruct_created[fork_Prague-blockchain_test-value_bearing_True]36M cyclesAlthough each fork is coherent with the other, felt quite low number of cycles to me. So I debugged in Geth further and got convinced all is good, since saw all the SELFDESTRUCT instructions being executed.
Then remembered two things:
🔗 Related Issues or PRs
#1695
✅ Checklist
toxchecks to avoid unnecessary CI fails, see also Code Standards and Enabling Pre-commit Checks:uvx tox -e statictype(scope):.