Best practices for performant eth_call?
#17593
Unanswered
MartinquaXD
asked this question in
Help
Replies: 3 comments
-
Beta Was this translation helpful? Give feedback.
0 replies
-
Beta Was this translation helpful? Give feedback.
0 replies
-
|
I reverted what appeared to be the offending PR but the metrics did not return to normal. Will investigate further it's possible that this was just an unlucky coincidence. Is it possible that the huge mmap cache invalidation could be related to the performance degradation? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment







Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
We rely heavily on
eth_callrequests to query the current state of the chain.Recently we switched our implementation for fetching effective balances to what we though was a more reasonable implementation only to see that this degraded the whole reth node's performance.
We tried 3 different approaches:
eth_callis a contract creation request where we do our logic in the constructor. The data we are interested in effectively gets returned as if it was the byte code of the newly created contract (see Magic: StorageAccessbile Based Simulations cowprotocol/services#1831 for more context)To my surprise
1had by far the best latency while2and3needed significantly less memory.Here are some of our metrics where you can clearly see how they changed after we switched from
1to2. Switching from2to3had no visible effect.Do these results make sense to you?
Intuitively I would think that option
1has the most overhead (we need to pass the constructor byte code of the helper contract in the calldata and we have to run it to even fake-deploy the contract). And I expected3to be the fastest because the requests are as small as possible and the node already has the contract as part of the general blockchain state.Are there recommendations to write the most performant
eth_calls?Beta Was this translation helpful? Give feedback.
All reactions