-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
bug: invariant test chooses contract senders which are rejected due to EIP-3607 #2963
Comments
Yeah implementing the same fix as #2090 here makes sense. |
@mattsse can you pls take a look tomorrow on this? should be simple fix and apparently a big issue for invariant users |
Can confirm that this is a big pain when testing invariants. What is the fix until this issue gets fixed? Exclude all known contracts with Update: the solution is to use Though I am not quite sure why this works. Does |
Looks like #4181 has been merged. Should this issue be closed now? Update: no, we shouldn't close this issue just yet. I updated Forge via
|
it's not on foundryup yet, but I'm cutting a release now manually |
Oh, I see, thanks. |
@mattsse looks like this is fixed now. I updated via |
Component
Forge
Have you ensured that all of these are up to date?
What version of Foundry are you on?
forge 0.2.0 (56dc746 2022-08-26T00:07:43.474069Z)
What command(s) is the bug in?
forge test
Operating System
No response
Describe the bug
Using the same test contract as #2962, sometimes the sender will be a contract chosen from the dictionary. In that case the call reverts with
[FAIL. Reason: EvmError: RejectCallerWithCode]
due to EIP-3607, similar to #2090IMO the ideal solution here is to bypass 3607 since the
msg.sender
can have code, and this is referring to the fact thattx.origin
cannot have code which isn't too relevant for invariant tests.The text was updated successfully, but these errors were encountered: