Skip to content
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-Candidate]: Contract Size Exceeded when optimized contract is under 24KB #1182

Closed
ghost opened this issue Jan 30, 2024 · 3 comments
Closed

Comments

@ghost
Copy link

ghost commented Jan 30, 2024

Describe the issue:

I have a contract, whose size exceeds 24KB unoptimized, but when it's optimized, it's down to 15KB.
But, I cannot deploy this contract on my echidna test contract, and it reverts with error MaxCodeSizeExceeded 0x6000 0x63f2 error. Is there a workaround for this?

Code example to reproduce the issue:

contract EchidnaTest {
    constructor(){
        ContractA a = new ContractA();
        ContractA b = new ContractB(); // size limit when unoptimized
    }
}

Version:

Echidna 2.2.2

Relevant log output:

echidna: Deploying the contract 0x00a329c0648769A73afAc7F9381E08FB43dBEA72 failed (revert, out-of-gas, sending ether to an non-payable constructor, etc.):
OwnershipTransferred() from: 0xb4c79dab8f259c7aee6e5b2aa729821864227e84
OwnershipTransferred() from: 0x62d69f6867a0a084c6d313943dc22023bc263691
error MaxCodeSizeExceeded 0x6000 0x63f2
@ghost
Copy link
Author

ghost commented Jan 30, 2024

Found a PR which I can bypass the size issue with. I don't see this being documented anywhere though.
https://github.com/crytic/echidna/pull/544/files

@ggrieco-tob
Copy link
Member

You are right, this should be documented, thanks for the report. I will fix this soon.

@ggrieco-tob
Copy link
Member

MaxCodeSize is larger by default and it is already documented, let's close this one.

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

No branches or pull requests

1 participant