* use stack of contexts to implement snapshot revert
Closes#338
add exception revert test case
verify partial revert
mutate state after the reverted subcall
polish
update comments
name the module after the type name
remove the unnecessary Snapshot in outer layer
and add snapshot unit test
assert context stack is clean after tx processing
cleanups
fix context revert
fix comments
update comments
it's ok to commit in failed case too
Update x/evm/keeper/context_stack.go
Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
Update x/evm/keeper/context_stack.go
Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
Update x/evm/keeper/context_stack.go
Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
update comment and error message
add comment to cacheContext
k -> cs
Update x/evm/keeper/context_stack.go
Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
evm can handle state revert
renames and unit tests
* use table driven tests
* keep all the cosmos events
* changelog
* check for if commit function is nil
* fix changelog
* Update x/evm/keeper/context_stack.go
Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
* keep the original context for GetCommittedState api
* fix method mutation
* keep estimateGas consistant
* added test after the original context is recovered
* add integration test for the gas consumption of sstore
* test the committed case
* move methods to keeper module
Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
* fix `AddLog` unmarshaling tx
Closes#187
* use cosmos tx in AddLog unit test
* Apply suggestions from code review
Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
* ante: check that sender is a EOA
* fix: GetCodeSize handles nil case and comments
* docs: add TODO comment
* fix: use EmptyCodeHash check
* lint: evmtypes instead of types
* lint: fix suite error
* test: set code to act not as EOA
* undo comment on GetCodeSize
* keeper: fix input checks
* Apply suggestions from code review
Co-authored-by: Akash Khosla <me@akashkhosla.com>
Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
* add test for sending tx w/ 21000 gas
* improve rpc transfer test
* use ctx in EndBlock
* UpdateAccounts and ClearStateObjects with passed in context
* log ethereum address on error
Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com>
Co-authored-by: Federico Kunze <federico.kunze94@gmail.com>