-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Closed
Labels
Description
Summary of Bug
evmos/ethermint#626
benchmark: evmos/ethermint#627
code of concern:
cosmos-sdk/store/cachekv/mergeiterator.go
Line 205 in 1c468de
| func (iter *cacheMergeIterator) skipUntilExistsOrInvalid() bool { |
In ethermint we use a nested cache context stack to support the Snapshot and RevertToSnapshot APIs for EVM.
When EVM call Snapshot, we push a new cache context based on the top one, when RevertToSnapshot, we discard the cache contexts, after the execution, we commit all the cache contexts.
What we found is when the context stack is deep, it's extremely slow to create an iterator on it.
Version
v0.44.1
Steps to Reproduce
For Admin Use
- Not duplicate issue
- Appropriate labels applied
- Appropriate contributors tagged
- Contributor assigned/self-assigned
Reactions are currently unavailable