Skip to content

Conversation

@0xrusowsky
Copy link

@0xrusowsky 0xrusowsky commented Jun 13, 2025

Motivation

foundry v1.2 upgraded to the newest revm version, which introduced breaking changes related to the max block time —reduced from max(uint256) to max(uint64)—.

additionally, during the following months, improving foundry's testing support will be once of the main goals. Because of that i'm trying to build a benchmarking tool, that runs tests on state-of-the-art repos, to track the performance between foundry versions. Ideally this PR gets merged and wouldn't have to point to our own fork.

Implementation

  • bounds all the fuzz tests that use uint256 deadline to type(uint64).max - 1
  • adds helper functions to tests that fail to catch the reverts cause the compiler seems to inline (and thus the revert happens in the same frame)

@kasperpawlowski
Copy link
Collaborator

@0xrusowsky would you mind checking why the above are failing?

@0xrusowsky
Copy link
Author

0xrusowsky commented Jun 16, 2025

@kasperpawlowski first of all thanks for the quick reply!

  1. yes, i will fix the lints
  2. after the PR submission, we discussed it internally and it turns out that Dragan will revert the breaking changes on revm:

unless you want me to submit a follow-up PR later on, we can hold off the test updates until we release foundry 1.3 (where we will get rid of the revm regression).

regardless of that, the modification to ensure vm.expectRevert are caught should still be necessary

lmk what u prefer please

@kasperpawlowski
Copy link
Collaborator

@0xrusowsky let's keep this PR open for whenever you're ready

@daviddungjamessantan-sketch

This comment was marked as spam.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants