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

Created contract accounts should have nonce 1 and storage empty #297

Conversation

mattdean-digicatapult
Copy link
Contributor

@mattdean-digicatapult mattdean-digicatapult commented Apr 27, 2018

Fixes test RevertInCreateInInit for #272 as per eq. 79 of the yellow paper. I wasn't entirely sure if any explicit cleanup of the storage trie was required but the tests do indeed all pass now 🎉

I've done the cleanup in stateManager to ensure all storage tries and the cache are maintained correctly. This makes the change a bit more verbose but hopefully a little bit more stable. I've also refactoring the common elements of stateManager.putContractStorage() and the new method stateManager.clearContractStorage() into a private method _modifyContractStorage.

@jwasinger jwasinger merged commit c243d5e into ethereumjs:update-tests Apr 28, 2018
@axic
Copy link
Member

axic commented Apr 30, 2018

I think we should've merged this into master instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants