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

Add EIP: EOF Contract Creation #8209

Merged
merged 9 commits into from
Feb 20, 2024
Merged

Conversation

pdobacz
Copy link
Contributor

@pdobacz pdobacz commented Feb 12, 2024

Adds the CREATE3/4 opcodes and EOF contract creation specs, as previously specced out in the "Mega EOF Endgame" spec aka "Megaspec".

@github-actions github-actions bot added c-new Creates a brand new proposal s-draft This EIP is a Draft t-core labels Feb 12, 2024
@eth-bot
Copy link
Collaborator

eth-bot commented Feb 12, 2024

✅ All reviewers have approved.

@eth-bot eth-bot added e-consensus Waiting on editor consensus e-review Waiting on editor to review labels Feb 12, 2024
@github-actions github-actions bot added the w-ci Waiting on CI to pass label Feb 12, 2024
EIPS/eip-eof-create.md Outdated Show resolved Hide resolved
EIPS/eip-eof-create.md Outdated Show resolved Hide resolved
@github-actions github-actions bot removed the w-ci Waiting on CI to pass label Feb 13, 2024
@axic
Copy link
Member

axic commented Feb 18, 2024

@g11tech, @gcolvin, @lightclient, @Pandapip1, @SamWilsn any blocker merging this as a draft?

EIPS/eip-7620.md Outdated Show resolved Hide resolved
EIPS/eip-7620.md Outdated Show resolved Hide resolved
EIPS/eip-7620.md Outdated Show resolved Hide resolved
EIPS/eip-7620.md Outdated Show resolved Hide resolved
EIPS/eip-7620.md Outdated Show resolved Hide resolved
EIPS/eip-7620.md Outdated Show resolved Hide resolved
EIPS/eip-7620.md Outdated Show resolved Hide resolved
EIPS/eip-7620.md Outdated Show resolved Hide resolved
EIPS/eip-7620.md Outdated Show resolved Hide resolved
EIPS/eip-7620.md Outdated Show resolved Hide resolved
@g11tech
Copy link
Contributor

g11tech commented Feb 19, 2024

@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 <develop@g11tech.io>
@eth-bot eth-bot changed the title Add EIP: EOF - Contract Creation Instructions Add EIP: EOF Contract Creation Feb 19, 2024
Copy link

The commit 10dcfc6 (as a parent of 64f1daa) contains errors.
Please inspect the Run Summary for details.

@github-actions github-actions bot added the w-ci Waiting on CI to pass label Feb 20, 2024
@pdobacz pdobacz requested a review from g11tech February 20, 2024 16:08
@github-actions github-actions bot removed the w-ci Waiting on CI to pass label Feb 20, 2024
Copy link
Contributor

@SamWilsn SamWilsn left a 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!

Comment on lines +36 to +43
| `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) |
Copy link
Contributor

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.

Copy link
Contributor Author

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.

Copy link
Contributor

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.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Needs discussion.
Needs discussion. <!-- TODO -->

If you use an HTML-style comment, the linter will complain when you move to review.

@eth-bot eth-bot enabled auto-merge (squash) February 20, 2024 16:33
Copy link
Collaborator

@eth-bot eth-bot left a 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...

@eth-bot eth-bot merged commit 55659b8 into ethereum:master Feb 20, 2024
10 of 11 checks passed
@pdobacz pdobacz deleted the add-eip-eof-create branch February 21, 2024 08:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c-new Creates a brand new proposal e-consensus Waiting on editor consensus e-review Waiting on editor to review s-draft This EIP is a Draft t-core
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants