Repository navigation
Conversation
AztecBot
force-pushed
the
cb/foundry-1.8.5-lint
branch
from
October 6, 2026 18:49
fc22e0b to
9499480
Compare
iAmMichaelConnor
added this pull request to stack #25610
October 7, 2026 08:57
This branch has not been deployed
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.
Summary
Stacked on #25602 (base branch
cb/foundry-1.8.5). Bringsforge lintunder Foundry 1.8.5 from 245 warnings to zero inl1-contracts, without changing any deployed bytecode.test/+script/(environment-read-across-mutation)block.timestamp/block.numberreads in functions that alsovm.warp/vm.rollnow usevm.getBlockTimestamp()/vm.getBlockNumber(), which is what the lint asks for (the optimizer may reuse an environment read across the cheatcode). 84 lines in 33 files.src/policy lints (block-timestamp,require-revert-in-loop,calls-loop,reentrancy-events,missing-zero-check)foundry.toml[lint], each with a one-line reason: slot timing is timestamp-based by design; committee loops check and call per member on purpose; events are emitted after the calls they describe with state already settled; the zero-address sites are constructor/governance wiring.src/correctness lints (unsafe-typecast25,unused-return10,uninitialized-local11,empty-block3,erc20-unchecked-transfer2,reentrancy-no-eth,encode-packed-collision,missing-events-*2)// forge-lint: disable-next-item(...)preceded by a comment stating why it is safe (bounds, storage width, guard above, intentional truncation). Sevenuninitialized-localsites got an explicit= 0initialiser where that is bytecode-neutral; the four inSlashingProposerare suppressed instead because an explicit initialiser there changes the emitted code by one byte.lint_on_buildstays on, soforge buildis now quiet.Verification (Foundry 1.8.5 binaries)
forge lint/forge build: 0 warnings (was 245).forge fmt --check: clean. All 41 directives are on their own line (fmt's comment wrapping merges a directive into a preceding long comment, which silently disables it; two such cases were caught and fixed).src/contracts byte-by-byte. Outside CBOR metadata hashes (which change with any source text), there are no differences. The lint PR does not alter what gets deployed.forge test: 1383 passed, 0 failed, 3 skipped, in six separate full runs on this tree, including one with the Osaka EVM target the base branch now uses.solhint: unchanged.Judgement calls for review
unused-returnonapprove(...)(StakingLib ×2, GSE ×2, MultiAdder): suppressed on the stated assumption that the staking asset is the protocol's OZ ERC20 (returns true or reverts). If a non-OZ asset is ever plausible,forceApproveis the real fix, at a bytecode cost.encode-packed-collisioninSlashingProposer._preparePayloadDataAndAddress: suppressed becausevalidatorsandamountsare both sized byactionCountbehind a fixed 32-byte round prefix, so the packed layout cannot be ambiguous. Worth a second pair of eyes since it is a hashing site.missing-events-*(GSE.addRollup, Inbox.markProvenConsumed): suppressed rather than adding events, to keep bytecode identical. Adding events is a product decision.Created by claudebox · group:
slackbot· requested by Mike (@iAmMichaelConnor) · Slack thread