forked from evmos/ethermint
-
Notifications
You must be signed in to change notification settings - Fork 52
Problem: common parameters not cached #469
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
yihuang
commented
Apr 17, 2024
6 tasks
yihuang
commented
Apr 17, 2024
95ba799
to
a8c138c
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #469 +/- ##
===========================================
- Coverage 63.27% 63.20% -0.07%
===========================================
Files 127 127
Lines 9617 9618 +1
===========================================
- Hits 6085 6079 -6
- Misses 2993 2996 +3
- Partials 539 543 +4
|
Solution: - instead of only cache the module parameters, we can cache all the common parameters that's not changed during the whole block execution. benchmark results: ``` $ # test case in cronos repo $ go test -benchmem -v ./app/... -run "^$" -bench="BenchmarkERC20Transfer/memiavl-stm-16" -count 6 > /tmp/after $ benchstat /tmp/before /tmp/after ~/src/cronos goos: darwin goarch: arm64 pkg: github.com/crypto-org-chain/cronos/v2/app │ /tmp/before │ /tmp/after │ │ sec/op │ sec/op vs base │ ERC20Transfer/memiavl-stm-16-16 134.1m ± 2% 131.5m ± 1% -1.97% (p=0.009 n=6) │ /tmp/before │ /tmp/after │ │ B/op │ B/op vs base │ ERC20Transfer/memiavl-stm-16-16 562.1Mi ± 0% 539.2Mi ± 0% -4.06% (p=0.002 n=6) │ /tmp/before │ /tmp/after │ │ allocs/op │ allocs/op vs base │ ERC20Transfer/memiavl-stm-16-16 7.705M ± 0% 7.398M ± 0% -3.98% (p=0.002 n=6) ``` Update CHANGELOG.md Signed-off-by: yihuang <[email protected]> fix lint Update x/evm/keeper/config.go Signed-off-by: yihuang <[email protected]> cleanup fix tests fix lint fix lint fix integration test
889686d
to
f2a68ae
Compare
mmsqe
reviewed
Apr 18, 2024
Co-authored-by: mmsqe <[email protected]> Signed-off-by: yihuang <[email protected]>
mmsqe
approved these changes
Apr 18, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Solution:
benchmark results:
Closes: #XXX
Description
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)