-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Closed
Labels
T-bugType: bugType: bug
Description
Component
Forge
Have you ensured that all of these are up to date?
- Foundry
- Foundryup
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
[PASS] test_snapshot((bytes,bytes,uint256,uint256,uint256)) (runs: 256, μ: 407539, ~: 408263)
[PASS] test_snapshot((bytes,bytes,uint256,uint256,uint256)) (runs: 256, μ: 407539, ~: 408263)
[PASS] test_snapshot((bytes,bytes,uint256,uint256,uint256)) (runs: 256, μ: 407518, ~: 408251)
[PASS] test_snapshot((bytes,bytes,uint256,uint256,uint256)) (runs: 256, μ: 407518, ~: 408251)
[PASS] test_snapshot((bytes,bytes,uint256,uint256,uint256)) (runs: 256, μ: 407518, ~: 408251)
[PASS] test_snapshot((bytes,bytes,uint256,uint256,uint256)) (runs: 256, μ: 407518, ~: 408251)
[PASS] test_snapshot((bytes,bytes,uint256,uint256,uint256)) (runs: 256, μ: 407539, ~: 408263)
[PASS] test_snapshot((bytes,bytes,uint256,uint256,uint256)) (runs: 256, μ: 407539, ~: 408263)
[PASS] test_snapshot((bytes,bytes,uint256,uint256,uint256)) (runs: 256, μ: 407518, ~: 408251)
[PASS] test_snapshot((bytes,bytes,uint256,uint256,uint256)) (runs: 256, μ: 407518, ~: 408251)
[PASS] test_snapshot((bytes,bytes,uint256,uint256,uint256)) (runs: 256, μ: 407518, ~: 408251)
[PASS] test_snapshot((bytes,bytes,uint256,uint256,uint256)) (runs: 256, μ: 407518, ~: 408251)
[PASS] test_snapshot((bytes,bytes,uint256,uint256,uint256)) (runs: 256, μ: 407539, ~: 408263)
[PASS] test_snapshot((bytes,bytes,uint256,uint256,uint256)) (runs: 256, μ: 407539, ~: 408263)
[PASS] test_snapshot((bytes,bytes,uint256,uint256,uint256)) (runs: 256, μ: 407518, ~: 408251)
[PASS] test_snapshot((bytes,bytes,uint256,uint256,uint256)) (runs: 256, μ: 407518, ~: 408251)
this was run on github ci, here is the report.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
T-bugType: bugType: bug