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

EIP-3607: transactions from senders with deployed contract are forbidden #801

Merged
merged 2 commits into from Oct 4, 2021

Conversation

MariusVanDerWijden
Copy link
Member

@MariusVanDerWijden MariusVanDerWijden commented Jun 14, 2021

Draft PR for EIP-3607 (https://eips.ethereum.org/EIPS/eip-3607).
Waits for 3607 to be approved by the Core Devs

cc @dankrad

Copy link

@holiman holiman left a comment

Choose a reason for hiding this comment

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

LGTM (text-wise, haven't reviewed the rendered diff)

Copy link
Member

@yperbasis yperbasis left a comment

Choose a reason for hiding this comment

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

The condition should be

\boldsymbol{\sigma}[S(T)]_{\mathrm{c}} = \texttt{KEC}\big( () \big)

i.e. that sender's codeHash is that of an empty string.
For example, check the definition of an empty account in Eq (14).

I_{\mathbf{b}} isn't correct: it refers to initialising code, not sender's code.

Also, please add the condition to the validity Eq (59).

@MariusVanDerWijden
Copy link
Member Author

@yperbasis we discussed the change on ACD and decided to go with empty codehash as the condition instead of codesize as you proposed. Will un-draft the PR once the changes are merged into the EIP, the tests and the EIP is moved into Final

@holiman
Copy link

holiman commented Jul 1, 2021

See ethereum/go-ethereum#23002 (comment)

Basically, a client implementing this change must be careful. If the same 'check' as EXTCODEHASH is reused for this check, then it needs to allow both 0x000.. and emptyCodeHash. Because a transaction from an account that did not previously exist is historically OK, if a miner accepts a gasPrice of zero. Which has happened.

@yperbasis yperbasis marked this pull request as ready for review September 16, 2021 09:45
@yperbasis
Copy link
Member

Shall we merge it, given that it's already in geth (ethereum/go-ethereum#23303) ?

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

Successfully merging this pull request may close these issues.

None yet

3 participants