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

Look into utilizing appHash to check state not alter after query #3114

Open
Tracked by #4624
hieuvubk opened this issue Oct 24, 2022 · 4 comments
Open
Tracked by #4624

Look into utilizing appHash to check state not alter after query #3114

hieuvubk opened this issue Oct 24, 2022 · 4 comments

Comments

@hieuvubk
Copy link
Contributor

Background

Another reference from 3001. Using state exported is the right way to check state alter after querying.
But for more accuracy, we should look into app hash verification in the future.

@hieuvubk
Copy link
Contributor Author

@p0mvn @ValarDragon @mattverse Hello I got trouble when using app hash. The old hash & new hash is different after querying. Or I'm using the wrong func pls let me know.
Ảnh chụp Màn hình 2022-10-28 lúc 11 52 34
Ảnh chụp Màn hình 2022-10-28 lúc 11 52 21

@mattverse
Copy link
Member

@hieuvubk aren't app hashes expected to be different after commit?

@hieuvubk
Copy link
Contributor Author

@p0mvn @mattverse @czarcas7ic I checked and see that some module (slashing, distribution, downtimedetector, staking) always change their own commit_store_hash in each height => appHash change.
My suggestion is check commit_store_hash after query instead of app hash (since we also check query against each module).
Pls lmk what u think

@czarcas7ic
Copy link
Member

@hieuvubk its expected that each height has a different hash for each module. I think the intent here was to run a test that goes through two blocks twice. On the first run there is no query and on the second run there is a query. With this setup, hashes x and x+1 should match between the two runs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Todo 🕒
Development

No branches or pull requests

4 participants