Skip to content

Fuzz Default Runs 257 Instead of 256 #7497

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Closed
pcaversaccio opened this issue Mar 26, 2024 · 7 comments · Fixed by #7809
Closed

Fuzz Default Runs 257 Instead of 256 #7497

pcaversaccio opened this issue Mar 26, 2024 · 7 comments · Fixed by #7809

Comments

@pcaversaccio
Copy link
Contributor

Not sure if this is a small bug or intended, but I realised that the latest default fuzz runs used for forge snapshot got changed to 257 instead 256. My forge version I used: forge 0.2.0 (88e09f6f 2024-03-24T18:44:00.248018000Z)

image

https://github.com/pcaversaccio/snekmate/pull/219/files#diff-11538116afca6cc6a316ec7e5532f95ee5b404085a676b3d186ac5776ef99712

@pcaversaccio pcaversaccio changed the title Fuzz Default Runs 257 instead of 256 Fuzz Default Runs 257 Instead of 256 Mar 26, 2024
@grandizzy
Copy link
Collaborator

it depends if you had a previous failed run it is now saved in cache/fuzz/failed dir and regression replayed on subsequent runs

@grandizzy
Copy link
Collaborator

hey @pcaversaccio could you pls check comment above and lmk if that's the case? Thank you!

@pcaversaccio
Copy link
Contributor Author

hey @pcaversaccio could you pls check comment above and lmk if that's the case? Thank you!

Well, now I have e.g. 264 runs: https://github.com/pcaversaccio/snekmate/blob/modules/.gas-snapshot#L3. This happened when I integrated Echidna into snekmate contracts: pcaversaccio/snekmate#239. I'm not sure if this makes any sense now.

@grandizzy
Copy link
Collaborator

grandizzy commented Apr 29, 2024

hey @pcaversaccio could you pls check comment above and lmk if that's the case? Thank you!

Well, now I have e.g. 264 runs: https://github.com/pcaversaccio/snekmate/blob/modules/.gas-snapshot#L3. This happened when I integrated Echidna into snekmate contracts: pcaversaccio/snekmate#239. I'm not sure if this makes any sense now.

It makes sense if you have the cache/fuzz/failed not empty on the machine you collected gas snapshot from (as failures / regressions accumulate and are replayed before the new campaign starts)

See #7206 (comment) for an example

@pcaversaccio
Copy link
Contributor Author

It makes sense if you have the cache/fuzz/failed not empty on the machine you collected gas snapshot from (as failures / regressions accumulate and are replayed before the new campaign starts)

I usually run forge clean before I generate a new .gas-snapshot file, that's why I'm confused. But your overall explanation makes sense, sure.

@grandizzy
Copy link
Collaborator

Oh, yeah, just tried it and forge clean doesn't remove the failures file, will address this issue in a fix

@pcaversaccio
Copy link
Contributor Author

Oh, yeah, just tried it and forge clean doesn't remove the failures file, will address this issue in a fix

Great, that will fix this issue :)

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants