* Problem: verbose logs display with FATAL option (fix#320)
add my script
increase amount for metamask
add run
amount ok
hide log
show info
my logger
hook log
revive eth log
tidy up
use suplog
log replace ok
removed suplog
tidy up
tidy up
fix compile
remove sh
tidy up
tidy up
* logger handler
* fix
* fix eth log override (#371)
remove redundant log
tidy up
* log test
* c++
Co-authored-by: jongwhan lee <jonghwan@crypto.com>
Co-authored-by: Jongwhan Lee <51560997+leejw51crypto@users.noreply.github.com>
* 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>
* return geth error format
* fix format in gasestimate
* deal with other evm errors
* fix import
* fix lint
* add test
Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
* add some unit tests for estimateGas
Also add some test environment setup, Closes#323
test estimateGas of erc20 token transfer
fix failed test case
the trick is to keep a clean transient store, by doing a commit
put artifacts to external file
* fix test failure
Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
The previous code is not incorrect since the method `SetBlockBloom` use the `ctx` passed in rather than the `k.ctx`.
It's confusing that sometimes methods use ctx in parameter, sometimes use `k.ctx`, but that's another issue.
Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
* do binary search to estimate gas
Closes#268
- Also refactor ApplyMessage to be more reuseable
move binary search to rpc api side to have a clean context each try
remove EstimateGas grpc api
* extract BinSearch function and add unit test
* do estimateGas in grpc query
Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>
* fix evm set parameters
* recompute header hash only if its not set
* Update x/evm/keeper/state_transition.go
Co-authored-by: Federico Kunze Küllmer <31522760+fedekunze@users.noreply.github.com>