Skip to content

Conversation

@codchen
Copy link
Collaborator

@codchen codchen commented Oct 13, 2025

Describe your changes and provide context

Some RPC endpoints (e.g. eth_getLogs) spend a lot of CPU cycles on decoding transactions. This PR caches the decoded transaction in memory (up to a configurable limit) during the write path so that RPC requests for recent blocks don't need to spend on decoding. This cache doesn't participate in consensus in any way.

(cpu usage & breakdown before & after the change, under 200 eth_getLogs requests per second)
before:
Screenshot 2025-10-13 at 7 22 01 PM
Screenshot 2025-10-13 at 7 22 11 PM

after:
Screenshot 2025-10-13 at 5 10 58 PM
Screenshot 2025-10-13 at 5 10 03 PM

Testing performed to validate your change

^
unit tests

@codecov
Copy link

codecov bot commented Oct 13, 2025

Codecov Report

❌ Patch coverage is 91.42857% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 39.60%. Comparing base (e37ef58) to head (bb82fc9).
⚠️ Report is 695 commits behind head on main.

Files with missing lines Patch % Lines
evmrpc/utils.go 72.72% 1 Missing and 2 partials ⚠️

❗ There is a different number of reports uploaded between BASE (e37ef58) and HEAD (bb82fc9). Click for more details.

HEAD has 1 upload less than BASE
Flag BASE (e37ef58) HEAD (bb82fc9)
sei-tendermint 1 0
Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##             main    #2464       +/-   ##
===========================================
- Coverage   53.98%   39.60%   -14.39%     
===========================================
  Files        1004     1582      +578     
  Lines       97098   161670    +64572     
===========================================
+ Hits        52422    64034    +11612     
- Misses      40864    92782    +51918     
- Partials     3812     4854     +1042     
Flag Coverage Δ
sei-chain 27.09% <85.29%> (?)
sei-cosmos 51.95% <ø> (ø)
sei-tendermint ?
sei-wasmd 51.40% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
app/app.go 77.27% <100.00%> (-1.45%) ⬇️
evmrpc/config.go 84.48% <100.00%> (ø)
x/evm/keeper/keeper.go 58.29% <100.00%> (ø)
evmrpc/utils.go 76.61% <72.72%> (ø)

... and 1021 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@codchen codchen force-pushed the tony/cache-typed-txs branch from f3c046b to bb82fc9 Compare October 15, 2025 03:22
@github-actions
Copy link

The latest Buf updates on your PR. Results from workflow Buf / buf (pull_request).

BuildFormatLintBreakingUpdated (UTC)
✅ passed✅ passed✅ passed✅ passedOct 15, 2025, 3:23 AM

@github-actions
Copy link

We truly appreciate your contribution and the time you’ve invested in this PR.
Before we can merge it, we’d love your help addressing the remaining feedback or sharing your perspective.
If we don’t hear back within 2 day(s), this PR will close automatically — but don’t worry, you can reopen it anytime when you’re ready to continue.

@github-actions
Copy link

We truly appreciate your contribution and the time you’ve invested in this PR.
Before we can merge it, we’d love your help addressing the remaining feedback or sharing your perspective.
If we don’t hear back within 2 day(s), this PR will close automatically — but don’t worry, you can reopen it anytime when you’re ready to continue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants