-
Notifications
You must be signed in to change notification settings - Fork 39
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
Add support for optimization mode #75
Conversation
…g considerations: - optimization functions can have a different prefix that can be configred in init mode - optimization test functions should be view/pure - optimization test cases fail in case of an error in EVM call - optimization test cases never without if there is no err anywhere - print a message for passed test cases which shows final optimized value - unit test cases are not yet implemented, manual local testing is done
Seems like there is race condition in the value being computed because the same value is updated by all the workers. I think ideally we should have an instance of value for every worked index and reset it on Looking through the code I also see that that Update: I have fixed it with the mutex for now |
@tarunbhm do you want to go ahead and update this PR with the latest master branch? Happy to get this merged ASAP. Apologies for the delay. |
I'm taking care of this. It seems that it should be ready for another review. I added some code to actually show the sequence of transactions that maximized certain function (otherwise, it was not useful, since these tests should never fail) |
…71-optimization-mode
…the function is read-only
Hey @tarunbhm + @ggrieco-tob so I did a review of this PR and I added the capability to shrink a call sequence that optimized the test case's value. This was something that was missing from the PR. However, during this development I realized that we will have to put this PR on hold for now b/c of the inefficiency of the call sequence shrinking. The reason it is inefficient is because every time the value is maximized, we send a shrink request. however, after the shrinking is done, we do not mark the test case as failed b/c the next call or call sequence could in fact maximize the value even more. Then, another computationally intensive shrink request can be triggered on the next call in the call sequence. Thus, optimization mode doesn't really have a "stop" - it keeps going as long as the fuzzer keeps going. Since we cannot do a one-time shrink request at the moment, this PR will have to be on hold. Ideally, we could call |
…only constraint on property mode
integrate optimization mode into fuzzer
closes #71