-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
feat(forge): fuzz & invariant config #2882
Conversation
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.
nice, this looks very good!
[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 |
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.
awesome
I feel like maybe we need to extend We do use weights for more stuff (wherever there is an |
@@ -230,23 +239,28 @@ impl<'a> InvariantExecutor<'a> { | |||
} | |||
|
|||
// 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); |
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.
just leaving a note, that if this gets merged #2929 , we should update build_initial_state
to reflect that
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.
yup, i saw that, thanks. waiting for it to get merged to update
@joshieDo hmm, from UX standpoint, do u think we should just keep adding |
@mattsse since this is a breaking change, do you think it's smth we should fix w/ |
given that invariant and fmt were just added and not part of a release yet, this should be fine imo |
* 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
create fuzz & invariant testing configuration discussed in #1572