Skip to content

bug: vm.blobHashes cheatcode incompatible with --gas-report/--isolate option #10074

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

Open
2 tasks done
just-mitch opened this issue Mar 13, 2025 · 1 comment
Open
2 tasks done
Labels
C-forge Command: forge T-bug Type: bug

Comments

@just-mitch
Copy link

Component

Forge

Have you ensured that all of these are up to date?

  • Foundry
  • Foundryup

What version of Foundry are you on?

forge Version: 1.0.0-stable Commit SHA: e144b82 Build Timestamp: 2025-02-13T20:02:34.979686000Z (1739476954) Build Profile: maxperf

What version of Foundryup are you on?

foundryup: 1.0.0

What command(s) is the bug in?

forge test --gas-report

Operating System

macOS (Apple Silicon)

Describe the bug

Example Repo https://github.com/just-mitch/forge-blob-gas-report-issue

forge test works fine, but --gas-report or --isolate gives an evm revert.

Seems related to #7277

Also experienced on linux amd64.

@just-mitch just-mitch added T-bug Type: bug T-needs-triage Type: this issue needs to be labelled labels Mar 13, 2025
@github-project-automation github-project-automation bot moved this to Todo in Foundry Mar 13, 2025
@mattsse
Copy link
Member

mattsse commented Mar 13, 2025

ref #9941

LHerskind pushed a commit to AztecProtocol/aztec-packages that referenced this issue Mar 14, 2025
## Gas Reports

You can run `./bootstrap.sh gas_report` to generate a detailed gas
report for the current state and update the gas_report.md file.

When running CI or tests with `./bootstrap.sh test`, the script will
automatically check if gas usage has changed by running `./bootstrap.sh
gas_report check`. If gas usage has changed, the test will fail and show
a diff of the changes.

If the changes in gas usage are expected and desired:

1. Review the diff shown in the output
2. Run `./bootstrap.sh gas_report` to update the gas report file
3. Commit the updated gas_report.md file

NOTE: Our gas reporting excludes certain tests due to Forge limitations:

- FeeRollupTest and MinimalFeeModelTest test suites are excluded
- testInvalidBlobHash and testInvalidBlobProof test cases are excluded

This is related to [this Foundry
issue](foundry-rs/foundry#10074).

This means that we don't report gas for blob validation (currently 50k
gas per blob, and we use 3 blobs per propose in production).

If you want to run gas reports directly with `forge`, you must use the
environment variable `FORGE_GAS_REPORT=true` instead of the
`--gas-report` flag. The `./bootstrap.sh gas_report` command does this
for you automatically.
@grandizzy grandizzy added C-forge Command: forge and removed T-needs-triage Type: this issue needs to be labelled labels Mar 14, 2025
@grandizzy grandizzy marked this as a duplicate of #10365 Apr 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-forge Command: forge T-bug Type: bug
Projects
Status: Todo
Development

No branches or pull requests

3 participants