EIP-2681: Fix CREATE/CREATE2 max nonce error reporting rule#4784
EIP-2681: Fix CREATE/CREATE2 max nonce error reporting rule#4784eth-bot merged 1 commit intoethereum:masterfrom
Conversation
All tests passed; auto-merging...(pass) eip-2681.md
|
lightclient
left a comment
There was a problem hiding this comment.
I'm okay with this change. I think creating a new EIP to convey this behavior would be more confusing that simply updating the final EIP.
7f9236e to
4ac570c
Compare
|
I've added a clarification regarding what happens to gas passed to CREATE in case of failure. |
|
@lightclient, @gumb0 applied another clarification, can you please check again? |
MicahZoltu
left a comment
There was a problem hiding this comment.
Looks like the code block backticks got lost in the update.
EIPS/eip-2681.md
Outdated
|
|
||
| 1. Consider any transaction invalid, where the nonce exceeds or equals to `2^64-1`. | ||
| 2. The `CREATE` and `CREATE2` instructions to abort with an exceptional halt, where the account nonce is `2^64-1`. | ||
| 2. The CREATE and CREATE2 instructions execution ends with the result `0` pushed on stack, where the account nonce is `2^64-1`. Gas for initcode execution is not deducted in this case. |
There was a problem hiding this comment.
| 2. The CREATE and CREATE2 instructions execution ends with the result `0` pushed on stack, where the account nonce is `2^64-1`. Gas for initcode execution is not deducted in this case. | |
| 2. The `CREATE` and `CREATE2` instruction's execution ends with the result `0` pushed on stack, where the account nonce is `2^64-1`. Gas for initcode execution is not deducted in this case. |
There was a problem hiding this comment.
I fixed these, thanks.
Shouldn't it be instructions' (plural) as it's about 2 instructions?
There was a problem hiding this comment.
Heh, I initially used instructions' in my suggestion by my confidence on when the right time to do that is incredibly low so I went with the "safer" instruction's and hoped no one would notice/correct me. 😬
I think instructions' is correct... if you are confident then lets go with that!
There was a problem hiding this comment.
| 2. The CREATE and CREATE2 instructions execution ends with the result `0` pushed on stack, where the account nonce is `2^64-1`. Gas for initcode execution is not deducted in this case. | |
| 2. The `CREATE` and `CREATE2` instructions' execution ends with the result `0` pushed on stack, where the account nonce is `2^64-1`. Gas for initcode execution is not deducted in this case. |
4ac570c to
ebbc7cd
Compare
ebbc7cd to
bdf1d74
Compare
Unfortunately we have to update the spec of this retroactive EIP, because there was misunderstanding regarding how CREATE/CREATE2 instructions report nonce overflow error.
It makes much more sense to return 0 rather than abort entire execution in this case, because this is like all other create-specific errors are reported (e.g. insufficient balance for transfer, account already exists, code size above limit, code starts with 0xEF)
And in fact I assumed that 0 result is the expected behavior both in go-ethereum implementation and in tests, and these are already merged and released.
cc @axic @holiman