evm: refactor state transition (#41)

* evm: keeper statedb refactor

* keeper: implement stateDB account, balance, nonce and suicide functions

* keeper: implement stateDB code and iterator functions

* keeper: implement stateDB log and preimage functions

* update code to use CommitStateDB

* tests updates

* journal changes (wip)

* cache fields

* journal and logs

* minor cleanup

* evm: state transition refactor

* evm: unpack revert errors

* evm: update state transition (wip)

* evm: remove journal related changes

* evm: delete empty account code and storage state

* update gas limit

* evm: header hash to/from context

* evm: minor params and state transition changes

* ante: state transition changes

* ante: refactor default sig gas consumer

* ante: ignore gas costs from ops other than intrinsic gas

* ante: CanTransferDecorator

* evm: refund gas

* update comments

* state transition comments

* ante: CanTransfer and AccessList decorator tests

* evm: cleanup state transition

* ignore nonce increment during ante handler on contract creation

* fix ante tests

* more test fixes
This commit is contained in:
Federico Kunze
2021-06-02 04:52:53 -04:00
committed by GitHub
parent 3cf3854529
commit b77aab43bb
7 changed files with 612 additions and 70 deletions
-3
View File
@@ -18,9 +18,6 @@ var (
// ErrInvalidChainID returns an error resulting from an invalid chain ID.
ErrInvalidChainID = sdkerrors.Register(RootCodespace, 3, "invalid chain ID")
// ErrVMExecution returns an error resulting from an error in EVM execution.
ErrVMExecution = sdkerrors.Register(RootCodespace, 4, "error while executing evm transaction")
// ErrMarshalBigInt returns an error resulting from marshaling a big.Int to a string.
ErrMarshalBigInt = sdkerrors.Register(RootCodespace, 5, "cannot marshal big.Int to string")