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

Export State with Order Metadata #2955

Closed
Tracked by #4622
czarcas7ic opened this issue Oct 5, 2022 · 3 comments
Closed
Tracked by #4622

Export State with Order Metadata #2955

czarcas7ic opened this issue Oct 5, 2022 · 3 comments

Comments

@czarcas7ic
Copy link
Member

Background

Currently, when exporting mainnet state, we do not export any kind of order metadata. When calculating the app hash by hashing the module hashes, this order matters.

Suggested Design

  • Export order metadata so we are constructing the Merkle tree in the same way we are on mainnet

Acceptance Criteria

TBD

@hieuvubk
Copy link
Contributor

hieuvubk commented Oct 21, 2022

Is this about the order of modules when exporting? Currently OrderExportGenesis not be set, so when exporting state returns the modules in appModules order.
I don't know if the current way is correct for the Merkle tree we are using. So pls lmk what u think

@ValarDragon
Copy link
Member

We can't state export such that we can reconstruct the same tree unfortunately, based on how "state export" is defined in cosmos-land. This is because state depends on the tree structure of IAVL, which itself depends on insertion order.

So state sync snapshots do this, and we can maybe create some way to apply modifications onto a state sync snapshot, which is a true "state export", unlike what we typically do.

@ValarDragon
Copy link
Member

No longer needed with in-place state modification tooling

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

No branches or pull requests

3 participants