forked from evmos/ethermint
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat!: Enforce stricter validations for genesis accounts and enabled …
…precompiles (#74) * feat!: Genesis Accounts can not contain empty code Genesis accounts currently serve no purpose for non-contract accounts. Currently, they can exist but code and storage will be empty and therefore has no effect besids ensuring the matching account is subject to similar validations as a contract. This change restrics valid genesis accounts to those with Code only. Storage can still be empty for contracts, as there is no requirement for values to be set in state for all contracts. * refactor: Capitalize test case names Using capital letters for test case names improved readability when reading and parsing. * fix!: Add back code hash check for empty code On some chains running ethermint, a self destruct bug that caused the code for other contract accounts to be deleted would result in exported genesis accounts with empty code. A patch was then added to genesis that allowed the hash check to be skipped in order for these genesis files to be re-imported successfully. This does not affect us contracts on Kava, so this check is being removed. * feat!: Add strict contract account checks Since Genesis Accounts may only be contracts, we add the assertion that they must have a positive sequence (eip-155) and that they do not have a public key set. A contract can not be associated with a public key and must have a default nonce set. In addition, since enabled precompiles are contract accounts, we enforce that these have matching genesis accounts to share these validations and in addition, enforce a fixed code.
- Loading branch information
Showing
4 changed files
with
249 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.