-
Notifications
You must be signed in to change notification settings - Fork 604
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
Measure Interpreter call stack footprint #305
Comments
This transaction causes the revm to blow the standard stack size: https://etherscan.io/tx/0x0c10fafe0cdbfff32abfe53d57ec861d09986cc1050c850481f79b1a862bb10a It reaches 266 levels of recursion before it blows up. |
Looks like each call is consuming around 7500 bytes of stack. The way I measured this is by tracking the remaining stack using After a CALL opcode there is around 7500 bytes of consumed stack. Still not sure what is the thing that consumes that much stack. I tried to Box the Interpreter as a potential large struct, but it didn't help https://github.com/bluealloy/revm/blob/v24/crates/revm/src/evm_impl.rs#L846 Any ideas are more than welcome 🤔 |
There are even some tests that fail for SO, so it can be easier to find those tests and just call https://github.com/bluealloy/revm/blob/main/bins/revme/src/statetest/runner.rs#L360 edit: By this I mean you can reduce stack size in revme, run full Ethereum tests from https://github.com/ethereum/tests
Oh didn't know about stacker looks nice. 7.5kb per call I would just spread the My best bet was that Interpreted, maybe there are some other variables made inside function, or maybe it is related to function inputs as they are put to stack, but idk. |
Unfortunately |
this is another tx that resulted in an overflow 1024 zero value internal transactions |
lol, someone was live testing evm |
For some tests that call multiple contracts in higher depths, revm has a overflow. It will be great to measure and quantitate where is the place that takes most data and how much does the stack rises with every call.
For info pthread_crate default is around 2-4MB. Check
Notes
here https://man7.org/linux/man-pages/man3/pthread_create.3.htmlThe text was updated successfully, but these errors were encountered: