-
Notifications
You must be signed in to change notification settings - Fork 856
Cache typed txs for RPC reads #2464
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
base: main
Are you sure you want to change the base?
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ 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
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
f3c046b to
bb82fc9
Compare
|
The latest Buf updates on your PR. Results from workflow Buf / buf (pull_request).
|
|
We truly appreciate your contribution and the time you’ve invested in this PR. |
|
We truly appreciate your contribution and the time you’ve invested in this PR. |
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:
after:


Testing performed to validate your change
^
unit tests