Evermint is fork of Evmos v12.1.6 for research & development purpose
Update Sep 2024: implemented in Evermint by #129
Currently, Evermint is using EthAccount as the default proto account and the only type of account supported.
That causes some limit:
- Use Cosmos-SDK
x/vesting module
- Limit potential of integrate new features from CosmosSDK
- Wasting storage to store
evmtypes.EmptyCodeHash 32 bytes value that also exists in every non-contract EthAccount (see prove).
Request:
- Remove
EthAccount
- Make
authtypes.BaseAccount as default proto account, compatible with EVM module.
- All current testcases must be kept to make sure the implementation is fully compatible.
x/evm non-genesis account now only support export/import only accounts with either code or storage
- Optimize store by only store code hash which
len(code_hash) > 0 && code_hash <> evmtypes.EmptyCodeHash instead of saving it into every EthAccount record. This change will slightly lower gas fee required to read from store in non-evm Txs
Aware:
x/auth keeper RemoveAccount
- Account bytes compatible: currently Cosmos supports 20 & 32 bytes address (ICA)
Mindset changes:
- Contract account is now accounts that has
CodeHash record (len(code_hash) == 0 || code_hash == evmtypes.EmptyCodeHash will be removed from store)
- ETH-compatible account is now accounts those are not contract accounts, plus
len(address_bytes) == 20. If it is in blockedAddrs by x/bank, will be an error in stateDb.Commit() phrase.
- When doing account migration, remember to consider migrate code hash, if needed.
Migration aware (if any chain planned to implement this):
- Must define migration to be able to upgrade Ethermint/Evmos chains.
- Must test query historical data and data must be matched pre and after upgrade.
Evermint is fork of Evmos v12.1.6 for research & development purpose
Update Sep 2024: implemented in Evermint by #129
Currently, Evermint is using
EthAccountas the default proto account and the only type of account supported.That causes some limit:
x/vestingmoduleevmtypes.EmptyCodeHash32 bytes value that also exists in every non-contractEthAccount(see prove).Request:
EthAccountauthtypes.BaseAccountas default proto account, compatible with EVM module.x/evmnon-genesis account now only support export/import only accounts with either code or storagelen(code_hash) > 0 && code_hash <> evmtypes.EmptyCodeHashinstead of saving it into everyEthAccountrecord. This change will slightly lower gas fee required to read from store in non-evm TxsAware:
x/authkeeperRemoveAccountMindset changes:
CodeHashrecord (len(code_hash) == 0 || code_hash == evmtypes.EmptyCodeHashwill be removed from store)len(address_bytes) == 20. If it is inblockedAddrsbyx/bank, will be an error instateDb.Commit()phrase.Migration aware (if any chain planned to implement this):