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

Default value of the state's Account should a represent non-existent account #1312

Closed
Wollac opened this issue Sep 19, 2024 · 0 comments · Fixed by #1313
Closed

Default value of the state's Account should a represent non-existent account #1312

Wollac opened this issue Sep 19, 2024 · 0 comments · Fixed by #1313
Labels
bug Something isn't working

Comments

@Wollac
Copy link
Contributor

Wollac commented Sep 19, 2024

Component

consensus, eips, genesis

What version of Alloy are you on?

alloy-consensus v0.3.6

Operating System

None

Describe the bug

Currently, alloy_consensus::Account uses derive to implement Default. This leads to some arbitrary values, e.g. code_hash of 0x00 does not correspond to the hash of any contract code.
To be able to use the default value as the actual value of a missing account, and to be consistent with other types in alloy_consensus (like Header), it should contain a custom implementation of an actual valid (empty) account.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant