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

core/state/snapshot: fix journal nil deserialziation #21003

Merged
merged 1 commit into from
Apr 30, 2020

Conversation

karalabe
Copy link
Member

The snapshot journal uses RLP to serialize the in-memory diff layers on shutdown/restart. An RLP serialize and deserialize round however loses the nil-ness of a byte slice, converting it to empty: https://play.golang.org/p/bAxBMJrryYz

This PR converts the empty slices back to nil, since the snapshotter depends on nils explicitly. It is fine to do this because an "empty" account rlp blob makes no sense, and empty values are not stored in storage tries either.

@karalabe karalabe added this to the 1.9.14 milestone Apr 29, 2020
@karalabe karalabe merged commit 3cebfb6 into ethereum:master Apr 30, 2020
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.

2 participants