-
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
bug: flaky gas snapshot for some fuzz tests #7942
Comments
I run the test and can see 2 different values for fuzzed
there are 2 different fuzzed cased values, run 164
vs
and run 244
vs
which explains why the difference |
@cruzdanilo this happens due to fuzzing from mutated state values which are not deterministic, if adding locally
results are always Can you pls try and check if consistent results? |
Component
Forge
Have you ensured that all of these are up to date?
What version of Foundry are you on?
forge 0.2.0 (467aff3 2024-05-17T00:17:24.004804000Z)
What command(s) is the bug in?
forge snapshot
Operating System
macOS (Apple Silicon)
Describe the bug
for some fuzz tests (not sure which ones), forge fails to generate consistent gas snapshots, even when using the
--force
flag. this prevents it from being relied upon for ci validation (forge snapshot --check
). the same behavior happens on macos (apple silicon) and linux (x86-64).i created a somewhat minimal reproduction repository here: https://github.com/cruzdanilo/foundry-snapshot-repro
this is one output generated by
for i in {1..16}; do forge snapshot --force | grep runs; done
this was run on github ci, here is the report.
The text was updated successfully, but these errors were encountered: