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

[EC-310] Implement EIP-684 #324

Merged
merged 3 commits into from
Oct 24, 2017
Merged

[EC-310] Implement EIP-684 #324

merged 3 commits into from
Oct 24, 2017

Conversation

rtkaczyk
Copy link
Contributor

EIP-684

This also enables us to run all the ETS BlockchainSuite tests (except for metropolis fork).

The ETS test files have been updated (latest commit: 2017-10-18)

Copy link
Contributor

@KonradStaniec KonradStaniec left a comment

Choose a reason for hiding this comment

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

Code looks good but it seems that encoding of VMTests changed and they are now failing with io.circe.DecodingFailure$$anon$1: [A]List[A]: DownField(logs),DownField(log4_nonEmptyMem)

Do you think it will be easy enough to fix it in this pr or it would require another task?

@rtkaczyk
Copy link
Contributor Author

Found the cause and the solution.
I think I will do this on this PR

@LukasGasior1 LukasGasior1 self-requested a review October 20, 2017 12:36
Copy link
Contributor

@LukasGasior1 LukasGasior1 left a comment

Choose a reason for hiding this comment

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

just one minor comment. LGTM

/**
* According to EIP161: An account is considered empty when it has no code and zero nonce and zero balance.
* An account's storage is not relevant when determining emptiness.
*/
def isEmpty: Boolean =
nonce == UInt256.Zero && balance == UInt256.Zero && codeHash == Account.EmptyCodeHash
def isEmpty(startNonce: UInt256 = UInt256.Zero): Boolean =
Copy link
Contributor

Choose a reason for hiding this comment

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

what do you think about removing the default here? it seems to make sense to force someone using this method to always pass this param

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Why do you think so? I think that if Account#empty has a default argument, then logically it follow to add the default here. (And I think the defaults stem from the fact the idea of non-zero starting is considered funny ...)

@rtkaczyk rtkaczyk merged commit 9339d19 into phase/daedalus Oct 24, 2017
@dzajkowski dzajkowski deleted the feature/eip684 branch April 16, 2021 11:40
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