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

Code size error when actual failure reason is OOG #2664

Closed
davidmurdoch opened this issue Apr 25, 2023 · 8 comments
Closed

Code size error when actual failure reason is OOG #2664

davidmurdoch opened this issue Apr 25, 2023 · 8 comments

Comments

@davidmurdoch
Copy link
Contributor

result = { ...result, ...CodesizeExceedsMaximumError(message.gasLimit) }

@jochem-brouwer
Copy link
Member

I assume you want us to branch on:

  1. If returned code size > max code size, report current error
  2. Else, return OOG error

?

@davidmurdoch
Copy link
Contributor Author

I didn't mean to open this yet. I was using the github.dev editor and it opened it for me, I thought I'd have a chance to add more context first.

Context coming right up!

@davidmurdoch
Copy link
Contributor Author

davidmurdoch commented Apr 25, 2023

This issue came up recently when web3 was updating their tests to shanghai. The error returned by the EVM is that the code size is too great, but the gas used was the problem and their contract deployment actually doesn't have enough gas under shanghai.

I suspect they'll be many more users upgrading to shanghai that run into this erroneous error message over the next few months. So it'd be helpful to update the error messaging here soon.

(sorry for that initial contextless issue!)

@jochem-brouwer
Copy link
Member

This is not related to Shanghai. This does the "deployed code size" check, not the "initcode size check" (EIP 3860). See EIP https://eips.ethereum.org/EIPS/eip-170

I agree we should change though.

@davidmurdoch
Copy link
Contributor Author

I think it is related to shanghai. Code that use to deploy successfully at a given gas limit no longer does because init code uses more gas now.

@jeffsmale90
Copy link

I this this is a duplicate of this issue #2466 ?

@davidmurdoch
Copy link
Contributor Author

It is. Thanks @jeffsmale90! I leave it to @jochem-brouwer to close this one.

@jochem-brouwer
Copy link
Member

Yup, just assigned #2466 to me and will work on this soon.

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

3 participants