You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When running forge snapshot, fuzz seed as defined in foundry.toml is not honored. When passing it in as an env variable via FOUNDRY_FUZZ_SEED, it works fine.
behavior:
in foundry.toml, I've set
[fuzz]
runs = 100
seed = 0x4444
When running forge snapshot, it works fine and uses 100 runs. Then I set the seed in the environment with
FOUNDRY_FUZZ_SEED=0x4444 forge snapshot and it results in a different snapshot file. I would expect this to be the same seed as set in foundry.toml.
This causes a problem in CI where locally run snapshots do not match CI-run snapshots unless environment variable seed is set.
Reference PR from uniswap/v4-core where we had to set fuzz seed in env Uniswap/v4-core#331
The text was updated successfully, but these errors were encountered:
nvm after more research seems the static seed works fine, i think the issue is diff rng between mac vs linux? i.e. when running on local linux machine vs linux CI it works but mac local vs linux CI fails
Component
Forge
Have you ensured that all of these are up to date?
What version of Foundry are you on?
forge 0.2.0 (94ae897 2023-10-31T00:16:51.730405056Z)
What command(s) is the bug in?
forge snapshot
Operating System
Linux
Describe the bug
When running
forge snapshot
, fuzz seed as defined in foundry.toml is not honored. When passing it in as an env variable viaFOUNDRY_FUZZ_SEED
, it works fine.behavior:
in foundry.toml, I've set
When running
forge snapshot
, it works fine and uses 100 runs. Then I set the seed in the environment withFOUNDRY_FUZZ_SEED=0x4444 forge snapshot
and it results in a different snapshot file. I would expect this to be the same seed as set in foundry.toml.This causes a problem in CI where locally run snapshots do not match CI-run snapshots unless environment variable seed is set.
Reference PR from uniswap/v4-core where we had to set fuzz seed in env Uniswap/v4-core#331
The text was updated successfully, but these errors were encountered: