You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently the eth_getLogs is heavily used by some projects, sometime querying up to thousands of blocks in 1 request frequently (they could definitely improve it).
This has a huge impact on rpc nodes.
Suggested Solution
Because the blocks are constant, we should cache the ethereum logs so that requesting those would have a minimal cost.
Providing a new function like get_all_logs which would retrieve all the logs of a block and cache it.
This would allow to still use the cache even when there are filters.
Ideally, this on-the-fly cache would use an LRU eviction to ensure the most queries blocks would stay.
The text was updated successfully, but these errors were encountered:
Motivation
Currently the eth_getLogs is heavily used by some projects, sometime querying up to thousands of blocks in 1 request frequently (they could definitely improve it).
This has a huge impact on rpc nodes.
Suggested Solution
Because the blocks are constant, we should cache the ethereum logs so that requesting those would have a minimal cost.
I suggest to implement it directly there:
https://github.com/paritytech/frontier/blob/a9ec7ddd002b398937d5dae4d2b581a717b118b7/client/rpc/src/eth.rs#L352
Providing a new function like
get_all_logs
which would retrieve all the logs of a block and cache it.This would allow to still use the cache even when there are filters.
Ideally, this on-the-fly cache would use an LRU eviction to ensure the most queries blocks would stay.
The text was updated successfully, but these errors were encountered: