Skip to content

Fuzz test gas in snapshot off by 1 gas #5689

@matYang

Description

@matYang

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 (b536f51 2023-08-21T00:25:51.452435000Z)

What command(s) is the bug in?

forge snapshot --check

Operating System

Linux

Describe the bug

In our CI workflow using Github actions:

      - name: Install Foundry
        uses: foundry-rs/foundry-toolchain@v1
        with:
          version: nightly

We check the present snapshot with forge snapshot --check {{snapshot}}.
This step is failing due to 1 fuzz test result:
Diff in "...(address,address,uint96)": consumed "(runs: 256, μ: 213572, ~: 213547)" gas, expected "(runs: 256, μ: 213573, ~: 213548)"

The gas measured during CI is consistently lower by 1 than our local machine, i.e. 213572 vs 213573, and 213547 vs 213548.

We are using default number of fuzz runs.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    Completed

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions