-
Notifications
You must be signed in to change notification settings - Fork 509
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
Contract creation on non-empty code or non-zero nonce throws an exception #323
Conversation
This implements ethereum/EIPs#684 |
624e547
to
677019e
Compare
677019e
to
958013d
Compare
Is there any more discussion on this. This is something I wondered too when reading the spec. |
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 believe this should be merged.
Paper.tex
Outdated
@@ -760,7 +760,7 @@ \section{Contract Creation}\label{ch:create}\hypertarget{endow}{} | |||
1 & \text{otherwise} | |||
\end{cases} \\ | |||
\nonumber \text{where} \\ | |||
F &\equiv \big((\boldsymbol{\sigma}^{**} = \varnothing \ \wedge\ \mathbf{o} = \varnothing) \vee\ g^{**} < c \ \vee\ |\mathbf{o}| > 24576\big) | |||
F \equiv &\big(\boldsymbol{\sigma}[a]_c \neq \texttt{\small KEC}\big(()\big) \ \vee\ \boldsymbol{\sigma}[a]_n \neq 0 \ \vee\ (\boldsymbol{\sigma}^{**} = \varnothing \ \wedge\ \mathbf{o} = \varnothing) \\\nonumber & \vee\ g^{**} < c \ \vee\ |\mathbf{o}| > 24576\big) |
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 believe this should be merged. I know that the yellow paper hasn't caught up to Constantinople yet but this would be a start.
@pirapira since this is now activated on mainnet, maybe the tag is no longer relavant., isn t it? |
For reference: geth implementation |
This implements a protocol change which is very hard to hit anyway. The idea is to avoid overwriting contracts even when the calculated address coincides with existing something. Here "existing something" is an account with non-zero nonce or non-empty code. This is consistent with EIP86 planned in Constantinople.
There have been some test failures happening only on the address-collision cases, but most probably the time spent there is wasted because keccak256 collisions cause far bigger problems anyway. It makes sense to make the protocol specification simpler for the address collision case.