-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
feat(forge build
): add initcode size check
#9116
feat(forge build
): add initcode size check
#9116
Conversation
Finally! Thank you ser 🫡 Tested and worked to me! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you! looks good, have added minor nits
forge build
): add initcode size check
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thank you, lgtm! Pending other review
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! Looks good 👍
@DaniPopes Please let me know if this needs any further improvements before it can be merged. Thank you! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
Closes #4783
described in the Additional Context of this comment
Motivation
Prior to EIP-3860 there was no size limit on creation code (initcode), and just a 24576 byte size limit on runtime code.
EIP-3860 went live in Shangai so now there is both:
Currently,
forge build --sizes
does not account for this new size limit.Solution
forge build --sizes
for the contract init code size (bytes) and the margin left counting towards the limit (bytes).--ignore-eip-3860
allows to ignore the check mentioned in the previous point. This is aimed to users deploying to chains that do not enforce this limit.Testing