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

Option to increase or remove stack limit to support coverage computation in foundry #469

Closed
jat9292 opened this issue Apr 25, 2023 · 2 comments

Comments

@jat9292
Copy link

jat9292 commented Apr 25, 2023

Hello, nowadays it is impossible to compute coverage using foundry for many realistic big contrats, because of a stack too deep error, see foundry-rs#3357 - in summary optimization is deactivated during compilation to be able to compute coverage from sourcemap.
My proposition would be to add an option to release or increase the default stack limit set to 1024 as per yellow paper, this would be a quick fix to compute coverage in any useful cases.
I am not sure how to implement this, as a Rust beginner. I see that it is defined at least in two different places : stack and interpreter. I guess it would also make sense to increase the limit of the call stack, because it could also be likely be impacted by optimization.
What do you think about this proposal?

@rakita
Copy link
Member

rakita commented May 18, 2023

Just saw this, apologise for the late response.

It is fine with me, if you are up to it, you can follow how other options_ are added (for example optional_balance_check) and just replace values.

And remove the constant from stack.rs it is leftover from refactoring.

@valo
Copy link
Contributor

valo commented Jun 20, 2023

@jat9292 I believe this is an issue in the solidity compiler, not in revm. This seems to be relevant issue ethereum/solidity#11638

I managed to reproduce the error by running forge coverage on the connext monorepo (https://github.com/connext/monorepo) and it blows up exactly on the compilation step.

I think this issue should be closed.

@rakita rakita closed this as completed Oct 11, 2023
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

3 participants