-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
Add state export in CI #2648
Comments
We need a way to compare two states, equality of root hash won't work since IAVL is insertion-order-dependent. I guess we can iterate through the whole keyspace of each store and compare key-by-key? Might be time-consuming but I can't immediately think of a faster way. Any ideas @ValarDragon? |
That's the only option which immediately comes to mind, without changing data structure / representation. (Storing every state chsnge would absolutely be more expensive) I guess it shouldn't be too slow if it's from a simulation created in CI |
Does it not suffice to just check the app hash? |
Because of that, the app hashes won't be the same. |
Ohhh right. Derp. Ok, I guess we can do direct store comparisons. |
Dump to a file for comparison and ease-of-inspection, format e.g. # STORE = "stake", HEIGHT = 123
(<KEY BYTES>\t<VALUE BYTES>\n)*
# STORE = "gov", HEIGHT = 123
(<KEY BYTES>\t<VALUE BYTES>\n)* |
Add a test in CI that exports network state from a simulation and tries to import it to start a new chain.
The text was updated successfully, but these errors were encountered: