Skip to content

Errata for EIP-1052 empty account#2144

Closed
sorpaas wants to merge 1 commit intoethereum:masterfrom
sorpaas:patch-12
Closed

Errata for EIP-1052 empty account#2144
sorpaas wants to merge 1 commit intoethereum:masterfrom
sorpaas:patch-12

Conversation

@sorpaas
Copy link
Contributor

@sorpaas sorpaas commented Jun 24, 2019

Errata to clarify EIP-1052's behavior in case it meets with EIP-161's empty account. Geth/Aleth is having this behavior already. Parity previously will return keccak([]) for empty accounts, and now changed to return 0x0 as well in openethereum/parity-ethereum#10775

Related to test stExtCodeHash/codeCopyZero.

at the address being the remaining 160 bits.

In case the account does not exist `0` is pushed to the stack.
In case the account does not exist or is empty `0` is pushed to the stack.
Copy link

@pepyakin pepyakin Jun 24, 2019

Choose a reason for hiding this comment

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

Did you mean it's bytecode empty or is there another notion of emptyness?

Suggested change
In case the account does not exist or is empty `0` is pushed to the stack.
In case the account does not exist or the bytecode is empty `0` is pushed to the stack.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We’re using EIP-161’s definition of “empty” here — having no nonce, balance or code.

Copy link

@pepyakin pepyakin Jun 25, 2019

Choose a reason for hiding this comment

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

Ah, I see, thanks!

Copy link
Member

Choose a reason for hiding this comment

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

Shouldn't it note as a comment that EIP-161's definition is used?

Copy link
Member

Choose a reason for hiding this comment

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

Yes, I'd like to have this comment as well. Something like

or is empty (as defined by EIP-161)

@axic
Copy link
Member

axic commented Aug 11, 2019

@Arachnid @chfast can you please review and comment? Is this clarification matching how the fork was deployed? Is this clarification useful?

@axic
Copy link
Member

axic commented Nov 1, 2019

@chfast is it clear to merge?

Copy link
Member

@chfast chfast left a comment

Choose a reason for hiding this comment

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

Sorry for long wait. I planned to add more tests for this case.

at the address being the remaining 160 bits.

In case the account does not exist `0` is pushed to the stack.
In case the account does not exist or is empty `0` is pushed to the stack.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
In case the account does not exist or is empty `0` is pushed to the stack.
In case the account does not exist or is empty (as defined by [EIP-161](https://eips.ethereum.org/EIPS/eip-161)) `0` is pushed to the stack.

Copy link
Member

Choose a reason for hiding this comment

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

@chfast can you approve?

Copy link
Member

Choose a reason for hiding this comment

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

👍

Copy link
Member

Choose a reason for hiding this comment

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

Screenshot 2019-11-22 at 22 13 25

It seems @sorpaas has disabled maintainers' access to his fork. Will need to create a new PR.

Copy link
Member

Choose a reason for hiding this comment

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

Done in #2388.

at the address being the remaining 160 bits.

In case the account does not exist `0` is pushed to the stack.
In case the account does not exist or is empty `0` is pushed to the stack.
Copy link
Member

Choose a reason for hiding this comment

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

👍

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.

5 participants