forked from evmos/evmos
-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Labels
enhancementEnhancement / bug-fixes or re-work on old featureEnhancement / bug-fixes or re-work on old featureoptimizeOptimize business or code performanceOptimize business or code performance
Description
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/vestingmodule - Limit potential of integrate new features from CosmosSDK
- Wasting storage to store
evmtypes.EmptyCodeHash32 bytes value that also exists in every non-contractEthAccount(see prove).
Request:
- Remove
EthAccount - Make
authtypes.BaseAccountas default proto account, compatible with EVM module. - All current testcases must be kept to make sure the implementation is fully compatible.
x/evmnon-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.EmptyCodeHashinstead of saving it into everyEthAccountrecord. This change will slightly lower gas fee required to read from store in non-evm Txs
Aware:
x/authkeeperRemoveAccount- Account bytes compatible: currently Cosmos supports 20 & 32 bytes address (ICA)
Mindset changes:
- Contract account is now accounts that has
CodeHashrecord (len(code_hash) == 0 || code_hash == evmtypes.EmptyCodeHashwill be removed from store) - ETH-compatible account is now accounts those are not contract accounts, plus
len(address_bytes) == 20. If it is inblockedAddrsbyx/bank, will be an error instateDb.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.
Metadata
Metadata
Assignees
Labels
enhancementEnhancement / bug-fixes or re-work on old featureEnhancement / bug-fixes or re-work on old featureoptimizeOptimize business or code performanceOptimize business or code performance