-
Notifications
You must be signed in to change notification settings - Fork 559
Problem: EVM keeper keeps intermediate states inside #663
Conversation
Codecov Report
@@ Coverage Diff @@
## main #663 +/- ##
==========================================
- Coverage 55.81% 55.42% -0.39%
==========================================
Files 64 64
Lines 5853 5470 -383
==========================================
- Hits 3267 3032 -235
+ Misses 2386 2301 -85
+ Partials 200 137 -63
|
8ff4d07
to
00a635d
Compare
hold it for now, since there are another refactoring PR ongoing, after that one fixed, this one will become cleaner. |
d51d6ed
to
c43fc51
Compare
3f44b46
to
574ecdd
Compare
rebased, it's much cleaner now. |
0a665b7
to
e3478d3
Compare
|
The test-rpc failure also happens on main branch: https://github.com/tharsis/ethermint/actions/runs/1375993842, probably just need a bigger timeout value. |
I'm seeing a huge regression (>100%) on performance for this PR. We should tackle that before merging this |
It seems like accidental, there's no regression now after merged main branch and rerun. |
But the estimateGas nondeterministic issue seems still exists: https://github.com/tharsis/ethermint/runs/4011483380?check_suite_focus=true |
@yihuang sorry about the delay, I'll look into this in-depth during the next couple of days |
db7bf52
to
a6b94c0
Compare
a6b94c0
to
6c28001
Compare
6c28001
to
1098a6c
Compare
Closes: evmos#664 Solution: - move the states(ctxStack and stateErr) into struct `StateDB` - `StateDB` is a temparory object which only lives in `ApplyMessage` move keeper methods out of statedb fix lint refactor state_transition fix unit tests Update x/evm/keeper/statedb.go fix tests rename
1098a6c
to
ef96e84
Compare
Closing now, I think it's better to review together here: #729. |
Closes: #664
Description
StateDB
methods to keeper style, aka. passingsdk.Context
explicitly, returnserror
when needed. see StateDBKeeperctxStack
andstateErr
and implementsSnapshot
/RevertSnapshot
/GetCommittedState
, delegate all the otherStateDB
methods to the keeper.ApplyMessage
createStateDB
struct on the fly, either commit or discard it before return.For contributor use:
docs/
) or specification (x/<module>/spec/
)godoc
comments.Unreleased
section inCHANGELOG.md
Files changed
in the Github PR explorerFor admin use:
WIP
,R4R
,docs
, etc)