Skip to content
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

[pool] Explore local tracing with revm #840

Open
dancoombs opened this issue Oct 10, 2024 · 1 comment
Open

[pool] Explore local tracing with revm #840

dancoombs opened this issue Oct 10, 2024 · 1 comment
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@dancoombs
Copy link
Collaborator

Describe the feature
Tracing is by far our largest latency performance bottleneck. Due to the complexities of getting custom native tracers installed on nodes (especially when using 3rd party RPCs), Rundler always uses a javascript tracer, causing the latency issue.

A different approach to this would be to do tracing locally using revm.

How this would work:

  • Gather all of the required storage slot values using the native prestateTracer on the normal RPC. This should be supported by all 3rd party RPCs.
  • Load the prestate into revm state builder on an empty database.
  • Trace the call locally using a revm inspector.

Some caveats:

  • Precompile support. Our local EVM would require all of the same precompiles as the network that we are simulating, and that we explicitly whitelist. Currently this is only RIP-7212, but the list might expand.
  • Performance. Rundler is currently very light on CPU usage due to offloading all computation to nodes.
    • We could implement this tracing functionality as another server task within Rundler that exposes a gRPC interface and could be horizontally scaled independently of the rest of Rundler.

Another approach could be to attempt to use revm on top of alloydb and remove the prestate tracing, but that may require too many network calls to be high performance.

@dancoombs dancoombs added the enhancement New feature or request label Oct 10, 2024
@dancoombs
Copy link
Collaborator Author

This would be made obsolete if Geth (and other major node providers) offer a native tracer and major RPC providers offer access: ethereum/go-ethereum#30546

@dancoombs dancoombs added this to the v0.5 milestone Oct 23, 2024
@dancoombs dancoombs self-assigned this Oct 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants
@dancoombs and others