Skip to content

Verified Proxy: Pre-fetch state using eth_createAccessList and add caching to EVM calls #3373

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

Draft
wants to merge 3 commits into
base: eth-call-vp
Choose a base branch
from

Conversation

bhartnett
Copy link
Contributor

This is an example of how we can add caching to improve the performance of the RPC endpoints which use the EVM in the verified proxy.

I've also implemented an optimization where we call the downstream eth_createAccessList RPC endpoint to pre-fetch the expected account and storage keys and then fetch all the state using eth_getProof (slots for each account are batched together), and then the state is put in the caches before executing the EVM call.

In my testing the pre-fetching provides a reasonable speed up but the verified eth_call is still slower then the unverified eth_call due to the additional network calls required which is to be expected.

Adding support for connecting to the downstream RPC provider via WebSockets would likely improve performance further.

@bhartnett bhartnett requested a review from chirag-parmar June 10, 2025 12:07
@bhartnett
Copy link
Contributor Author

@chirag-parmar Here is some example code which we could merge into your draft PR if you like. This is what I was recently suggesting we do to improve the eth_call performance.

@chirag-parmar
Copy link
Contributor

@bhartnett thank you for the work. But merging into this draft branch is probably not useful, no? I'll ping you when I create a PR for evm in verified proxy?

@bhartnett bhartnett marked this pull request as draft June 12, 2025 00:31
@bhartnett
Copy link
Contributor Author

@bhartnett thank you for the work. But merging into this draft branch is probably not useful, no? I'll ping you when I create a PR for evm in verified proxy?

Up to you if you merge it or not. I suggested that because I though that branch was where you were staging all your verified proxy changes but if keeping it separate works then fair enough.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants