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

unify byte order in zktrie node's fields being stored #133

Merged
merged 1 commit into from
Jul 28, 2022

Conversation

noel2004
Copy link
Member

@noel2004 noel2004 commented Jul 27, 2022

Currently the fields inside zktrie's node which being persisted in stateDb use different byteorder and may bring in many confusions:

  • the left/right hash in middile node are persisted by little endian
  • the nodeKey in leaf node is persisted by little endian
  • other fields (value fields in leaf node) are persisted by big endian

This PR unify all the fields to big endian. A spec for the format of stored data is also added

What are broken?

This patch would break all the geth's db currently run with zktrie:true so they (if there is any) must be inited with completly new data.

@noel2004 noel2004 requested a review from 0xmountaintop July 28, 2022 05:52
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.

3 participants