feat(forge): fuzz & invariant config#2882
Merged
Conversation
mattsse
requested changes
Aug 25, 2022
Comment on lines
+157
to
+178
| [fuzz] | ||
| runs = 256 | ||
| max_local_rejects = 1024 | ||
| max_global_rejects = 65536 | ||
| seed = '0x3e8' | ||
| dictionary_weight = 40 | ||
| include_storage = true | ||
| include_push_bytes = true | ||
|
|
||
| [invariant] | ||
| runs = 256 | ||
| depth = 15 | ||
| fail_on_revert = false | ||
| call_override = false | ||
| dictionary_weight = 80 | ||
| include_storage = true | ||
| include_push_bytes = true | ||
|
|
||
| [fmt] | ||
| line_length = 100 | ||
| tab_width = 2 | ||
| bracket_spacing = true |
joshieDo
reviewed
Aug 25, 2022
Collaborator
|
I feel like maybe we need to extend We do use weights for more stuff (wherever there is an |
joshieDo
reviewed
Aug 25, 2022
| // Stores fuzz state for use with [fuzz_calldata_from_state]. | ||
| let fuzz_state: EvmFuzzState = build_initial_state(self.executor.backend().mem_db()); | ||
| let fuzz_state: EvmFuzzState = | ||
| build_initial_state(self.executor.backend().mem_db(), self.config.include_storage); |
Collaborator
There was a problem hiding this comment.
just leaving a note, that if this gets merged #2929 , we should update build_initial_state to reflect that
Collaborator
Author
There was a problem hiding this comment.
yup, i saw that, thanks. waiting for it to get merged to update
Collaborator
Author
|
@joshieDo hmm, from UX standpoint, do u think we should just keep adding |
Collaborator
Author
|
@mattsse since this is a breaking change, do you think it's smth we should fix w/ |
Member
|
given that invariant and fmt were just added and not part of a release yet, this should be fine imo |
mattsse
approved these changes
Aug 25, 2022
2 tasks
iFrostizz
pushed a commit
to iFrostizz/foundry
that referenced
this pull request
Nov 9, 2022
* invariant config * separate fuzz & invariant configs * misc fixes & value config flags * dict weight * fix it tests * fix tests & add validation * fix docs * dapp compatibility * newline * fallback provider * address comments
This file contains hidden or 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
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.
create fuzz & invariant testing configuration discussed in #1572