-
Notifications
You must be signed in to change notification settings - Fork 564
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
optimize stack usage for recursive call
and create
programs
#522
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This makes the stack footprint of the solidity function calls much smaller
Simplification of the functions ensures that the stack is being kept more lean. Also boxed some variables. These changes allow running the currently blowing transactions with the default stack size.
valo
force-pushed
the
stack-memory-profiling
branch
from
June 19, 2023 09:13
3c59bc4
to
5e41ba3
Compare
valo
force-pushed
the
stack-memory-profiling
branch
from
June 19, 2023 09:16
ef24838
to
d9775e8
Compare
rakita
reviewed
Jun 21, 2023
rakita
reviewed
Jun 21, 2023
rakita
reviewed
Jun 21, 2023
rakita
reviewed
Jun 21, 2023
rakita
reviewed
Jun 21, 2023
rakita
reviewed
Jun 21, 2023
rakita
reviewed
Jun 21, 2023
rakita
reviewed
Jun 21, 2023
rakita
approved these changes
Jun 21, 2023
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.
This looks great! Left a few comments but there are mostly related to moving some code, nothing serious, very nice PR!
These functions does not impact the stack memory footprint
The bytecode is included in the returned contract, so there is no need to return it.
valo
force-pushed
the
stack-memory-profiling
branch
from
June 27, 2023 16:08
e5ebc51
to
1ed97ca
Compare
This was referenced Mar 8, 2024
Merged
This was referenced Mar 22, 2024
Closed
Closed
Closed
Merged
This was referenced Apr 2, 2024
Merged
This was referenced Apr 16, 2024
This was referenced May 2, 2024
Closed
This was referenced May 13, 2024
Closed
Closed
Closed
Closed
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #305
With these changes the EVM state tests does not require increased stack in release mode. In debug mode, the stack need to be setup to 3MB.
The changes are in the
create
andcall
EVM implementations and optimize the stack usage of these code paths. The code is broken down into smaller functions, so that the stack memory footprint is kept low. Some of the larger parameters are moved to the heap using boxing.