cronos
cronos copied to clipboard
Problem: exported genesis state files couldn't init a new chain. code hash mismatch
Describe the bug
Testing with v0.7.0 archive inode
The exported genesis state has panic when starting a chain calling InitGenesus, got panic("code don't match codeHash")
it might relate to the ethermint recent patch PR. The code has been deleted in the evm code storage but the account codehash in the account keeper didn't change.
Solution Suggestion by @yihuang offline migration script to correct the evm account state
Additional context also relate: https://github.com/crypto-org-chain/cronos/issues/635
The other solution in https://github.com/crypto-org-chain/ethermint/pull/146, exempts 2 cases when checking the codehash mismatch instead of modifying the eth account state.
Long-term: migration script.
https://github.com/evmos/ethermint/issues/1319
The https://github.com/evmos/ethermint/pull/1320 has been released in the Ethermint v0.20, I will test it again on the Cronos V1.0 archive inode.