-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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: backend: failed while inspecting: Transaction(CreateInitcodeSizeLimit))
#5088
Comments
backend: failed while inspecting: Transaction(CreateInitcodeSizeLimit))
backend: failed while inspecting: Transaction(CreateInitcodeSizeLimit))
The error here is that forge is failing to deploy the test contract itself (or a required library) because it's too big after the Shanghai changes, and it will get skipped. Error is here: Line 143 in a5c2741
|
hmm interesting, that |
Yes. I'm not sure why only execution errors fail the tests, while anything else just gets logged and ignored.. |
100%. This can lead to false conclusions if people don't look into the logs... |
... sigh, this is bad -.- however bluealloy/revm#491 should fix that, but we don't have it in foundry yet I believe #5089 should do it, mind trying this? separately @Evalir we should treat this as test failures |
Can confirm that with https://github.com/foundry-rs/foundry/releases/tag/nightly-b0c95d0151efa536931d0fc9d3950adb081ea866 it fails now. When is bluealloy/revm#491 added? My PR here pcaversaccio/snekmate#122 needs the |
should be included, for testing, the contract code size limit should be disabled |
Sorry I didn't use the latest I mean I still get the warnings since some of my contracts are even bigger than 2x the init code limit. Maybe you can disable the warnings for the test compilations? Warning (3860): Contract initcode size is 90430 bytes and exceeds 49152 bytes (a limit introduced in Shanghai). This contract may not be deployable on Mainnet. Consider enabling the optimizer (with a low "runs" value!), turning off revert strings, or using libraries.
--> test/extensions/ERC4626.t.sol:13:1:
|
13 | contract ERC4626VaultTest is ERC4626Test {
| ^ (Relevant source part starts here and spans across multiple lines).
Warning (3860): Contract initcode size is 140508 bytes and exceeds 49152 bytes (a limit introduced in Shanghai). This contract may not be deployable on Mainnet. Consider enabling the optimizer (with a low "runs" value!), turning off revert strings, or using libraries.
--> test/tokens/ERC1155.t.sol:17:1:
|
17 | contract ERC1155Test is Test {
| ^ (Relevant source part starts here and spans across multiple lines).
Warning (3860): Contract initcode size is 77723 bytes and exceeds 49152 bytes (a limit introduced in Shanghai). This contract may not be deployable on Mainnet. Consider enabling the optimizer (with a low "runs" value!), turning off revert strings, or using libraries.
--> test/tokens/ERC[20](https://github.com/pcaversaccio/snekmate/actions/runs/5135950150/jobs/9242037892#step:11:21).t.sol:9:1:
|
9 | contract ERC20Test is Test {
| ^ (Relevant source part starts here and spans across multiple lines).
Warning (3860): Contract initcode size is 102289 bytes and exceeds 49152 bytes (a limit introduced in Shanghai). This contract may not be deployable on Mainnet. Consider enabling the optimizer (with a low "runs" value!), turning off revert strings, or using libraries.
--> test/tokens/ERC721.t.sol:20:1:
|
20 | contract ERC7[21](https://github.com/pcaversaccio/snekmate/actions/runs/5135950150/jobs/9242037892#step:11:22)Test is Test {
| ^ (Relevant source part starts here and spans across multiple lines). |
cool, looks like we need to suppress the error now. on it! |
Completed via #5094. |
nice, thanks for flagging |
Component
Forge
Have you ensured that all of these are up to date?
What version of Foundry are you on?
forge 0.2.0 (a5c2741 2023-05-31T00:03:46.340876004Z)
What command(s) is the bug in?
forge test
Operating System
Linux
Describe the bug
For repro, use my repo here with the
vyper-039
branch and simply runforge test
.I upgraded my test setup using solc
0.8.20
andevm_version='shanghai'
. However, I get multiple errors like the following if I runforge test
(see here a CI run example: https://github.com/pcaversaccio/snekmate/actions/runs/5132149269/jobs/9233075709#step:11:44)2023-05-31T11:14:59.396656Z ERROR forge::multi_runner: error=Unrecoverable error: Err(Eyre( backend: failed while inspecting: Transaction(CreateInitcodeSizeLimit)))
I'm fully aware of the init code size limit introduced by
shanghai
but I'm not sure about this error and its impact. It seems that the tests are running successfully but instead of lasting now (around 25-30mins; see e.g. https://github.com/pcaversaccio/snekmate/actions/runs/5126407871/jobs/9220852266#step:11:1), they are completed within 7-10 mins (see e.g. https://github.com/pcaversaccio/snekmate/actions/runs/5132149269/jobs/9233075709#step:11:1)I can't explain the performance boost tbh. This smells like something is wrong (except ofc if Foundry, ethers-rs or any other major dependency was significantly refactored).
The text was updated successfully, but these errors were encountered: