-
Notifications
You must be signed in to change notification settings - Fork 5.3k
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
Add EIP: EOF Contract Creation #8209
Conversation
✅ All reviewers have approved. |
@g11tech, @gcolvin, @lightclient, @Pandapip1, @SamWilsn any blocker merging this as a draft? |
added some nits which I believe would improve EIP readability. ping back after you have considered/applied them 🙏 |
Co-authored-by: g11tech <[email protected]>
The commit 10dcfc6 (as a parent of 64f1daa) contains errors. |
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.
Feel free to apply these changes while in draft, or not. Up to you!
| `GKECCAK256WORD` | Defined as `6` in the Ethereum Yellow Paper | | ||
| `GCREATE` | Defined as `32000` in the Ethereum Yellow Paper | | ||
| `GCODEDEPOSIT` | Defined as `200` in the Ethereum Yellow Paper | | ||
| `GTXDATAZERO` | Defined as `4` in the Ethereum Yellow Paper | | ||
| `GTXDATANONZERO` | Defined as `16` in the Ethereum Yellow Paper | | ||
| `INITCODE_WORD_COST` | Defined as `2` in [EIP-3860](./eip-3860.md) | | ||
| `MAX_INITCODE_SIZE` | Defined as `2 * MAX_CODE_SIZE` in [EIP-3860](./eip-3860.md) | | ||
| `MAX_CODE_SIZE` | Defined as `24576` in [EIP-170](./eip-170.md) | |
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.
As a suggestion, and not at all a hard requirement, you can link to the Yellow Paper or to EELS (example) for these constants to provide more context.
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.
I have tried YP, that was rejected due to #8248. Didn't try EELS though, thanks!
#### Gas schedule | ||
|
||
Each `initcodes` item data costs the same as calldata (`GTXDATANONZERO` gas for non-zero bytes, `GTXDATAZERO` for zero bytes -- see [EIP-2028](./eip-2028.md)). The intrinsic gas of an `InitcodeTransaction` is extended by the sum of all those items' costs. | ||
|
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.
Perhaps some pseudocode (or actual code based on EELS) would be nice here to make the gas costs less ambiguous?
|
||
## Security Considerations | ||
|
||
Needs discussion. |
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.
Needs discussion. | |
Needs discussion. <!-- TODO --> |
If you use an HTML-style comment, the linter will complain when you move to 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.
All Reviewers Have Approved; Performing Automatic Merge...
Adds the
CREATE3/4
opcodes and EOF contract creation specs, as previously specced out in the "Mega EOF Endgame" spec aka "Megaspec".