feat: 10k runs for fuzz in deep profile#1663
Open
dry914 wants to merge 4 commits intofeat/fuzzing-updatedfrom
Open
feat: 10k runs for fuzz in deep profile#1663dry914 wants to merge 4 commits intofeat/fuzzing-updatedfrom
dry914 wants to merge 4 commits intofeat/fuzzing-updatedfrom
Conversation
Hardhat Unit Tests Coverage SummaryDetailsDiff against masterResults for commit: c60ff64 Minimum allowed coverage is ♻️ This comment has been updated with latest results |
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a “deep” Foundry profile intended for extended fuzzing/invariant campaigns, and cleans up inline forge-config overrides across the test suite to rely more on profile defaults.
Changes:
- Added Foundry profiles/config in
foundry.tomlfor deep fuzz/invariant runs (10,000). - Removed several inline
default.*.runsoverrides from fuzz and invariant tests. - Increased
default.fuzz.max-test-rejectsfor twoGIndexfuzz tests to tolerate highvm.assumerejection rates.
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
foundry.toml |
Introduces profile.deep fuzz/invariant runs and sets default invariant settings. |
test/common/signatureUtils.t.sol |
Removes inline fuzz runs overrides. |
test/common/minFirstAllocationStrategy.t.sol |
Removes inline invariant runs overrides. |
test/common/math256.t.sol |
Removes inline fuzz runs overrides. |
test/common/lib/GIndex.t.sol |
Adds higher fuzz max-test-rejects for rejection-heavy fuzz tests. |
test/0.8.9/withdrawalQueue.t.sol |
Removes inline invariant runs overrides (keeping depth/fail-on-revert). |
test/0.8.9/unstructuredStorage.t.sol |
Removes inline fuzz runs overrides. |
test/0.8.9/beaconChainDepositor.t.sol |
Adjusts invariant inline config (depth) and removes runs override. |
test/0.8.25/vaults/refSlotCache/refSlotCache.t.sol |
Removes inline invariant runs/depth overrides. |
test/0.8.25/invariant-fuzzing/StakingVaultsFuzzing.t.sol |
Removes inline invariant runs/depth overrides. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
4b3bbcc to
0d2d8c5
Compare
tamtamchik
approved these changes
Mar 3, 2026
chore: bump forge-std to v1.13.0 and split ci fuzzing flows
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add deep Foundry profile for 10,000 fuzzing runs certification.
Context
The project has invariant and fuzz tests across multiple contracts with various inline
forge-configoverrides for runs, depth, and other settings. Currently all tests run with default settings (256 invariant runs, standard fuzz runs), with no standardized way to run extended fuzzing campaigns.Solution
foundry.toml: Added[profile.deep.fuzz]and[profile.deep.invariant]sections withruns = 10000.Inline config cleanup across all test files:
default.*.runswhere the value matched toml defaults (2048 inmath256,signatureUtils,unstructuredStorage; 256 inwithdrawalQueue; 32/128 inrefSlotCache)default.*.runsonly where intentionally different:beaconChainDepositor(32 — expensive per call),positiveTokenRebaseLimiter(65536),BLS(204800/10000)deep.invariant.runs = 10000only inbeaconChainDepositorwhere inlinedefault.invariant.runs = 32would block deep profilebeaconChainDepositordepth to 4 (single handler function, depth doesn't add coverage)max-test-rejects = 1000000to twoGIndexfuzz tests that reject ~88% of inputs viavm.assumeRun:
FOUNDRY_PROFILE=deep forge test(~41 min wall time)