Skip to content
This repository has been archived by the owner on Apr 4, 2024. It is now read-only.

Problem: genesis export/import roundtrip test failed with contract storage #589

Closed
yihuang opened this issue Sep 24, 2021 · 0 comments · Fixed by #590
Closed

Problem: genesis export/import roundtrip test failed with contract storage #589

yihuang opened this issue Sep 24, 2021 · 0 comments · Fixed by #590

Comments

@yihuang
Copy link
Contributor

yihuang commented Sep 24, 2021

System info: ethermint main branch

Steps to reproduce:

  1. start devnet, deploy a erc20 contract
  2. export genesis
  3. start devnet with the exported genesis
  4. query contract state, it's not the same
  5. export genesis again, check the contract storage, it's different from the original one

Expected behavior: reimport should recover original state

Actual behavior: reimport changed the state key

Additional info:

InitGenesis call Keeper.SetState, which will do a duplicated hash with address + key.

@yihuang yihuang changed the title Problem: import/export roundtrip test fail contract storage Problem: genesis export/import roundtrip test failed with contract storage Sep 24, 2021
yihuang added a commit to yihuang/ethermint that referenced this issue Sep 24, 2021
Closes: evmos#589

- don't hash the key again in InitGenesis
yihuang added a commit to yihuang/ethermint that referenced this issue Sep 27, 2021
Closes: evmos#589

- don't hash the key again in InitGenesis
fedekunze pushed a commit that referenced this issue Sep 27, 2021
* Problem: import/export roundtrip test fail contract storage

Closes: #589

- don't hash the key again in InitGenesis

* changelog

* try to fix estimate-gas undeterministics Closes #536
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant